Graphify-Labs/graphify

GITHUB中文整理

主语言 Python · 136,432 星 · Apache-2.0 · 创建于 2026-04-03

知识图谱代码分析本地优先AI 助手架构审查 本周第 6 名
打开 GitHub 仓库

一个把代码库连同文档、SQL 结构、配置和 PDF 转成可查询知识图谱的 Python 工具,并以斜杠命令形式注册到多种 AI 编程助手中。

Stars 136,432 累计 star,越多说明被认可得越广
Watching 411 订阅该仓库变动的人数
Forks 13,018 被派生出去的仓库数
Issues 1,611 当前开放的 Issue 数
语言 Python GitHub 自动判定的主语言
许可证 Apache-2.0 开源协议,用之前先确认能不能商用
24h 增长 +0 1 天前 136,432 星
7 日增长 — 数据积累中
30 日增长 — 数据积累中

仓库健康度

5 个维度
只看客观信号,不构成安全性结论
维护活跃度 数据完整
2026-10-26 23:18 最近推送

最近推送 2026-10-26 23:18(1 天前),属于活跃维护

社区响应 数据完整
1,611 开放 Issue

开放 Issue 1,611 个 · Fork 13,018 个

增长趋势 部分数据
+0 7 日新增

24 小时 +0 · 7 日 积累中 · 30 日 积累中

项目规范 数据完整
Apache-2.0 许可证

许可证 Apache-2.0 · 8 个 topics · 开了 Wiki

版本发布 证据不足
— 发布次数

这一项暂无数据,不代表项目没有发布

「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。

Star 趋势

6 天记录
最近 90 天站内记录的星数
136,432当前 Star +2,958首尾差值 2026-10-23最早记录 2026-10-28最近记录

横轴 2026-10-23 → 2026-10-28,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。

它解决什么问题

据 README 归纳
没有它会怎样

大型代码库的调用、导入、继承关系散落在几十种语言的文件里,文档、数据库结构和 PDF 中的知识又彼此割裂,人和 AI 助手都难以快速看清整体结构,也很难回答「某处改动会影响什么」这类问题。缺少统一的图结构,只能靠逐文件搜索和人工拼凑。

核心能力

7 条
归纳自 README,不是功能列表照抄
  1. 1用 tree-sitter 在本地确定性地解析约 40 种语言,跨文件解析调用、导入、继承和混入关系
  2. 2识别连接度最高的关键概念并按子系统切分社区,生成不带 LLM 的标签
  3. 3对 graph.json 执行提问、路径追踪和单概念解释三类查询
  4. 4把 NOTE、WHY 注释以及 ADR、RFC 引用建成节点并与代码相连
  5. 5将文档、PDF、图片、音视频一并映射进同一张图
  6. 6代码解析完全在本地进行、不出机器,仅文档和媒体的语义处理才调用后端
  7. 7按检测到的助手类型一次性安装斜杠命令,也支持把技能写进当前仓库

项目画像

6 个角度
决定要不要用之前,先看这六条

项目定位

一个把代码库连同文档、SQL 结构、配置和 PDF 转成可查询知识图谱的 Python 工具,并以斜杠命令形式注册到多种 AI 编程助手中。

适合谁

需要整体把握陌生或大型代码库架构的开发者,以及希望让 AI 编程助手基于共享图上下文回答架构问题、审阅变更的团队。

典型场景

接手一个多语言项目时,先跑一遍生成图与报告,快速看清高连接度节点和子系统划分;在评审 pull request 前查询图上下文,判断改动涉及的调用与依赖范围;用路径查询追踪两个模块之间的关系,或用解释查询弄清单个概念的作用;把生成的图提交或共享给团队,让成员和 AI 助手基于同一份上下文工作

部署难度

需先准备 Python 3.10+ 环境,推荐用 uv 或 pipx 安装命令行工具,再执行一次 install 让工具自动识别助手并注册技能,之后在助手里输入斜杠命令即可使用。

风险限制

需要 Python 3.10 及以上,推荐用 uv 或 pipx 安装;语义处理文档和媒体时必须自行配置后端,未配置则只覆盖代码部分。

最近维护

最近一次推送是 2026-10-26 23:18。 实现方式:先扫描扫描根目录,用 tree-sitter 生成 AST 并跨文件连接边,再对代码之外的材料做可选的语义处理,输出 graph.json 与汇总关键节点、社区和路径的 GRAPHREPORT.md,查询与解释都基于这份图数据完成。

README 原文细节

6 个板块
项目自己写的功能与用法,原文照录

核心功能README 里列出来的能力清单

What it does

  • 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

怎么安装从零跑起来的步骤

Install

The two-command quickstart is at the top of this README. This section covers the install methods, project-scoped installs, and every supported platform.

Then run graphify install once. It detects which assistant you run and registers the skill, so there is no per-assistant setup. Open your AI assistant and type /graphify .

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

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.

  • Claude Code (Linux/Mac) — graphify install
  • Claude Code (Windows) — graphify install (auto-detected) or graphify install --platform windows
  • CodeBuddy — graphify install --platform codebuddy
  • Codex — graphify install --platform codex
  • OpenCode — graphify install --platform opencode
  • Kilo Code — graphify install --platform kilo
  • GitHub Copilot CLI — graphify install --platform copilot
  • VS Code Copilot Chat — graphify vscode install
  • Aider — graphify install --platform aider
  • OpenClaw — graphify install --platform claw
  • Factory Droid — graphify install --platform droid
  • Trae — graphify install --platform trae
  • Trae CN — graphify install --platform trae-cn
  • Gemini CLI — graphify install --platform gemini
