知识库问答 · 中文选型解读

graphify

已解读GitHubApache-2.0Python

graphify可将任意代码库及配套文档、SQL schema、PDF等资产转换为可查询的知识图谱,支持多款主流AI编码助手直接调用。

116.2kstar2 天前更新维护状态Apache-2.0 · 可评估商用商用提醒
在 GitHub 查看官方项目
适合解决把企业文档和数据变成可追溯的 AI 问答能力
更适合有文档沉淀、客服或内部知识复用需求的团队
投入判断上手门槛:需评估。通常需要整理数据、配置模型与权限
一分钟看懂

这个项目值得继续研究吗?

AI 依据上游资料解读 · 2026/9/6

graphify可将任意代码库及配套文档、SQL schema、PDF等资产转换为可查询的知识图谱,支持多款主流AI编码助手直接调用。

解决什么问题
企业研发团队常面临项目资产分散、代码关联逻辑难溯源、新人上手成本高、问题排查需逐文件检索等痛点,现有检索工具无法直观呈现不同资产间的关联关系。
适合什么团队
有代码库管理、项目知识沉淀、研发效率提升需求的企业研发团队,以及需快速梳理陌生项目架构的技术负责人与开发人员。
使用前注意
当前为v8迭代版本,尚未发布正式v1版;PyPI官方包名为graphifyy(双y);解析文档、音视频需自行配置AI模型API密钥;需预装Python 3.10及以上版本。

本页用于缩短初步筛选时间,不构成技术、采购或法律结论。 正式使用前请在真实业务数据上验证,并以官方说明与许可证为准。

项目导读

从官方资料看清能力、部署与采用边界

AI 翻译整理 · 保留官方来源

以下内容依据项目公开 README 或模型卡翻译整理,代码、命令和产品名保持原样。

项目定位

graphify是一款面向研发场景的知识图谱构建工具,可将代码库、配套文档、SQL schema、PDF、音视频等多类项目资产整合为统一的可查询知识图谱。不同于基于RAG(检索增强生成,一种通过检索外部知识库提升大模型回答准确率的技术)的知识库工具,graphify采用本地AST(抽象语法树,描述代码语法结构的树状数据格式)解析生成真实图谱,无需依赖向量存储,支持Claude Code、Cursor、Codex、Gemini CLI等15款以上主流AI编码助手直接调用。项目采用Apache-2.0许可证,可自由商用、修改。

核心能力

graphify的核心能力包括以下几类:

  1. 全资产图谱构建:支持解析40余种编程语言的代码,同时可将文档、PDF、图片、音视频等非代码资产整合进同一图谱,覆盖项目全量信息。
  2. 关联关系可解释:图谱中每一条关联边都标注来源:EXTRACTED表示直接从源文件中提取的明确关联,INFERRED表示由工具推导得到的关联,使用者可清晰判断关联可信度。
  3. 本地优先隐私保障:代码解析完全在本地完成,无需调用大模型、无数据流出本地;仅对文档、音视频等资产做语义解析时,才会调用用户自行配置的大模型接口。
  4. 多维度查询能力:支持三类核心查询:对单个概念的属性与关联解释、两个概念间的最短关联路径查询、自然语言问题对应的子图谱查询。
  5. 自动架构梳理:可自动识别图谱中连接最多的核心节点,同时通过Leiden算法将图谱划分为不同的业务子系统,无需大模型即可生成子系统标签。

典型使用流程

graphify的使用门槛较低,常规流程如下:

  1. 完成环境依赖安装后,通过uv tool install graphifyy或pipx install graphifyy安装工具包,注意官方PyPI包名为graphifyy(双y),其余同名包均非官方版本。
  2. 执行graphify install将工具注册为AI编码助手的技能,也可添加--project参数将其注册为当前项目专属技能,注册后的技能可直接在AI助手内调用。
  3. 在AI助手内输入/graphify .即可对当前项目进行全量解析,解析完成后会生成三个产出文件:
  • graph.html:可在浏览器打开的可视化图谱页面,支持点击节点、筛选、搜索操作
  • GRAPHREPORT.md:项目核心概念、意外关联、建议查询方向等要点总结
  • graph.json:全量结构化图谱数据,后续查询可直接复用无需重新解析文件
  1. 除了在AI助手内使用,也可直接通过命令行查询图谱,比如graphify explain "APIRouter"可查询该概念的全部属性与关联,graphify path "FastAPI" "ModelField"可查询两个概念间的最短关联路径。

