Beagle,存储 AST 树的源代码管理系统

发布: (2026年3月8日 GMT+8 21:28)
2 分钟阅读

Source: Hacker News

Beagle SCM

Beagle 是一种源代码管理系统,它存储 AST 树,而不是二进制块。
其总体思路是 代码的数据库,作为所有代码相关活动的中心以及所有相关数据(工单、CI 结果等)的存储。

后端存储几乎可以是任何键值数据库(目前使用 RocksDB)。
数据格式 AST BASON 带有 CRDT 的特性。

Beagle 仍处于早期阶段且属于实验性质。它自行托管;其余部分不作保证。使用风险自负。

进一步阅读

使用示例

# Initial POST of a project. We specify repo, project path.
# Absence of http: or ssh: makes it local to the store in $HOME/.be
$ be post //replicated.live/@gritzko/librdx
...
OK   h    ast/tree-sitter/point.h
OK   h    ast/tree-sitter/parser.h
OK   c    ast/tree-sitter/query.c
OK   text ast/verilog/LICENSE
...million more lines...

# Inspect RocksDB inners just out of curiosity.
$ ls $HOME/.be/replicated.live/
# Inspect worktree/repo state
$ cat .be
//replicated.live/@gritzko/librdx
$ be
repo: replicated.live
project: /@gritzko/librdx
branches: *main
base files: 574, waypoints: 0

$ cd /some/other/dir
$ be get //replicated.live/@gritzko/librdx
...a million lines...
OK   h    rdx/test/YX.h
OK   h    rdx/test/ZE.h
OK   sh   rdx/test/http-test.sh
OK   sh   rdx/test/query-test.sh
OK   sh   scripts/ci-fast.sh
$ cd librdx
$ be
repo: replicated.live
project: /@gritzko/librdx
branches: *main
base files: 574, waypoints: 0
0 浏览
Back to Blog

相关文章

阅读更多 »

并非所有摩擦都相同

介绍 最近有很多帖子庆祝“摩擦的消亡”,赞扬 AI 如何消除编写代码的摩擦并提升开发效率

准备迎接 Google I/O 2026

Google I/O 将于5月19日至20日回归。Google I/O 回来了!加入我们的线上活动,分享我们在 AI 领域的最新突破以及公司各产品的更新,涵盖 Gemini……