uv tool install graphifyy   # recommended, isolated env (if 'graphify' isn't found after, run: uv tool update-shell)
pipx install graphifyy      # alternative
pip install graphifyy       # may need PATH setup, see Troubleshooting below

Team setup

Commit or share the graph so your whole team queries the same context, and review pull requests with graph context. See Share context with your team and Review pull requests.

环境与依赖跑它之前要准备什么

Prerequisites

  • 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

配置项能调整哪些参数

Project configuration

Create a .graphifyrc in the scan root for settings that belong to the project rather than to one run. One key=value per line; lines beginning with # are comments.

Ambiguous extensions. Some extensions mean different languages in different projects: .inc is PHP on pfSense, Pascal in a Delphi tree, SQL or assembly elsewhere; .h is C or C++; .m is Objective-C or MATLAB. graphify has to pick one global default, and when it picks wrong the file does not fail: it parses as the wrong language and yields a handful of incidental nodes, so the graph looks populated while the real symbols are missing. Declare what the extension means in your repo:

The declaration flows through classification, extractor selection, grammar and resolution, imports, graphify watch, and the AST cache (a file re-parsed under a different language never reuses the old entry), and the same .graphifyrc is read by extract, update, the hooks, the MCP server, and the /graphify skill. A typo is reported once on stderr and the scan continues with the defaults. How declarations interact with caching, incremental rebuilds, and import resolution: Configuration.

# .graphifyrc
# A language name:
language.inc=php
# Or an extension graphify already knows:
language.tpl=.ts
# Baked into the git hooks (see Team setup):
viz_node_limit=0

限制与常见问题项目自己写明的坑与限制

Troubleshooting

Common install and extraction issues and their fixes: Troubleshooting.

其它说明README 里剩下的内容

概述

Cut agent token spend by 80%. Graphify Cloud is always-on memory that governs your agents, keeps code quality high, and proves correctness with formal verification. Start a free 14-day trial →

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.

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). Needs Python 3.10+ and uv (or pipx):

  • 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
  • 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.

See it in action

Once the graph is built you query it instead of reading files. Real output, graphify run on the FastAPI codebase shown above:

Every edge carries a confidence tag (EXTRACTED = explicit in the source, INFERRED = derived by resolution), so you can tell what was read directly from what was inferred. graphify query "" returns a scoped subgraph for a plain-language question, and graphify path A B traces how any two things connect.

关于 graphify 的常见问题

7 个问题
答案来自 README 归纳与 GitHub 实时数据
graphify 是做什么的?

一个把代码库连同文档、SQL 结构、配置和 PDF 转成可查询知识图谱的 Python 工具,并以斜杠命令形式注册到多种 AI 编程助手中。 大型代码库的调用、导入、继承关系散落在几十种语言的文件里,文档、数据库结构和 PDF 中的知识又彼此割裂,人和 AI 助手都难以快速看清整体结构,也很难回答「某处改动会影响什么」这类问题。缺少统一的图结构,只能靠逐文件搜索和人工拼凑。

graphify 有哪些功能?

核心能力:用 tree-sitter 在本地确定性地解析约 40 种语言,跨文件解析调用、导入、继承和混入关系;识别连接度最高的关键概念并按子系统切分社区,生成不带 LLM 的标签;对 graph.json 执行提问、路径追踪和单概念解释三类查询;把 NOTE、WHY 注释以及 ADR、RFC 引用建成节点并与代码相连;将文档、PDF、图片、音视频一并映射进同一张图;代码解析完全在本地进行、不出机器,仅文档和媒体的语义处理才调用后端;按检测到的助手类型一次性安装斜杠命令,也支持把技能写进当前仓库。

graphify 适合谁用?

需要整体把握陌生或大型代码库架构的开发者,以及希望让 AI 编程助手基于共享图上下文回答架构问题、审阅变更的团队。

graphify 是怎么工作的?

先扫描扫描根目录,用 tree-sitter 生成 AST 并跨文件连接边,再对代码之外的材料做可选的语义处理,输出 graph.json 与汇总关键节点、社区和路径的 GRAPHREPORT.md,查询与解释都基于这份图数据完成。

怎么安装 graphify?

按项目 README 的说明:Claude Code (Linux/Mac) — graphify install;Claude Code (Windows) — graphify install (auto-detected) or graphify install --platform windows;CodeBuddy — graphify install --platform codebuddy;Codex — graphify install --platform codex。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。

用 graphify 有什么门槛或限制?

需要 Python 3.10 及以上,推荐用 uv 或 pipx 安装;语义处理文档和媒体时必须自行配置后端,未配置则只覆盖代码部分。

graphify 现在还在维护吗?数据怎么样?

目前 136,432 星,13,018 个 Fork,主语言 Python,创建于 2026-04-03,最近一次推送 2026-10-26 23:18,许可证 Apache-2.0。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。

这些内容来自哪

读法说明
中文整理据 README 归纳,数据取自 GitHub
中文说明据项目 README 归纳只写 README 能确认的内容,不替作者补功能与数字
关键数据与 GitHub 页面一致星数、Fork、语言与时间都不做二次加工
数据日期2026-10-23 17:48星数与介绍这份数据是哪一天的

项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-10-23 17:48。