Skip to main content
Glama

gpp (把 git++)

CI License: MIT Rust 2024

AI 智能体在持续地修改代码,同时总是会丢失两次提交之间发生的工作;你为了代码库而做的那些笔记(CLAUDE.md、记忆库、知识文件)也会在代码往前演进之后悄然过期。gpp 正是为这一现实而构建的版本控制系统:它在每次变更发生的那一刻就捕获它,带显式意图、作者类型(人/智能体)和成本记录的精选变更集,然后promote(提升),并把项目知识托管在仓库自身的提交历史之上——因此,当某个提交把一条你认为成立的“关于代码的信念”推翻时,gpp 能直接指出是哪个提交。

gpp demo

(录屏由 scripts/demo.sh 生成——确定性,可复现,没有任何模拟。)

30 秒速览

cargo install gpp-cli

gpp init --graphex
echo "fn main() {}" > main.rs
gpp timeline                     # captured already — no staging, no commit
gpp promote -m "first cut" --intent feature
gpp diff HEAD                    # semantic diff: renames/moves are one op

而另一个其他 VCS 都不会做的事——把你对代码的信念记下来,让提交历史去审核它:

gpp belief add --claim "token expiry is 24h" --evidence src/auth.rs:7-7
# ...weeks of commits later...
gpp belief bisect "token expiry is 24h"
# INVALIDATED  cs:fhcpef7c  "raise token expiry to 7 days"
#  -     7 | pub const EXPIRY_HOURS: u64 = 24;
#  +     7 | pub const EXPIRY_HOURS: u64 = 168;

完全确定——只有 diff 交集和 blob 哈希,零 LLM 调用、零网络请求。(供对比:让最前沿的模型去判断某条存储下来的认知是否已经失效,它在 STALE benchmark 上最高只有 55.2% 的准确率——而在 gpp 中这只是一次历史查询,并不是一次模型判断。)这种方法已经用四个语言、五个真实仓库的 hiki后续验证过——xn"axum 0.6→0.7、flask 1.1→2.0、clap 3→4、zod 3→4、go-redis 8→9——其中每一条失效的信念都能二分定位到一个固定、可查的“元凶”提交,而对照组的控制条件不受影响。完整验证矩阵见 demos/belief-bisect/

Related MCP server: yksanjo/gmem

它不同于哪几个地方 where we differ

  • 持续捕获。 一条高分辨率“时间线”记录着每一次文件变更(SQLite WAL、防抖 watcher);经筛选的变更集会被*promote(提升)*出来,并带明确的目的、作者类型以及成本记录。commit 与 commit 之间没有任何东西会丢失。

  • Graphex:有版本、可加密的项目知识。 架构、约定、决策和信念都驻留在仓库内一个加密的知识图谱中,按智能体的信任层级做分级门控,每次读取都有审计记录,并持续接受提交历史中的过期检查。

  • 智能体治理。 agent 有一等公民身份、信誉打分;合规即代码(compliance-as-code)策略在 capture/promote/sync 三边强制实施;并支持异常检测与每个变更集各自的 token/成本归因。

除了上面的,任何其余部分——Noise 上的 P2P 同步、replay、评审/RBAC、中继节点、TUI——都是底层平台支撑的:见 docs/ARCHITECTURE.md

Git 是底座,不是对手。 桥(gpp git-import / git-export / git-bridge)与真实 Git 提交完整畅通、双向往返。因此 GitHub 和现有工作流照常使用——gpp 的知识层、溯源层和治理层则是搭在旁边延伸。前方的 axum 演示就是全部跑在通过这座桥导入的真实历史。

接入 Claude Code(或任何 MCP 客户端)

GPP 随包带来的 MCP 服务;智能体可以查询图谱(每一条信念都带有一个“新鲜度信封”——锚定 anchor、此刻到未来的 commits、以及让麻醉失效掉的那条更改)、以 propose_belief 提交带有证据锚定的自己的信念(先经人类批准,然后交由历史去审检)、提出 changeset、并上报成本。只需要你仓库根目录的 .mcp.json 写成这样:

{
  "mcpServers": {
    "gpp": { "command": "gpp", "args": ["mcp-server", "--stdio"] }
  }
}

客户端完整设置(Claude Desktop、通用 stdio)和外部暴露的工具列表:docs/MCP.md

状态

全部 9 个 ROADMAP 阶段(0–8)均已实现。 各阶段交付物与已记录的偏差说明,见 docs/ROADMAP.md;按优先级排队的积压工作见 docs/TODO.md;持续运行的工程日志见 docs/WORKLOG.md

2026-08-23 检查:184 个 workspace 测试通过cargo clippycargo fmt 干净无错,整个 workspace 可构建。不存在摆烂的 crate——每个 crates 都有可用实现。覆盖率被 CI 所计量(cargo llvm-cov;基线行为 65.7% line,正在提高)。

测试深度仍不均:基础层覆盖度良好(gpp-coregpp-graphexgpp-diffgpp-tui 均有 ≥ 80% 的行覆盖率;CLI 有端到端磨坊:政策执行、成本统计、审查指派、以及信念二分),而有些集成 crate 仍停留在 smoke 层级(gpp-sdkgpp-notifygpp-rbacgpp-replay)。这里的“已实现”是指达到了它的 milestone,不是所有部分都彻底加固过。补上这个 gap 正是 docs/TODO.md 的第一优先级。