FastAPI代码库可视化图谱示例

部署与使用要求

使用graphify需要先满足以下前置条件:

  • 环境需预装Python 3.10及以上版本,推荐搭配uv包管理器使用,也可选择pipx作为替代。
  • 不同操作系统的快速安装方式如下:
  • macOS:可通过Homebrew执行brew install python@3.12 uv完成依赖安装
  • Windows:可通过winget执行winget install astral-sh.uv完成安装
  • Ubuntu/Debian:可通过apt安装Python3.12、pipx,也可通过官方脚本安装uv
  • 注意事项:PowerShell环境下调用命令时需使用graphify .而非/graphify .,避免路径识别错误。

性能与适配情况

官方公开的基准测试结果显示:

  • 在LOCOMO测试集(n=300)上,recall@10指标为0.497,QA准确率为45.3%
  • 在LongMemEval-S测试集(n=50)上,QA准确率为76%,与密集RAG效果持平
  • 代码构建图谱全程无需消耗大模型tokens,无额外API成本

目前graphify已适配Claude Code、Cursor、Codex、Gemini CLI、GitHub Copilot等15款以上AI编码工具,可覆盖多数研发团队的工具使用习惯。

采用建议

当前graphify处于v8迭代阶段,正式v1版本尚未发布,其云平台版本已开放早期访问,适合有以下需求的团队优先试点:

  • 项目规模大、逻辑复杂,需要快速梳理架构的研发团队
  • 人员流动率高,需要沉淀项目知识、降低新人上手成本的团队
  • 需要批量排查代码关联、提升问题排查效率的团队

因为采用Apache-2.0许可证,团队可自由修改源码、用于商业场景,无授权限制。

可核对的事实层

官方资料与来源

查看来源 →
  • ai-agents
  • antigravity
  • ast
  • claude-code
  • code-analysis
  • code-search
  • codex
  • cursor
  • developer-tools
  • gemini
  • graphrag
  • knowledge-graph
默认分支v8
关注仓库390
复刻次数11.1k
开放议题1.3k
近期更新2026/9/5
仓库状态未标记归档
上游部署线索
## Prerequisites

