Hacker News AI · 2026/10/14 23:00:41

Graphicle 发布 Rust 版代码图谱与记忆工具:为编码智能体提供本地化上下文增强

原标题:Show HN: Graphicle, a Rust port of Graphify with memory for coding agents
68AI 研判分
核心综述

Graphicle 推出基于 Rust 的开源工具,通过构建仓库代码图谱并持久化存储项目文档、决策及历史会话,为 Claude Code、Cursor 等编码智能体提供带精确行号引用的本地上下文。该工具无需 API 密钥或云端账户,支持 MCP 协议,旨在解决智能体在复杂项目中缺乏长期记忆和精准定位能力的痛点。

报道全文原始报道全文

本文目录5 个章节

Code graph and memory for your coding agents, in one Rust program.

Graphicle maps your repository into a code graph, remembers your project's docs, decisions and past agent sessions, and gives your coding agent cited excerpts from both: the exact files and lines. It runs on your machine: no API key needed, no account, no telemetry . Works with Claude Code · Cursor · Codex · VS Code · Claude Desktop · any MCP client

Quick start · How it works · Benchmarks · Docs · Coming from Graphify? · Discussions

Quick start

SH
brew install graphicle-ai/tap/graphicle
cd your-repo
graphicle setup

<sub>No Homebrew? <code>curl -fsSL https://github.com/graphicle-ai/graphicle/releases/latest/download/install.sh | sh</code> · Release archives · Other ways to install<br> Windows: no native build yet; under WSL2 the Linux install should work (not yet tested). Native Windows support is planned.</sub>

graphicle setup indexes the repository, builds its code graph and connects the coding agents it finds. It also turns on session capture, points Claude Code's searches to the code graph first, adds a short section to AGENTS.md and installs Git hooks that keep the project current. It lists every file it changes and backs each one up first; graphicle disconnect undoes it all.

Then ask your agent to "use graphicle to find where failed requests are retried", or ask from the terminal:

CONSOLE
$ graphicle ask "where is tax added to prices?"
Evidence for "where is tax added to prices?"
4 excerpts · 598 of 3,000 tokens

[1] shop/pricing.py:1-7  price_with_tax()
    """Prices and tax."""
    TAX_RATE = 0.2

def price_with_tax(price):
        """A price with the sales tax added."""
        return round(price * (1 + TAX_RATE), 2)

<sub>Real output, cut after the first excerpt. With no model configured, <code>ask</code> shows the evidence; <code>graphicle config set model anthropic</code> (or <code>openai</code>, <code>ollama</code>) adds written answers.</sub>

<details> <summary><b>Let your coding agent install it</b></summary>

Paste this into Claude Code, Codex or Cursor:

TEXT
Install Graphicle with `brew install graphicle-ai/tap/graphicle` (or, without Homebrew,
`curl -fsSL https://github.com/graphicle-ai/graphicle/releases/latest/download/install.sh | sh`),
then run `graphicle setup --yes` in this repository and list every file it changed.
</details>

Start here

You want toRun
Give your coding agent the code graph and your project's memorygraphicle setup in the repository
Ask a question from the terminalgraphicle ask "how are failed requests retried?"
Browse the graph, the sources and the memorygraphicle open
See what a change to a symbol touchesgraphicle graph extract . --code-only, then graphicle graph affected "retry()"
Check that everything worksgraphicle doctor
Undo everything setup didgraphicle disconnect
Move from Graphify, or run a server for a teamMoving from Graphify · Team server

Why Graphicle

  • Native and fast. One Rust program. On Kubernetes (31k files), the 0.1.0 engine ran a code-only extract in 3 min 18 s, against 26 min 38 s for Graphify 0.9.88, and built the same graph (one exploratory run each, one Linux host, the same 16 CPUs, 8 workers).
  • Context, not re-reading. Your agent asks Graphicle and gets the relevant code, docs and decisions as cited excerpts, within a token budget.
  • Answers you can check. Every excerpt names its file and lines. Memories an agent proposes wait for your approval.
  • One program, not a stack. The code graph, the memory, one MCP server, the web app and the command line come in one install, with one SQLite file. No Python, Docker or database server.
  • Local and private. No account and no telemetry. Nothing leaves your machine unless you ask.

What it does

  • Code graph. Files, functions, classes, calls and imports, parsed with tree-sitter and no model. graphicle graph searches it, explains a symbol, traces a path and exports an interactive HTML graph. After graphicle graph extract . --code-only, graphicle graph affected "retry()" lists what depends on a symbol.
  • Project memory. Docs (Markdown, PDF, Office, HTML), reviewed decisions and procedures, and past Claude Code and Codex sessions, searchable alongside the code.
  • Cited context on a budget. graphicle context and the MCP tools return excerpts with their sources, within a token budget, without calling a model.
  • One MCP server. graphicle mcp serves the code-graph tools, under Graphify's tool names such as query_graph, get_neighbors and shortest_path, next to the memory tools.
  • Memory tied to your code. Reviewed memories are tied to the functions they are about: a memory goes stale when that code changes, and edits elsewhere in the file usually leave it current (the exact rule). Mentions of code in your docs are linked to the definitions they name (graphicle call graph.doc_links lists them).
  • Across repositories. Recall can span the repositories of a workspace: graphicle context --workspace, or the workspace MCP endpoint.
  • Always current. Before each answer Graphicle syncs the few files you changed; Git hooks sync after each commit, merge and checkout.
  • No re-explaining. Session capture keeps each finished turn, and each new session starts with your reviewed memories and the latest turns.
  • An app. graphicle open shows the graph, the sources and the memory in your browser. It is where you approve memories.

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)