Oak
This repository is the open-source heart of Oak:
version control at the speed of agents. It's developed as a Cargo
workspace: a reusable VCS library plus the oak command-line client that
agents drive.
Bring your own agent (Claude Code, Codex, Cursor, β¦); Oak is the foundation it reads, writes, branches, and collaborates through. The substrate is shaped around how agents actually work β branch-per-session as the unit of work, branch descriptions in place of per-commit messages, and content-addressed lazy mounts that get an agent editing any repo in seconds. Because it's content-addressed and hydrates on demand, it's also far faster than git for agent workloads β but the speed is a consequence of the design, not the pitch.
| Crate | Path | crates.io | What it is |
|---|---|---|---|
oakvcs-core | core/ | oakvcs-core | The VCS foundation: BLAKE3 content hashing, content-defined chunking, diff/merge, the Blob/Manifest/Commit/Tree data model, and an optional client-side local repository (SQLite + git backends). |
oakvcs-cli | cli/ | oakvcs-cli | The oak binary that builds on oakvcs-core. |
Using the library in your own project
oakvcs-core is usable on its own β e.g. to build an Oak integration into
another tool or engine. Pull in just the content-addressed data model and
hashing (no SQLite/git) with default features off:
[dependencies]
oakvcs-core = { version = "0.102.0", default-features = false }
The crate is published as oakvcs-core but imported as oak_core.
Add the default local-repo feature when you also want the on-disk
Repository (SQLite + read-only git) backends.
Installing the CLI
Oak is in public beta (v0.102.0). The quickest way in is the prebuilt
oak binary:
curl -fsSL oak.space/install | sh
The sh installer supports macOS (Apple Silicon and Intel) and Linux
(x86_64) β it picks the native binary for the machine it runs on. After
install, oak upgrade updates the binary in place.
Linux ARM64 binaries are published too, but the installer doesn't select them
yet; grab oak-linux-arm64 from the latest GitHub
release for now.
Windows (x86_64)
The curl β¦ | sh installer is Unix-only; Windows has a PowerShell
counterpart:
irm https://oak.space/install.ps1 | iex
It installs oak.exe to %USERPROFILE%\.local\bin and adds that directory to
your user PATH. You can also grab the prebuilt oak-windows-x86_64.exe from
the latest GitHub
release (rename it to
oak.exe and put it on your PATH), or build from crates.io with
cargo install oakvcs-cli. oak upgrade then updates it in place.
oak mount on Windows uses the Projected File System (ProjFS), an optional
Windows feature. Enable it once per machine from an elevated PowerShell:
Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart
(or Settings β Apps β Optional features β "Windows Projected File System"). Everything else β clone, push, pull, commit β works without it.
Prefer to build from crates.io? Install with Cargo instead (works on macOS,
Linux, and Windows β the TLS stack uses rustls + ring, so no C/NASM build
toolchain is required):
cargo install oakvcs-cli # builds and installs the `oak` binary
Working with large monorepos
Two ways to avoid pulling a whole monorepo:
-
Lazy mounts β
oak mount <org>/<repo>puts a working tree on top of the remote and hydrates files on demand (FSKit on macOS, FUSE on Linux, ProjFS on Windows). Best default for very large repos. -
Sparse (partial) clones β Perforce-style, when you want a plain on-disk checkout scoped to a subtree:
oak clone acme/monorepo --path services/api --path libs/shared oak sparse add libs/proto # widen the cone oak sparse disable # back to a full checkoutOnly files under the cone are downloaded and written; the rest of the tree is listed but its content is withheld, and commits carry the out-of-cone paths forward untouched (narrowing never deletes them). The same withhold-content mechanism powers server-side path permissions (directory-level read access set by repo admins).
OAK_ALLOW_PARTIAL_CLONE=1is a separate recovery flag that skips, rather than errors on, blobs a broken server failed to ship.
Building from source
cargo build --workspace # builds oak-core + the oak binary
cargo test -p oakvcs-cli # CLI tests (incl. wiremock HTTP tests)
make build # release build + the CLI release tooling
make release-proof # non-mutating launch/release readiness proof
The CLI depends on oak-core via an in-workspace path, so a plain
cargo build works against the local core/ checkout with no extra setup.
See docs/release-readiness.md for the release
proof and crates.io publish-order checks.
License
Apache-2.0. See LICENSE.
AI
This repo was written almost entirely using AI with human oversight. If you see anything that needs fixed or would like to contribute, please email [email protected] or reach out on Discord.