| Requirement | Minimum | Check | Install |
|---|---|---|---|
| Python | 3.10+ | `python --version` | [python.org](https://www.python.org/downloads/) |
| uv *(recommended)* | any | `uv --version` | `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
| pipx *(alternative)* | any | `pipx --version` | `pip install pipx` |

**macOS quick install (Homebrew):**
```bash
brew install python@3.12 uv
```

**Windows quick install:**
```powershell
winget install astral-sh.uv
```

**Ubuntu/Debian:**
```bash
sudo apt install python3.12 python3-pip pipx

该片段来自项目 README,仅用于初步判断;实际部署请以官方文档为准。

核对上游原始说明节选

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

Read this in other languages

🇺🇸 English | 🇨🇳 简体中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇩🇪 Deutsch | 🇫🇷 Français | 🇪🇸 Español | 🇮🇳 हिन्दी | 🇧🇷 Português | 🇷🇺 Русский | 🇸🇦 العربية | 🇮🇷 فارسی | 🇮🇹 Italiano | 🇵🇱 Polski | 🇳🇱 Nederlands | 🇹🇷 Türkçe | 🇺🇦 Українська | 🇻🇳 Tiếng Việt | 🇮🇩 Bahasa Indonesia | 🇸🇪 Svenska | 🇬🇷 Ελληνικά | 🇷🇴 Română | 🇨🇿 Čeština | 🇫🇮 Suomi | 🇩🇰 Dansk | 🇳🇴 Norsk | 🇭🇺 Magyar | 🇹🇭 ภาษาไทย | 🇺🇿 Oʻzbekcha | 🇹🇼 繁體中文 | 🇵🇭 Filipino | 🇮🇱 עברית

Early access to the graphify platform is open before the public v1 launch: app.graphify.com

Type /graphify in your AI coding assistant and it maps your entire project (code, docs, PDFs, images, videos) into a knowledge graph you can query instead of grepping through files.

  • Code maps for free, fully local. Code is parsed with tree-sitter AST: deterministic, no LLM, nothing leaves your machine. (Docs, PDFs, images and video use your assistant's model, or a configured API key, for a semantic pass.)
  • Every edge is explained. Each connection is tagged EXTRACTED (explicit in the source) or INFERRED (resolved by graphify), so you can tell what was read directly from what was inferred.
  • Not a vector index. No embeddings, no vector store: a real graph you traverse. Ask a question, trace the path between two things, or explain one concept.
Want this always-on, updating in the background across your code, docs, and meetings rather than only on demand? That is what we are building at graphify.com, and early access is open now at app.graphify.com.

The FastAPI codebase mapped by graphify. Every node is a concept, colors are detected communities, and the whole thing is clickable in graph.html.

Get started (30 seconds):

uv tool install graphifyy      # install the CLI (or: pipx install graphifyy)
graphify install               # register the skill with your AI assistant

Then, in your AI assistant:

/graphify .

That's it. You get three files:

graphify-out/
├── graph.html       open in any browser — click nodes, filter, search
├── GRAPH_REPORT.md  the highlights: key concepts, surprising connections, suggested questions
└── graph.json       the full graph — query it anytime without re-reading your files

Works in Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and 15+ more — pick your platform.

What it does

What you get out of the box:

| Capability | What you get | |---|---| | God nodes | The most-connected concepts, so you see what everything flows through | | Communities | The graph split into subsystems (Leiden), with LLM-free labels | | Cross-file links | calls / imports / inherits / mixesin resolved across 40 languages via tree-sitter AST | | Query, path, explain | Ask a question, trace the path between two things, or explain one concept, all against graph.json | | Rationale + doc refs | # NOTE: / # WHY: comments and ADR/RFC citations become first-class nodes linked to the code | | Beyond code | Docs, PDFs, images, and video/audio all map into the same graph | | Local-first | Code is parsed locally with tree-sitter (no LLM, nothing leaves your machine); only the semantic pass over docs/media calls a backend, and only if you configure one |

---

Benchmarks

| Benchmark | Metric | graphify | Field | |---|---|---|---| | LOCOMO (n=300) | recall@10 | 0.497 | mem0 0.048, supermemory 0.149 | | LOCOMO (n=300) | QA accuracy | 45.3% | supermemory 49.7%, mem0 27.3% | | LongMemEval-S (n=50) | QA accuracy | 76% | tied with dense RAG | | Graph build | LLM credits | 0 | per-token for most systems |

Every system ran on the same harness with the same model and budgets, scored by a judge blind-validated against a second judge (90.6% agreement, Cohen's kappa 0.81). Full per-system tables, the code-intelligence result, and reproduction commands: BENCHMARKS.md.

---

Prerequisites

| Requirement | Minimum | Check | Install | |---|---|---|---| | Python | 3.10+ | python --version | python.org | | uv (recommended) | any | uv --version | curl -LsSf https://astral.sh/uv/install.sh \| sh | | pipx (alternative) | any | pipx --version | pip install pipx |

macOS quick install (Homebrew):

brew install python@3.12 uv

Windows quick install:

winget install astral-sh.uv

Ubuntu/Debian:

sudo apt install python3.12 python3-pip pipx
# or install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh

---

Install

Official package: The PyPI package is graphifyy (double-y). Other graphify packages on PyPI are not affiliated. The CLI command is still graphify.

Step 1 — install the package:

# Recommended (isolated env; if 'graphify' isn't found after, run: uv tool update-shell):
uv tool install graphifyy

# Alternatives:
pipx install graphifyy
pip install graphifyy  # may need PATH setup — see note below

Step 2 — register the skill with your AI assistant:

graphify install

That's it. Open your AI assistant and type /graphify .

To install the assistant skill into the current repository instead of your user profile, add --project:

graphify install --project
graphify install --project --platform codex

Project-scoped installs write under the current directory, for example .claude/skills/graphify/SKILL.md or .agents/skills/graphify/SKILL.md (plus a references/ sidecar the skill loads on demand), and print a git add hint for files that can be committed. Per-platform commands that support project-scoped installs accept the same flag, for example graphify claude install --project or graphify codex install --project.

PowerShell note: Use graphify . not /graphify . — the leading slash is a path separator in PowerShell.
graphify: command not found? uv tool install / pipx install put the graphify command in their tool bin dir (/.local/bin). If your shell can't find it right after install — common on a

上游文档较长,此处为节选。完整内容见官方项目。