Show HN:Oak——专为代理设计的 Git 替代方案
Show HN: Oak——专为代理设计的 Git 替代方案
Oak 是开源版本控制系统,专为 AI 智能体(Claude Code、Codex、Cursor)设计。采用 BLAKE3 内容哈希、内容定义分块、diff/merge 及 Blob/Manifest/Commit/Tree 数据模型,可选 SQLite 和 git 后端。以分支-会话为基本工作单元,用分支描述替代逐次提交,通过内容寻址懒加载使智能体数秒内编辑任意仓库。速度远超 git。已发布公开测试版 v0.99.0,支持 macOS(Apple Silicon)、Linux(x86_64)及 Windows,可通过 curl 或 cargo 安装,Apache-2.0 开源。
专为 AI 代理打造的全新版本控制工具,分支作为会话单元、内容寻址懒加载,设计直接摆脱了 git 的包袱,用 agent 的开发者值得一试。
oak
oak
README.md
95 lines · 3.9 KB
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.99.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.99.0). The quickest way in is the prebuilt oak binary:
curl -fsSL oak.space/install | sh
The installer supports macOS (Apple Silicon) and Linux (x86_64). After install, oak upgrade updates the binary in place.
Windows (x86_64)
The curl … | sh installer is Unix-only. On Windows, 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
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.
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
来源:Hacker News 热门(buzzing.cc 中文翻译) · oak.space