全帧分层表

层次

Crate

实现的能力

Storage

gpp-core

内容寻址存储(BLAKE3 + zstd)、Blob/Tree、原始已校验帧传输

时间线

gpp-timeline

SQLite(WAL)捕获、.gppignore、debounce watcher、修剪

历史

gpp-history

Changeset/Intent/Author、分支引用、promote、DAG 遍历

Diff

gpp-diff

行级 + tree-sitter 语义 diff(Rust/Python/TS/Go)、rename/move 识别

Git 桥

gpp-git-bridge

git-import/git-export/git-bridge、SQLite 哈希映射

Graphex

gpp-graphex

加密(age + AES-GCM)知识图谱、分级投影、查询、生命周期、审计、信念与失效引擎

SDK / MCP

gpp-sdk

AgentSessiongpp mcp-server --stdio(JSON-RPC MCP)

信任

gpp-trust

荣誉度打分、状态转换、覆盖(overrides)、事件

政策

gpp-policy

.policy TOML 规则,专注 promote(阻断)/ timeline(警告)/ sync(阻断),内置模板

费用

gpp-cost

每次变更集的 token 和 $ 记录、预算、效率、agent self-reporting

异常

gpp-anomaly

scope/burst/体量检测,处理工作流

幂等

gpp-sync

Noise_XX P2P;对象/refs/策略/graphex;分叉保留

Replay

gpp-replay

可复现环境快照 + drift diff

Review/RBAC/通知

gpp-review gpp-rbac gpp-notify

review 生命周期、资源角色与分支保护、事件/收件箱/HMAC webhook

远程工作

gpp-remote

GitHub/GitLab/Bitbucket PR 创建、富文本 description、CI/通俗 review 导入

Relay

gpp-relay

常驻同步枢纽 binary + health endpoint + Dockerfile

客户端

gpp-cli gpp-tui gpp-deps

完整 CLI、ratatui TUI(gpp ui)、依赖情报(gpp deps + OSV)

以及:extensions/{gh-gpp,vscode-gpp,neovim-gpp}、GitHub Actions + GitLab CI 模板、deploy/ Docker 镜像、packaging/ Homebrew。

已记录在案但还未安排(它们被收进 ROADMAP/TODO,而不是无声跳过):依赖的 registry/许可证 API、原生 PyO3/napi bindings、对外出的语义层 review sync、apt/dpkg 安装包。

安装 / 构建

cargo install gpp-cli                    # the `gpp` binary (crates.io)
cargo install gpp-relay                  # relay node (optional)

# or from a clone
cargo build --release
cargo test --workspace
cargo bench -p gpp-core -p gpp-diff      # criterion perf suite

预编译二进制(Linux、macOS ARM+Intel、Windows)随每次 release一起提供;cargo install --git https://github.com/mahabubulid/gpp gpp-cli 则一直能拿到未正式版本的最新开发版。

更多值得 尝试

# Governance
gpp policy template secrets-scan
gpp trust show
gpp audit --include-cost --include-graphex

# Decentralized: sync two repos over Noise
gpp sync serve 127.0.0.1:9473             # on peer A
gpp sync add a 127.0.0.1:9473 && gpp sync # on peer B

# GitHub-compatible
gpp remote setup --platform github --repository acme/webapp
gpp remote pr-create --base main

项目说明见 CLAUDE.md;完整 spec(架构、数据模型、CLI、协议、roadmap)见 docs/;用户手册与教程见 docs/book/

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
2wRelease cycle
4Releases (12mo)

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Change tracking for AI-era codebases. AI agents call it to log structured change events (entity + diff + reasoning) before the session ends, then query history with diff, blame, history, changeset, and search. Captures the intent that would otherwise evaporate.
    8
    19
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Crypto-aware project memory for AI coding agents. Typed entities for Solana Programs/PDAs and EVM Contracts across Base, Optimism, Polygon, Arbitrum, Ethereum — plus chain-agnostic Decisions, Findings, and Integrations. Anchor + Hardhat auto-ingest, SQLite + FTS5 BM25 ranking, append-only versioning, git-aware diffs.
    33
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-first memory layer for AI coding agents — captures issues, attempts, fixes, and decisions, and warns at git commit before you repeat a mistake.
    15
    665
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Git-native long-term memory for AI agents: your markdown files are the source of truth, the search index is a disposable projection rebuilt from git, and every memory the agent writes is a reviewable git commit. Served over one OAuth-secured MCP endpoint with hybrid lexical+semantic recall and a gated, git-first commit_note write tool.
    7
    8
    AGPL 3.0

View all related MCP servers

Related MCP Connectors

  • Give your AI agent a persistent map of your project's structure, dependencies, and bugs.

  • Git-backed platform for skills, tools, and context for AI agents

  • One shared brain for your AI coding agents: team memory, agent Q&A, tasks, and file claims.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mahabubul470/gpp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server