跳到正文
北京时间
原文
Hacker News 热门(buzzing.cc 中文翻译)· zdgeier·· 2026-06-23精选AI 评分72

Show HN:Oak——专为代理设计的 Git 替代方案

Show HN: Oak——专为代理设计的 Git 替代方案

AI 导读

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.

CratePathcrates.ioWhat it is
oakvcs-corecore/oakvcs-coreThe 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-clicli/oakvcs-cliThe 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
# Oak
2
3
This repository is the open-source heart of [Oak](https://oak.space):
4
**version control at the speed of agents**. It's developed as a Cargo
5
workspace: a reusable VCS library plus the `oak` command-line client that
6
agents drive.
7
8
Bring your own agent (Claude Code, Codex, Cursor, …); Oak is the foundation
9
it reads, writes, branches, and collaborates through. The substrate is shaped
10
around how agents actually work — branch-per-session as the unit of work,
11
branch descriptions in place of per-commit messages, and content-addressed
12
lazy mounts that get an agent editing any repo in seconds. Because it's
13
content-addressed and hydrates on demand, it's also far faster than git for
14
agent workloads — but the speed is a consequence of the design, not the pitch.
15
16
| Crate | Path | crates.io | What it is |
17
18
| `oakvcs-core` | [`core/`](core/) | [`oakvcs-core`](https://crates.io/crates/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). |
19
| `oakvcs-cli` | [`cli/`](cli/) | [`oakvcs-cli`](https://crates.io/crates/oakvcs-cli) | The `oak` binary that builds on `oakvcs-core`. |
20
21
## Using the library in your own project
22
23
`oakvcs-core` is usable on its own — e.g. to build an Oak integration into
24
another tool or engine. Pull in just the content-addressed data model and
25
hashing (no SQLite/git) with default features off:
26
27
```toml
28
[dependencies]
29
oakvcs-core = { version = "0.99.0", default-features = false }
30
```
31
32
The crate is published as `oakvcs-core` but imported as `oak_core`.
33
34
Add the default `local-repo` feature when you also want the on-disk
35
`Repository` (SQLite + read-only git) backends.
36
37
## Installing the CLI
38
39
Oak is in **public beta** (v0.99.0). The quickest way in is the prebuilt
40
`oak` binary:
41
42
```bash
43
curl -fsSL oak.space/install | sh
44
```
45
46
The installer supports **macOS (Apple Silicon)** and **Linux (x86_64)**.
47
After install, `oak upgrade` updates the binary in place.
48
49
### Windows (x86_64)
50
51
The `curl … | sh` installer is Unix-only. On Windows, grab the prebuilt
52
`oak-windows-x86_64.exe` from the [latest GitHub
53
release](https://github.com/oakdotspace/oak/releases/latest) (rename it to
54
`oak.exe` and put it on your `PATH`), or build from crates.io with
55
`cargo install oakvcs-cli`. `oak upgrade` then updates it in place.
56
57
`oak mount` on Windows uses the **Projected File System (ProjFS)**, an optional
58
Windows feature. Enable it once per machine from an elevated PowerShell:
59
60
```powershell
61
Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart
62
```
63
64
(or Settings → Apps → Optional features → "Windows Projected File System").
65
Everything else — clone, push, pull, commit — works without it.
66
67
Prefer to build from crates.io? Install with Cargo instead (works on macOS,
68
Linux, and Windows — the TLS stack uses rustls + `ring`, so no C/NASM build
69
toolchain is required):
70
71
```bash
72
cargo install oakvcs-cli   # builds and installs the `oak` binary
73
```
74
75
## Building from source
76
77
```bash
78
cargo build --workspace        # builds oak-core + the oak binary
79
cargo test  -p oakvcs-cli      # CLI tests (incl. wiremock HTTP tests)
80
make build                     # release build + the CLI release tooling
81
make release-proof             # non-mutating launch/release readiness proof
82
```
83
84
The CLI depends on `oak-core` via an in-workspace path, so a plain
85
`cargo build` works against the local `core/` checkout with no extra setup.
86
See [`docs/release-readiness.md`](docs/release-readiness.md) for the release
87
proof and crates.io publish-order checks.
88
89
## License
90
91
Apache-2.0. See [LICENSE](LICENSE).
92
93
## AI
94
95
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](https://discord.gg/UUPfUaeDnS).

来源:Hacker News 热门(buzzing.cc 中文翻译) · oak.space