Show HN: Oak – 为智能体设计的 Git 替代品
Show HN: Oak – Git replacement designed for agents

原始链接: https://oak.space/oak/oak

Oak 是一个开源版本控制系统(VCS),专为加速 AI 智能体的工作流而设计。它以 Cargo 工作区(workspace)的形式构建,包含一个核心库(`oakvcs-core`)和一个 CLI 客户端(`oak`),使智能体能够以比标准 Git 更快、更高效的方式与仓库进行交互。 与传统的版本控制系统不同,Oak 针对智能体的操作方式进行了优化。它将“每个会话一个分支”(branch-per-session)作为主要工作单元,用分支描述取代了单次提交消息,并采用基于内容寻址的延迟加载挂载技术,以实现近乎瞬时的仓库访问。其数据模型由 BLAKE3 哈希和内容定义分块技术驱动,支持快速操作,同时其核心库也保持了足够的模块化,便于集成到其他工具中。 Oak 目前处于公开测试阶段(v0.99.0),支持 macOS、Linux 和 Windows 等跨平台使用。它可以通过 shell 脚本安装,也可以直接从 crates.io 构建。Oak 采用 Apache-2.0 许可证发布,主要通过 AI 辅助编码并在人类监督下开发完成。

这场 Hacker News 讨论聚焦于 **Oak** 的发布,这是一个旨在替代 Git 的新型版本控制系统(VCS)。项目开发者认为,虽然 Git 功能强大,但不适用于许多现代软件工作流,并列举了它在大文件处理、子模块管理以及复杂的权限控制方面存在的问题。 评论区的反应褒贬不一。一些用户对其他 VCS 工具(如 **Jujutsu** 和 **Fossil**)表示了兴趣,因为这些工具解决了 Git 常见的一些痛点,例如分支操作困难、历史记录管理繁琐,以及对“以人为本”的变更追踪的需求。 然而,许多用户批评该项目的发布过于推销且缺乏技术深度。怀疑者指出,作者未能清楚地阐明 Oak 在数据模型层面与 Git 有何不同,这引发了人们对其为何不作为 Git 扩展构建的质疑。尽管作者澄清 Oak 的文件存储方式有所不同——通过对所有数据进行分块处理,从而消除了对 Git LFS 等系统的需求——但其他人仍不买账,认为其“代理优先”(agent-first)的设计和营销动机与大多数开发者的实际工作流程脱节。
相关文章

原文

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.

联系我们 contact @ memedata.com