OXYGENHUB
# 8d6cf1f23694 oxygen / README.md
4.8 KiB · Markdown · last changed The .deb adds the apt repository at oxygenhub.io; the README says how 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
## What is different
8
9
- **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.
10
- **Conflicts are data.** A conflicted state can be committed, pushed and pulled. Resolving one is an ordinary edit followed by a commit.
11
- **Every change has a stable ID and a content hash.** The ID survives rewrites; the hash makes history tamper-evident.
12
- **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.
13
- **Every operation is undoable** through an operation log.
14
- **Large files are chunked** with content-defined chunking into a BLAKE3-addressed store.
15
16
## Status
17
18
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.
19
20
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.
21
22
## Install
23
24
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.
25
26
- **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:
27
28
  ```sh
29
  sudo curl -fsSLo /usr/share/keyrings/oxygenhub-archive-keyring.gpg https://oxygenhub.io/apt/oxygenhub.gpg
30
  sudo tee /etc/apt/sources.list.d/oxygenhub.sources >/dev/null <<EOF
31
  Types: deb
32
  URIs: https://oxygenhub.io/apt
33
  Suites: stable
34
  Components: main
35
  Signed-By: /usr/share/keyrings/oxygenhub-archive-keyring.gpg
36
  EOF
37
  sudo apt update && sudo apt install oxy
38
  ```
39
40
  Or download `oxy_VERSION_amd64.deb` (or `_arm64`, `_riscv64`) from a release and run `sudo apt install ./oxy_VERSION_amd64.deb`: from 0.3.1 it adds the repository by itself. It needs glibc 2.28 or later (Debian 10, Ubuntu 20.04 and newer). The repository's key is `82DD DD14 8BC9 0BDF 6006 09E9 522E 288F 265B DE6F`.
41
- **Other Linux:** unpack `oxy-VERSION-linux-x86_64.tar.gz` (or `-linux-arm64`) and put `oxy` on your `PATH`.
42
- **macOS** (Apple Silicon or Intel): unpack `oxy-VERSION-macos-arm64.tar.gz` (or `-macos-x86_64`), then `xattr -d com.apple.quarantine oxy`, since the build is not notarised, and put it on your `PATH`.
43
- **Windows:** unzip `oxy-VERSION-windows-x86_64.zip` and put the folder on your `PATH`. SmartScreen may warn on first run, since the build is not signed.
44
45
`oh`, the OxygenHub command line, is released the same way from [OxygenHub's releases]https://oxygenhub.io/andymccall/oxygenhub/releases.
46
47
Check a download against the release's `SHA256SUMS` with `sha256sum -c SHA256SUMS --ignore-missing`.
48
49
## Building
50
51
```
52
cargo build --release
53
cargo test --workspace
54
```
55
56
The binary is `target/release/oxy`.
57
58
## Quick start
59
60
```
61
oxy identity create --name "Your Name" --email [email protected]
62
oxy config --user core.sign change      # sign every commit
63
oxy init                                 # in a project directory
64
oxy status
65
oxy commit -m "First change"
66
oxy log
67
```
68
69
Collaborating:
70
71
```
72
oxy serve --root /srv/oxy --bind 0.0.0.0:8890 --tls-cert cert.pem --tls-key key.pem --token SECRET
73
oxy clone https://host:8890/project
74
oxy config remote.origin.token SECRET
75
oxy push
76
oxy pull
77
```
78
79
Trust policy, so a server accepts only changes from keys you have granted:
80
81
```
82
oxy policy init                          # your key becomes the root
83
oxy identity export                      # a contributor sends you this file
84
oxy policy grant alice.identity
85
oxy push                                 # publishes the policy
86
```
87
88
## Layout
89
90
| Path | Contents |
91
|---|---|
92
| `crates/oxy-core` | Library: encoding, hashing, objects, the change graph, storage, identities, policy, protocol, repository operations |
93
| `crates/oxy-server` | Reference HTTP(S) server for the wire protocol |
94
| `src/cli` | The `oxy` command-line interface |
95
| `docs/spec.md` | The specification |
96
97
## Licence
98
99
MIT or Apache-2.0, at your option (see `LICENSE`).