# Oxygen Oxygen (`oxy`) is a distributed, commutative version control system written in Rust for large repositories. See [docs/spec.md](docs/spec.md) for the specification, [docs/guide.md](docs/guide.md) for a user guide by task, and [docs/protocol.md](docs/protocol.md) if you are implementing a client or server. It is self-hosting: this directory is an Oxygen repository, and the project's own history is kept with `oxy`, not with Git. ## What is different - **History is a set of changes, not a chain of snapshots.** A change records what it did to identified lines and tree nodes and which earlier changes it depends on. Changes that do not depend on each other commute, so there are no merge commits and rebasing independent work rewrites nothing. - **Conflicts are data.** A conflicted state can be committed, pushed and pulled. Resolving one is an ordinary edit followed by a commit. - **Every change has a stable ID and a content hash.** The ID survives rewrites; the hash makes history tamper-evident. - **Everything is signed.** Composite Ed25519 + ML-DSA-65 signatures on changes and on every bookmark update, verified against a trust policy that lives in the repository. - **Every operation is undoable** through an operation log. - **Large files are chunked** with content-defined chunking into a BLAKE3-addressed store. ## Status Early, but usable for its own development. Implemented: the object model, the change graph with conflict detection and resolution, the working copy (`status`, `commit`, `checkout`, `diff`, `undo`), identities and signatures, remotes over local paths and HTTP(S) with `clone`, `fetch`, `pull`, `push`, the reference server `oxy serve`, the trust policy, and packed storage. Not yet: checkpoints for very long histories, history editing (`rebase`, `split`, `edit`), multiple workspaces, garbage collection with retention, and the Thin client profile for constrained machines. ## Install Builds for Linux, macOS and Windows are on the [releases page](https://oxygenhub.io/andymccall/oxygen/releases). These are early releases: the macOS and Windows builds are not signed and have had little testing. - **Debian, Ubuntu and other Linux with apt** (x86_64, arm64 or riscv64): add the repository at https://oxygenhub.io/apt and install with apt, so `apt upgrade` keeps oxy current: ```sh sudo curl -fsSLo /usr/share/keyrings/oxygenhub-archive-keyring.gpg https://oxygenhub.io/apt/oxygenhub.gpg sudo tee /etc/apt/sources.list.d/oxygenhub.sources >/dev/null < ` converts a Git history, `oxy git fetch ` brings new commits of a Git remote into the bookmark, `oxy git push ` publishes the bookmark as commits on top of them, and `oxy git export ` writes a plain Git mirror. Keys have a lifecycle: `oxy identity rotate` moves to a fresh key pair (the policy follows), `oxy identity renew --expires 365` sets an expiry, `oxy identity delegate add bot.identity` lets another key sign for you, and `oxy identity revoke` retires a key. With several root keys, `oxy policy root add|remove|threshold` and `oxy policy sign` gather the required signatures through proposal files. ## Layout | Path | Contents | |---|---| | `crates/oxy-core` | Library: encoding, hashing, objects, the change graph, storage, identities, policy, protocol, repository operations | | `crates/oxy-server` | Reference HTTP(S) server for the wire protocol | | `src/cli` | The `oxy` command-line interface | | `docs/spec.md` | The specification | | `docs/guide.md` | User guide, organised by task | | `docs/protocol.md` | Wire protocol for other implementers | | `docs/prompt.md` | Shell prompt integration | ## Licence MIT or Apache-2.0, at your option (see `LICENSE`).