OXYGENHUB
# 37f1914b62a8 oxygen / README.md
3.6 KiB · Markdown · last changed README: the agents section in shorter sentences, the command as an example 1 month ago renderedsource blame history raw
1
# Oxygen
2
3
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.
4
5
It is self-hosting: this directory is an Oxygen repository, and the project's own history is kept with `oxy`, not with Git.
6
7
## Working with agents
8
9
An AI agent works in Oxygen under a key of its own, which you delegate to for a scope and a time. For example:
10
11
```
12
oxy identity delegate add agent.identity --scope changes --expires 8h
13
```
14
15
Every change the agent makes is attributed to you and signed by the agent. `oxy log`, `oxy verify` and the hub therefore show who did the work, such as "Andy McCall · via Claude Code", and a policy can require that a person has approved it before it lands.
16
17
See [docs/ai_native_agent_workflows.md]docs/ai_native_agent_workflows.md for the design and [docs/guide.md]docs/guide.md §9 for the setup.
18
19
## What is different
20
21
- **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.
22
- **Conflicts are data.** A conflicted state can be committed, pushed and pulled. Resolving one is an ordinary edit followed by a commit.
23
- **Every change has a stable ID and a content hash.** The ID survives rewrites; the hash makes history tamper-evident.
24
- **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.
25
- **Every operation is undoable** through an operation log.
26
- **Large files are chunked** with content-defined chunking into a BLAKE3-addressed store.
27
28
## Status
29
30
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.
31
32
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.
33
34
## Building
35
36
```
37
cargo build --release
38
cargo test --workspace
39
```
40
41
The binary is `target/release/oxy`.
42
43
## Quick start
44
45
```
46
oxy identity create --name "Your Name" --email [email protected]
47
oxy config --user core.sign change      # sign every commit
48
oxy init                                 # in a project directory
49
oxy status
50
oxy commit -m "First change"
51
oxy log
52
```
53
54
Collaborating:
55
56
```
57
oxy serve --root /srv/oxy --bind 0.0.0.0:8890 --tls-cert cert.pem --tls-key key.pem --token SECRET
58
oxy clone https://host:8890/project
59
oxy config remote.origin.token SECRET
60
oxy push
61
oxy pull
62
```
63
64
Trust policy, so a server accepts only changes from keys you have granted:
65
66
```
67
oxy policy init                          # your key becomes the root
68
oxy identity export                      # a contributor sends you this file
69
oxy policy grant alice.identity
70
oxy push                                 # publishes the policy
71
```
72
73
## Layout
74
75
| Path | Contents |
76
|---|---|
77
| `crates/oxy-core` | Library: encoding, hashing, objects, the change graph, storage, identities, policy, protocol, repository operations |
78
| `crates/oxy-server` | Reference HTTP(S) server for the wire protocol |
79
| `src/cli` | The `oxy` command-line interface |
80
| `docs/spec.md` | The specification |
81
82
## Licence
83
84
MIT or Apache-2.0, at your option.