Metadata-Version: 2.4
Name: omni-compress
Version: 0.1.0
Summary: OMNI — install-and-go neural compression for source code
License-Expression: MIT
Project-URL: Homepage, https://github.com/ben-blance/omni
Project-URL: Repository, https://github.com/ben-blance/omni
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Archiving :: Compression
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# OMNI

OMNI is a neural compressor for source code. It beats `tar+xz` on ratio for
Python codebases by combining a trained sequence model with explicit
long-range copy matching and entropy coding, instead of general-purpose
byte-level compression.

```
omni compress my_project/
# -> my_project.satish_andromeda

omni decompress my_project.satish_andromeda
# -> my_project/  (byte-identical to the original)
```

## Install

Real one-line installers (`apt install omni`, `curl ... | sh`) aren't live
yet. For now:

```
git clone <this repo>
cd omni
./install.sh
```

which installs the `omni` CLI in editable mode via pip.

## Usage

```
omni compress <path> [--model NAME] [--out FILE]     # file or directory
omni decompress <file.satish_*> [--out PATH]
omni info <file.satish_*>                              # header only, no model needed
omni models                                             # installed model generations
omni version
```

Model management — `omni model update` fetches the latest generation
directly from this repo's [GitHub Releases](https://github.com/ben-blance/omni/releases)
(tagged `<generation>-<year>`, e.g. `andromeda-2026`), no separate registry
server required:

```
omni model update                                       # install/refresh the latest generation
omni model update --force                                # re-download even if already installed
omni model register <name> <year> <model.pt> --so <arithmetic_coder.so> [--default]
omni model default <name>
```

`omni model update` checks `ben-blance/omni` by default — override with the
`OMNI_MODEL_REPO` env var (`owner/repo`) to point at a fork.

`omni compress` always uses the latest installed generation unless you pass
`--model`. `omni decompress` always uses whatever generation the archive's
header says it needs — see [docs/satish-format.md](docs/satish-format.md).

## Try it

[`examples/`](examples/) has a walkthrough against a small sample project.

## Public vs. private

This repository is the **distribution layer only** — the CLI, the SATISH
container format, docs, and install scripts. It does not contain the
compression engine (tokenizer, model architecture, LZ matcher, arithmetic
coder, or trained weights).

```
              this repo (public)
                     │
          ┌──────────┴──────────┐
          │                     │
    CLI (src/omni/)      SATISH format (documented,
          │                docs/satish-format.md)
          ▼
   src/omni/engine.py  ──seam──▶  OMNI engine (private)
                                        │
                                        ▼
                                 model: Andromeda (2026)
```

`src/omni/engine.py` is the only file that talks to the engine, and it does
so dynamically (via `OMNI_ENGINE_SRC`, or a private package once one
exists) — nothing else in this package needs to change when the engine
moves to its own private repo or ships as a compiled binary.

The SATISH *format* is public and documented on purpose (see
[docs/satish-format.md](docs/satish-format.md)) even though the *engine*
isn't: a `.satish_*` file's header should always be inspectable, independent
of whether you have the model or algorithm that produced it.

**License:** MIT — see [LICENSE](LICENSE). This covers the CLI and SATISH
format shell in this repo only; it does not extend to the private
compression engine or trained model weights, which are distributed
separately (see "Public vs. private" above) and are not covered by this
license.
