graphify

Graphify-LabsApache-2.0活跃维护

把代码库连同文档、SQL schema、配置和 PDF 一起解析成可查询的知识图谱,供 Claude Code、Cursor 等编码 Agent 做代码检索,全程本地 AST 解析、不依赖向量库。

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.

v0.9.105发布于 2026-11-09 17:04 UTC145,128star +1,465 / 7 天13,897fork同步于 2026-11-10 05:17 UTC

怎么上手

由 README 提炼,执行前请确认
uv tool install graphifyy
graphify install
硬件要求按 README 说明

README 未说明显存或 GPU 要求;代码解析完全本地运行,需 Python 3.10+。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把代码库连同文档、SQL、配置和 PDF 转成可查询知识图谱的 AI 助手技能

把代码库连同文档、SQL schema、配置和 PDF 一起解析成可查询的知识图谱,供 Claude Code、Cursor 等编码 Agent 做代码检索,全程本地 AST 解析、不依赖向量库。

核心能力

  • 用 tree-sitter AST 本地确定性解析代码,不调用 LLM
  • 每条边标注 EXTRACTED 或 INFERRED,可区分直接读取与推断
  • 不使用向量库和嵌入,直接遍历真实图谱查询
  • 一条命令注册技能,支持 Claude Code、Cursor、Codex 等 20+ 助手
  • 产出 graph.html、GRAPH_REPORT.md 和 graph.json 三个文件

容易踩的坑

PyPI 包名是 graphifyy(双 y),其他 graphify* 包非官方;用 uv 安装后若找不到 graphify 命令需运行 uv tool update-shell;Codex 用户需在 ~/.codex/config.toml 的 [features] 下设置 multi_agent = true 才能并行抽取。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.9.105
  1. v0.9.105graphify 0.9.105最新正式版2026-11-09 · 2026-11-09 17:04 UTC

    graphify 0.9.105

    • Fix: watch ignored directories (node_modules, .git, build output) are pruned from the Linux watch tree, so a large project no longer registers tens of thousands of wasted inotify watches and risks ENOSPC; the non-Linux recursive watcher is unchanged and still fires on every real change (#5074, #5091, thanks @Deepjyoti-Sarmah).

    • Fix: cpp a member-call chain routed through class fields declared in other headers (client.actions->Execute(), with value ., raw-pointer -> and single-arg unique_ptr/shared_ptr receivers) resolves to the field type's member across the include set, gated to a unique type and member and fail-closed otherwise; a typed local whose class is in another repo is parked for the cross-repo merge (#5098, thanks @xRedLeader).

    • Fix: markdown a code span naming an uppercase \-namespace class (\Foo\Bar, App\API) or a type-qualified method call (Type::member()) is kept as a symbol mention instead of being dropped, while a non-call Type::CONST/Type::class stays dropped (#5093, thanks @Adityakk9031).

    • Fix: ts/js a call through a destructured CommonJS barrel require (const { Thing } = require('./barrel') where the barrel re-exports Thing) resolves to the real declaration by following the barrel's exports, instead of dropping the edge (#5034, #5104, thanks @qq2514568380).

    • Fix: wiki the orphan sweep folds slugs with casefold (not lower), so two article names that collide only under full Unicode case-folding (Straße/STRASSE, Σ/ς) each keep their own file instead of one being deleted as an orphan; a file written this run is never swept (#5087, #5102, thanks @nothariharan).

    • Fix: build hyperedges are kept whole across an incremental graphify update: they are read from the nested graph slot a JSON-only writer uses, and after a deleted-source prune a hyperedge drops only its removed members (and itself only when none remain), instead of silently losing or leaving dangling hyperedges (#5081, #5103, thanks @nothariharan).

    • Fix: cache a degraded (under-producing) semantic cache entry no longer pins the corpus: after the shrink guard sees a re-extraction come back smaller than the stored graph, the entry is stamped partial so the next run re-dispatches it instead of replaying the degraded result forever (#5083, #5101, thanks @nothariharan).

    • Fix: affected graphify affected <file> seeds the file's nested member nodes (a method inside a class) transitively, not just one hop, so impact analysis no longer under-reports callers that bind to a nested member (#5094, thanks @Adityakk9031).

    • Fix: tree build_tree derives the common directory root from file parents, so a single-file or single-directory tree is no longer self-nested under the file itself (#5092, thanks @Adityakk9031).

    • Fix: query a label whose name is behind a schema or namespace qualifier (public.sweep_widget_state(), fmt.Println) is matched on its tail by the whole query and ranked above the per-token tiers, so it is no longer out-competed by single-token collision nodes and dropped from the seeds (#5080, #5095, thanks @sunhouy).

    • Fix: detect an incremental staleness check hashes a file whose stamp lands within the clock-skew window on either side of its mtime, so a same-tick rewrite that does not move mtime is still caught instead of being served stale (#5090, thanks @sunhouy).

    • Fix: path graphify path A B refuses an endpoint whose words appear nowhere in the graph (exit not-found) instead of returning a misleading route built from loosely-overlapping tokens (#5085, thanks @sunhouy).

    • Fix: csharp a classic extension-method call (x.Foo() where Foo is declared static ... Foo(this X x, ...)) binds to the extension method's declaration through an additive pass that runs after nominal dispatch, gated to a visible namespace, a matching this type and a unique applicable method; an instance method of the same name wins, a non-exte

  2. v0.9.104graphify 0.9.1042026-11-08 · 2026-11-08 00:42 UTC
    查看更新说明

    graphify 0.9.104

    • Security: skill the /graphify runbook no longer substitutes the scan path into Python code. Every generated code block (detect, AST and semantic extraction, build, diagnose, label, manifest, and --update) now reads the resolved scan root from the trusted graphify-out/.graphify_root sidecar that Step 1 writes through a quoted heredoc, instead of pasting the agent-supplied path into a string literal. A directory whose name carried a quote or $(...) could previously break out of Path('INPUT_PATH') and run as code; it is now read as inert data. Covers the assembled hosts and the Aider/Devin monoliths (#4762, thanks @danikdanik).
    • Fix: solidity a call on a receiver of a contract or interface type (IERC20 token; token.transfer(), IERC20(a).transfer(), token().balanceOf()) binds by name and arity through that type's linearization to the type's own declaration, instead of producing no edge; gated to a single visible contract/interface and fail-closed on an unknown or ambiguous type (#5060, thanks @rohit-jsfreaky).
    • Fix: solidity a call attached by a using A for T directive (using SafeCast for uint256; x.toUint48()) binds to the library or free function it attaches, matched by the receiver's type and an arity one greater than the call; fail-closed when the receiver type is unknown, the library is ambiguous, or two functions fit (#5062, thanks @rohit-jsfreaky).
    • Fix: solidity members, free functions and types in one scope whose names differ only by a leading _ or by case (_grantRole / grantRole) get separate node ids, so the _ symbol no longer vanishes into its twin and its calls land on the right node (#5027, thanks @rohit-jsfreaky).
    • Fix: csharp a constructor (instance, static or primary) is its own node owned by its type, with its body and : base(...)/: this(...) calls credited to it; new X(...), : base(...) and : this(...) additively link the arity-correct overload, and two fitting overloads or an unresolved base give no constructor edge (#5054, thanks @rohit-jsfreaky).
    • Fix: csharp calls inside a property or indexer accessor, an expression body, or an operator/conversion body are credited to that member instead of being lost; an indexer becomes a this[] node and an operator a .operator +() node (#5056, thanks @rohit-jsfreaky).
    • Fix: query a same-label node that is the only match for a query term is kept as a seed instead of being dropped by the per-label cap, so every distinct term keeps at least one seed while generic-label flooding stays capped (#5027, thanks @Vaibhav2824).
    • Fix: watch read-only events are kept out of the inotify mask via a change-only event_filter, so a large tree no longer drives watchdog into a self-sustaining queue-overflow loop; falls back with a warning on watchdog versions without event_filter support (#5033, thanks @Deepjyoti-Sarmah).
    • Fix: cache the \\?\ long-path spelling is kept out of cache identity, so the same file reached through \\?\C:\... and C:\... shares one entry; also fixes empty stat-index writes under UNC shares, a spurious "stat index switched" warning on Windows, and a junction/symlink alias wrongly sharing its target's digest (#5035, thanks @Bortlesboat).
    • Fix: cache stat-index keys stay root-relative under a Windows long-path root, so a moved or cloned corpus keeps the portable-key fastpath (#5035, thanks @Vaibhav2824).
    • Fix: tests the TypeScript unicode fixture is written as UTF-8 on every platform, so byte offsets match the extractor on Windows (cp1252) hosts (#5064, thanks @ayushcodes10).
    • Fix: tests the hook-freshness source mock is normalized through os_long_path, so the read-error/stale branch is actually exercised on Windows (#5065, thanks @ayushcodes10).
    • Fix: tests the watch pending-queue test compares Path objects so / and \ separators compare equal on Windows (#5039, thanks @Yi-111-a).
    • Fix: extract an ambiguous Python import'
  3. v0.9.103graphify 0.9.1032026-11-05 · 2026-11-05 16:35 UTC
    查看更新说明

    graphify 0.9.103

    A broad correctness, performance and robustness release across the extractors, resolution, hooks, the query and update paths, install and the skill runbook.

    Extractors

    • C#: preprocessor directives and #if branches that derail tree-sitter are blanked before parsing (byte-length preserving), so a directive no longer closes a class early and drops later members or calls.
    • Solidity: library calls (Lib.f(), including aliased imports) and emit/revert/require naming a declared event or error now link to the member they name, gated to a unique visible type and member.
    • YAML: a << merge sequence gives the earlier anchor precedence for a duplicated key, matching the spec and PyYAML.
    • Markdown: a code span written as a backslash namespace (\Foo\Bar) or a type-qualified member (Type::member) resolves to the real node; a dotted mention whose method name is a language builtin is no longer dropped.
    • Python: a bare builtin-named call (raise NotImplementedError(...)) no longer binds to a same-named class in another module unless imported.

    Resolution

    • A call inside a top-level def _main() is attributed to _main, not the public main it collides with after id normalization, without misattributing a class member's type reference.

    Hooks

    • A file unchanged in content is not re-flagged stale by mtime (the extraction hash is checked against the manifest).
    • A dedicated Grep is held to the strict orientation gate; a Bash file read (cat/head/sed -n) of an in-project code file gets the read nudge; a search whose every target is outside the project emits no project hint; the nudge budget is restored after a Claude Code compaction; and the toplevel anchor keeps working when CDPATH is exported.

    Performance

    • Lower peak memory in load, resolution and extraction; a faster #3252 cross-file repoint; and the watch reconcile pass resolves AST ownership once per file instead of re-reading each header per node — all with identical graph output.

    Update / build / cache

    • graphify update re-extracts only the files whose content changed (identical to a full rebuild); a contended incremental request is recorded instead of dropped. The build write guard no longer counts intentional ghost/dedup folds as drops; cache keys keep their written case.

    Query / tree

    • Source nodes rank above tests and docs (a soft weight) with file-first answers; query reads query_budget/query_depth from .graphifyrc and gains --depth. export tree caps directory children while reporting full totals.

    Install / thread-safety

    • The Pi project skill is written to .pi/skills; uninstall removes the global skill registration it wrote. The ambient scan root is held in a ContextVar so concurrent library callers extracting different roots do not clobber each other.

    The AST cache schema is bumped to 39; warm caches re-run the affected extractions.

    Thanks to @rohit-jsfreaky, @Deepjyoti-Sarmah, @xiongjianxu, @nothariharan, @andrebrait, @ajbmachon, @Shubham-Padkonde, @madhusudanpatnaik, @pei711, @Mpasha17, @ayushcodes10, @gitmotion, @briascoi, @oleksii-tumanov, @rohit-jsfreaky, @viwe-monai, @WyattAu, @Vivek1898, @wanjinhao1, @PratikDhanave, @HhH666-ux, @sunhouy, @mathewgeejo, @jinsoo and @AndresDiagoM.

  4. v0.9.102graphify 0.9.1022026-11-03 · 2026-11-03 22:46 UTC
    查看更新说明

    graphify 0.9.102

    A large correctness, performance and workflow release spanning the extractors, the query layer, incremental update, the hooks, the skill runbook and install.

    Call-resolution (extractors)

    • go: same-file member calls resolve through the receiver's type; cross-package pkg.T receivers bind only via the file's import; interface method calls dispatch to implicit implementers (#4966, #4853, #4934).
    • rust: module-qualified calls (crate::b::helper()) resolve cross-file; calls inside expression-macro arguments are linked (#4944, #4945).
    • kotlin: overloaded and init {}-block calls resolve; unreachable external-inherited calls are dropped (#4956).
    • python: a module-level singleton's member calls resolve through its type; a bare method call no longer self-binds (#4972, #4933).
    • js/ts: class extends through a CommonJS require resolves; a typed tagged template and an import("mod").T<X> annotation no longer half-parse or mint a false dynamic_import edge; default-exported object methods resolve (#4700, #4976, #4967).
    • solidity: ../ imports resolve to the real file (#4985).
    • cpp: receiver typing from params/fields, split-header owner binding, local-callable suppression, type-alias exact-spelling (#4946, #4920, #4921, #4951).

    Query

    • Source nodes rank above tests and docs (a soft weight, not exclusion), and answers are file-first (#4982).
    • graphify query reads query_budget/query_depth from .graphifyrc and gains a --depth flag (#4760).

    Incremental update / watch

    • graphify update re-extracts only the files whose content changed, with a graph identical to a full rebuild; a contended incremental request is recorded instead of dropped (#4800, #4801, #4802).

    Build / cache

    • The write guard no longer counts intentional ghost folds or dedup folds as dropped nodes; independently-sourced semantic evidence survives a fold; cache keys are case-preserving (#4957, #4952, #4927, #4950, #4937).

    Hooks

    • A file unchanged in content is not re-flagged stale by mtime; a dedicated Grep is held to the strict orientation gate; external searches emit no project hint (#4974, #4973, #4979).

    Performance

    • Lower peak memory in load, resolution and extraction, and a faster cross-file repoint — all with identical output (#4960, #4958, #4959, #4981).

    Skill / install

    • The --update runbook re-queues partly-read docs instead of stamping them done; Step 4 threads --force; a hub-bypass report is added; uninstall removes the global skill registration (#4816, #4805, #4704, #4975).

    The AST cache schema is bumped to 37; warm caches re-run the affected extractions.

    Thanks to @nothariharan, @Deepjyoti-Sarmah, @xiongjianxu, @andrebrait, @ajbmachon, @Shubham-Padkonde, @rohit-jsfreaky, @oleksii-tumanov, @madhusudanpatnaik, @pei711, @Mpasha17, @ayushcodes10, @gitmotion, @briascoi, @madhusudanpatnaik, @AndresDiagoM, @azizur100389, @Ethan-Ethan-Ethan, @jinsoo and @rohit-jsfreaky.

  5. v0.9.101graphify 0.9.1012026-11-02 · 2026-11-02 19:38 UTC
    查看更新说明

    graphify 0.9.101

    Resolution-accuracy and cache-correctness release across C++, Rust, Python, Go, the build write guard, and incremental rebuilds.

    C++

    • A member call x.m() binds by the receiver's type, now typed from function parameters and class fields and not only locals (void render(Base* b){ b->draw(); } resolves to Base::draw); an untyped or ambiguous receiver keeps its in-file binding (#3215, #4946).
    • An out-of-line or split-header definition attaches to the unique owner whose class file is in its include set, instead of cross-binding to an unrelated same-named function; ambiguous owners fail closed (#4916, #4920).
    • A local callable value (a lambda or std::function) is kept out of global call resolution by byte-range binding lifetimes, so it no longer mints a spurious INFERRED call to a same-named global; a later legitimate global call survives (#4917, #4921).
    • A type-alias reference (using Foo = Bar; then Foo x;) binds by exact spelling and a salted alias keeps its own contains edge (#4951).

    Rust

    • A module-qualified call (crate::b::helper(), super::m::f()) resolves through qualifier-verified cross-file resolution, staying inside the caller's crate (#2135, #4944).
    • A call written inside an expression macro's arguments (println!("{}", f()), vec![g()]) is linked, gated to an allowlist so macro_rules! bodies and custom DSLs are left alone (#4945).

    Python / Go

    • A bare call inside a method no longer self-binds to a same-named method; it resolves to the imported or module-level function it names (#4933).
    • Imports resolve across PEP 420 namespace packages split over multiple src/ roots (#4929).
    • A Go method value reached through a receiver field is linked as an indirect_call (#1566, #4931).
    • A Go package-level var initialiser references the types it names (#2360, #4932).

    Build / cache / rebuild / watch

    • The write guard no longer refuses a healthy graph when entity dedup folds a saved node into a surviving twin; a genuine loss is still refused (#4940, #4952).
    • Independently sourced semantic file evidence survives a fold into an AST file-self node; ordinary INFERRED mention ghosts still fold so graphs do not accumulate duplicates (#4896, #4927).
    • The file-stem alias index only rebinds an edge when the edge's file and the alias target share a language family (#4949).
    • Cache keys keep their written case so README.md and readme.md no longer collide, and hashed/word-count files are opened through os_long_path (#4925, #4937).
    • A --code-only graph stays code-only across hook, update and watch rebuilds (#4923, #4939).
    • A rebuild no longer waits forever when msvcrt.locking is unsupported (#4924, #4926).
    • A full reconcile evicts source records for an excluded linked git worktree (#4919).
    • AST-only updates preserve cross-file semantic evidence whose node id collides with a code definition (#4950).
    • A sliced file is cached only once every slice has succeeded and is assembled in chunk order (#4943, #4947).

    The AST cache schema is bumped to 36; warm caches re-run the affected extractions.

    Thanks to @nothariharan, @Deepjyoti-Sarmah, @azizur100389, @andrebrait, @ayushcodes10, @madhusudanpatnaik, @Ethan-Ethan-Ethan and @AndresDiagoM.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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 | עברית

    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.

    [!NOTE] Want this always-on? Graphify Cloud keeps the graph live across your entire SDLC: monorepo and cross-repo support, formal verification, and code review with a bird's-eye view of your SDLC, plus connectors for Sentry, Jira, and more so incidents and tickets sit in the same graph as your code. Start a free 14-day trial at app.graphify.com.

    Get started (30 seconds). Needs Python 3.10+ and uv (or pipx):

    uv tool install graphifyy      # install the CLI (or: pipx install graphifyy)
    graphify install               # detects your assistant and registers the skill
    

    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
    

    The persisted graph includes graph.schema_version so integrations can detect incompatible format changes, plus graph.graphify_version identifying the Graphify release that produced it.

    One install, any assistant, any OS. Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and 20+ more, on macOS, Linux, and Windows: pick your platform.


    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:

    $ graphify explain "APIRouter"
    Node: APIRouter
      Source:    routing.py L2210
      Community: 2
      Degree:    47
    
    Connections (47):
      --> RequestValidationError [uses] [INFERRED]
      --> Dependant [uses] [INFERRED]
      --> .get() [method] [EXTRACTED]
      <-- __init__.py [imports] [EXTRACTED]
      ...
    
    $ graphify path "FastAPI" "ModelField"
    Shortest path (3 hops):
      FastAPI --uses--> DefaultPlaceholder <--references-- get_request_handler() --references--> ModelField
    

    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 "<question>" returns a scoped subgraph for a plain-language question, and graphify path A B traces how any two things connect, ending with the path's overall confidence: that of its weakest hop.


    What it does

    What you get out of the box:

    CapabilityWhat you get
    God nodesThe most-connected concepts, so you see what everything flows through
    CommunitiesThe graph split into subsystems (Leiden), with LLM-free labels
    Cross-file linkscalls / imports / inherits / mixes_in resolved across ~40 languages via tree-sitter AST
    Query, path, explainAsk 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 codeDocs, PDFs, images, and video/audio all map into the same graph
    Local-firstCode 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

    [!TIP] Running this across many repos or a monorepo? Graphify Cloud does it continuously and cuts agent token spend by 80%, with cross-repo links, SDLC-wide code review, formal verification, and Sentry/Jira connectors. Start a free 14-day trial →


    Benchmarks: 0.497 recall@10, 0 LLM credits

    BenchmarkMetricgraphifyField
    LOCOMO (n=300)recall@100.497mem0 0.048, supermemory 0.149
    LOCOMO (n=300)QA accuracy45.3%supermemory 49.7%, mem0 27.3%
    LongMemEval-S (n=50)QA accuracy76%tied with dense RAG
    ERPNext cross-tool (n=6)key-fact coverage82.0%grep/read baseline 70.8%
    Graph buildLLM credits0per-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.


    Documentation

    Full guides and reference live at docs.graphify.com:


    Prerequisites

    RequirementMinimumCheckInstall
    Python3.10+python --versionpython.org
    uv (recommended)anyuv --versioncurl -LsSf https://astral.sh/uv/install.sh | sh
    pipx (alternative)anypipx --versionpip install pipx

    macOS quick install (Homebrew):

    brew install [email protected] 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

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

    The official source repository is Graphify-Labs/graphify.

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

    Install methods (pick one):

    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
    

    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:

    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.

    [!TIP] Hitting command not found, a pip-on-Mac/Windows issue, PowerShell quoting, uvx usage, git-hook PATH quirks, or strict mode? See Installation and Troubleshooting.

    PlatformInstall command
    Claude Code (Linux/Mac)graphify install
    Claude Code (Windows)graphify install (auto-detected) or graphify install --platform windows
    CodeBuddygraphify install --platform codebuddy
    Codexgraphify install --platform codex
    OpenCodegraphify install --platform opencode
    Kilo Codegraphify install --platform kilo
    GitHub Copilot CLIgraphify install --platform copilot
    VS Code Copilot Chatgraphify vscode install
    Aidergraphify install --platform aider
    OpenClawgraphify install --platform claw
    Factory Droidgraphify install --platform droid
    Traegraphify install --platform trae
    Trae CNgraphify install --platform trae-cn
    Gemini CLIgraphify install --platform gemini
    Hermesgraphify install --platform hermes
    Kimi Codegraphify install --platform kimi
    Ampgraphify amp install
    Agent Skills (cross-framework)graphify install --platform agents (alias --platform skills)
    Kiro IDE/CLIgraphify kiro install
    Pi coding agentgraphify install --platform pi, plus graphify pi guard install for the native guard
    Cursorgraphify cursor install
    Devin CLIgraphify devin install
    Google Antigravitygraphify antigravity install
    Google Antigravity (Windows)graphify antigravity install (auto-detected on Windows)

    Codex users also need multi_agent = true under [features] in ~/.codex/config.toml for parallel extraction. CodeBuddy uses the same Agent tool and PreToolUse hook mechanism as Claude Code. Factory Droid uses the Task tool for parallel subagent dispatch. OpenClaw and Aider use sequential extraction (parallel agent support is still early on those platforms). Trae uses the Agent tool for parallel subagent dispatch and does not support PreToolUse hooks, so AGENTS.md is the always-on mechanism.

    --platform agents (alias --platform skills) targets the generic cross-framework Agent-Skills locations: the spec's user-global ~/.agents/skills/ (read by npx skills and spec-compliant frameworks) for a global install, and ./.agents/skills/ for a project (--project) install. The bare graphify install stays single-platform (Claude Code) by design: use the named agents platform when you want the skill discoverable by any framework that reads .agents/skills.

    Claude Code's graphify install --project --strict makes Read and dedicated Grep share one denial per session unless a recent graph query has oriented the agent (default 30 minutes). A Grep over a directory needs no indexed-file match; a Grep pinned to a single file is denied only when the graph indexes that file, as with Read. External and graph-output Grep targets produce neither a deny nor a nudge, in soft mode as well as strict mode, matching Read's scope. A graph marked needs_update never triggers a Grep denial. Bash searches and Glob stay advisory. GRAPHIFY_HOOK_STRICT=1 enables the policy without reinstalling; GRAPHIFY_HOOK_STRICT=0 disables it even when installed with --strict. Existing strict installs need a reinstall to add the search hook's --strict flag, or the environment override. Soft nudges are capped per session (GRAPHIFY_HOOK_NUDGE_CAP, default 5). After a context compaction, a SessionStart hook (matcher compact) resets that budget, the subagents' budgets and the strict denial, since the compacted context no longer holds the earlier nudges.

    Pi has no PreToolUse hook, so graphify pi guard install registers a native Pi extension (via Pi's own pi install <package directory>) that runs the installed graphify hook-guard before Pi's read, grep, find and search-style bash calls. Fresh/stale graph decisions and the GRAPHIFY_HOOK_STRICT=1 once-per-session denial shared by indexed Read and dedicated Grep come from that same policy, so Pi matches Claude Code's hook behavior; Bash and file listing remain advisory. Guidance arrives as a <system-reminder source="graphify"> steering message. It needs Pi 0.58.4 or newer: earlier versions let a steering message skip the rest of a parallel tool-call batch. The package ships inside the Graphify installation, so install Graphify persistently (uv tool install graphifyy or pipx install graphifyy, not uvx), restart Pi after installing or upgrading, and remove it with graphify pi guard uninstall. Only local file targets are inspected; the hook needs graphify on an absolute PATH entry outside the project, is bounded to a two-second, 256 KiB-in/64 KiB-out call, and fails open. The same package also loads in Oh My Pi: omp plugin install "$(graphify pi guard path)". The registered path contains the Python version and venv, so re-run graphify pi guard install after changing either, and remove the old entry with pi remove <old path>.

    Codex uses $graphify instead of /graphify.

    ExtraWhat it addsInstall
    pdfPDF extractionuv tool install "graphifyy[pdf]"
    office.docx and .xlsx supportuv tool install "graphifyy[office]"
    googleGoogle Sheets renderinguv tool install "graphifyy[google]"
    videoVideo/audio transcription (faster-whisper + yt-dlp)uv tool install "graphifyy[video]"
    mcpMCP stdio serveruv tool install "graphifyy[mcp]"
    watchAuto-rebuild on file changes (graphify watch)uv tool install "graphifyy[watch]"
    neo4jNeo4j push supportuv tool install "graphifyy[neo4j]"
    falkordbFalkorDB push supportuv tool install "graphifyy[falkordb]"
    svgSVG graph exportuv tool install "graphifyy[svg]"
    leidenLeiden community detection (graspologic on Python < 3.13; native backend on 3.13+)uv tool install "graphifyy[leiden]"
    ollamaOllama local inferenceuv tool install "graphifyy[ollama]"
    openaiOpenAI / OpenAI-compatible APIsuv tool install "graphifyy[openai]"
    geminiGoogle Gemini APIuv tool install "graphifyy[gemini]"
    anthropicAnthropic Claude API (--backend claude, uses ANTHROPIC_API_KEY)uv tool install "graphifyy[anthropic]"
    bedrockAWS Bedrock (uses IAM, no API key)uv tool install "graphifyy[bedrock]"
    azureAzure OpenAI Service (--backend azure, uses AZURE_OPENAI_API_KEY + AZURE_OPENAI_ENDPOINT)uv tool install "graphifyy[openai]"
    sqlSQL schema extractionuv tool install "graphifyy[sql]"
    postgresLive PostgreSQL introspection (--postgres DSN)uv tool install "graphifyy[postgres]"
    dmBYOND DreamMaker .dm/.dme AST extraction (may need a C compiler + python3-dev if no wheel matches your platform)uv tool install "graphifyy[dm]"
    terraformTerraform / HCL .tf/.tfvars/.hcl AST extractionuv tool install "graphifyy[terraform]"
    pascalPascal / Delphi .pas/.dpr/.dpk/.inc AST extraction (more accurate calls/inherits edges; falls back to a regex extractor when absent)uv tool install "graphifyy[pascal]"
    ocamlOCaml .ml/.mli AST extractionuv tool install "graphifyy[ocaml]"
    commonlispCommon Lisp .lisp/.cl/.lsp/.asd AST extractionuv tool install "graphifyy[commonlisp]"
    robotRobot Framework .robot/.resource extraction (suites, test cases, keywords, keyword-call and resource/library import edges)uv tool install "graphifyy[robot]"
    chineseChinese query segmentation (jieba)uv tool install "graphifyy[chinese]"
    allEverything aboveuv tool install "graphifyy[all]"

    Make your assistant always use the graph

    Run this once in your project after building a graph:

    Run graphify <platform> install once in your project, for example graphify claude install or graphify codex install (or graphify install --platform <name>).

    This writes a small config file that tells your assistant to consult the knowledge graph for codebase questions, preferring scoped queries like graphify query "<question>" over reading the full report or grepping raw files.

    • Hook platforms (Claude Code, Gemini CLI): a hook fires automatically before search-style tool calls (and, on Claude Code, before reading source files one by one via the Read/Glob tools, or via cat, head, tail, sed -n and similar readers in Bash) and nudges your assistant toward the graph path.
    • Instruction-file platforms (Codex, OpenCode, Cursor, etc.): persistent instruction files (AGENTS.md, .cursor/rules/, etc.) provide the same query-first guidance.

    GRAPH_REPORT.md is still available for broad architecture review.

    Exactly which files each platform writes (CodeBuddy's CODEBUDDY.md + PreToolUse hooks, Codex's AGENTS.md, Kilo's native .kilo plugin, Cursor's alwaysApply rule, and so on) is covered in Always-on setup.

    To remove graphify from all platforms at once: graphify uninstall (add --purge to also delete graphify-out/). Or use the per-platform command (e.g. graphify claude uninstall).

    CLI skills or MCP instructions?

    The instructions installed by graphify install and those supplied with a Graphify MCP connection describe different ways to query a graph:

    SetupGuidance to useQuery access
    Local CLI and installed assistant skillThe platform instructions written by graphify installRun graphify query, graphify path, and graphify explain against the local graph (graphify-out/ by default).
    Connected Graphify MCP serverThe connection's instructions and the tools listed by that serverCall the listed MCP tools against the graph served by that connection. Tool names and descriptions come from the server.

    Both encourage scoped graph queries before broad source searches. Choose the instructions that match the tools your assistant can actually access; neither block establishes a universal precedence rule for your assistant's instruction files. If you use both integrations, identify which graph each queries and choose a primary query path instead of copying two unconditional instruction blocks into AGENTS.md.

    graphify install installs the local assistant integration; it does not establish an MCP connection. An MCP client does not need to run local CLI queries to use its connected server. A locally hosted server still needs its own Graphify installation and graph, while a hosted connection may serve a graph that is not present in the client's working directory. If the expected tools are missing, check the relevant CLI installation or MCP connection rather than treating the other setup's instructions as interchangeable.


    What's in the report

    GRAPH_REPORT.md summarizes the god nodes, communities, and key paths for broad architecture review. How the graph is built and what it contains: How graphify works.


    What files it handles: ~40 languages

    graphify parses ~40 programming languages locally with tree-sitter AST, and maps docs, PDFs, images, and audio/video through an optional semantic pass. Full list: Supported inputs.


    Common commands

    /graphify .                        # build graph for current folder
    /graphify ./docs --update          # re-extract only changed files
    /graphify . --cluster-only         # rerun clustering without re-extracting
    /graphify . --cluster-only --resolution 1.5      # more granular communities
    /graphify . --cluster-only --exclude-hubs 99     # suppress utility super-hubs from god-node rankings
    /graphify . --no-viz               # skip the HTML, just the report + JSON
    /graphify . --wiki                 # build a markdown wiki from the graph
    graphify export callflow-html      # Mermaid architecture/call-flow HTML (auto-regenerates on every git commit if hook is installed)
    
    /graphify query "what connects auth to the database?"
    /graphify path "UserService" "DatabasePool"
    /graphify explain "RateLimiter"
    
    /graphify add https://arxiv.org/abs/1706.03762   # fetch a paper and add it
    /graphify add <youtube-url>                       # transcribe and add a video
    
    graphify hook install              # auto-rebuild on commit + branch checkout (run `graphify update .` after `git pull`: see "Recommended workflow" below)
    graphify merge-graphs a.json b.json              # combine two graphs
    
    graphify prs                       # PR dashboard: CI state, review status, worktree mapping
    graphify prs 42                    # deep dive on PR #42 with graph impact
    graphify prs --triage              # AI ranks your review queue (uses whatever backend is configured)
    graphify prs --conflicts           # PRs sharing graph communities: merge-order risk
    

    See the full command reference below.


    Labeling and rendering limits

    • --batch-size: 100 communities per labeling call by default, sized for a ~16k-token context (~150 tokens/community). Use --batch-size 40 for an 8k window. Context overflow is not split-retried; failed batches keep hub-derived names.
    • --missing-only: label --missing-only keeps existing labels and names only unnamed / Community N entries. Use label (full relabel) to refresh names after the community set changes.
    • .graphify_labels.json.sig: records the community membership signature; labels survive a re-cluster only while it matches.
    • export html: 5,000-node default; above it graphify renders an aggregated community view. Use --node-limit N. GRAPHIFY_VIZ_NODE_LIMIT / .graphifyrc viz_node_limit=N apply to cluster-only, update, watch, and hooks, not export html.
    • Leiden fallback: without the leiden extra, clustering silently uses networkx Louvain. Switching later reshuffles every community, so plan a full relabel.

    Ignoring files

    graphify honors .gitignore and supports --exclude patterns and a project .graphifyignore. Details: Configuration.

    graphify extract reports paths skipped by ignore rules, with up to three sorted examples relative to the scan root. Each pruned directory counts once; its contents are not enumerated. Default noise directories such as node_modules are excluded from this summary. If source is missing, review the ignore rules. --no-gitignore bypasses VCS ignore rules only; .graphifyignore and --exclude remain effective.

    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:

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

    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.

    Query defaults. Set query_budget to a positive integer and query_depth to an integer from 1 to 6:

    query_budget=4000
    query_depth=3
    

    For graphify query, explicit --budget N / --budget=N and --depth N / --depth=N override these settings independently. Without a project setting or explicit option, the defaults remain budget 2000 and depth 2. These keys do not change the MCP server's defaults.

    Settings come from the project owning the selected --graph, even when the command runs from another directory. An existing absolute directory in the graph's sibling .graphify_root marker identifies that project. Otherwise a matching relative GRAPHIFY_OUT suffix identifies it; absolute, empty, traversal-containing or nonmatching output paths fall back to the graph file's directory. Relative markers are ignored.

    The query command always reads that project's .graphifyrc. An invalid recognized setting or an unreadable file produces one stderr warning and discards all project settings for that query; explicit options still apply. The settings parser stays strict for its other callers. Existing explicit budget values retain their behavior; persisted query_budget values must be positive.


    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.


    Using the graph directly

    Beyond your AI assistant, query graph.json straight from the CLI with graphify query, graphify path, and graphify explain. A name that matches several nodes is refused with the candidates listed rather than guessed. Scripts can read the outcome from the exit code: 0 an answer, 3 an ambiguous name, 4 no matching node. See Ask better graph questions and the query reference.


    Environment variables

    Backends, API keys, hook behavior, and tuning are controlled by environment variables. Full table: Configuration.

    • Claude API prompt caching: GRAPHIFY_CLAUDE_PROMPT_CACHE controls system-prompt caching for --backend claude. Unset or blank keeps caching enabled; 1, true, yes, or on explicitly enables it, and 0, false, no, or off disables it (case-insensitive, surrounding whitespace ignored). Invalid values raise an error before sending a request. For example, run GRAPHIFY_CLAUDE_PROMPT_CACHE=0 graphify extract . --backend claude when an Anthropic-compatible endpoint rejects cache_control. Disabling sends the original plain-text system prompt. The setting applies equally to official Anthropic and custom ANTHROPIC_BASE_URL / ANTHROPIC_MODEL endpoints, including deep mode; it does not affect Bedrock, Claude CLI, or Graphify's local extraction cache. Enabling requests caching but cannot guarantee cache hits: the endpoint/model must support it and the prompt must meet its minimum length. Unsupported caching errors are not silently retried without caching.
    • Claude CLI model: GRAPHIFY_CLAUDE_CLI_MODEL overrides the model for the claude-cli backend (default: Opus). haiku or sonnet are usually enough for community naming; the semantic extraction pass benefits from a larger model.

    Privacy

    • Code files: processed locally via tree-sitter. Nothing leaves your machine. A code-only corpus requires no API key: graphify extract runs fully offline. On a mixed repo, add --code-only to index just the code and skip the docs/PDFs/images that would otherwise need an LLM.
    • Video / audio: transcribed locally with faster-whisper. Nothing leaves your machine.
    • Docs, PDFs, images: sent to your AI assistant for semantic extraction (via the /graphify skill, using whatever model your IDE session runs). Headless graphify extract requires GEMINI_API_KEY / GOOGLE_API_KEY (Gemini), MOONSHOT_API_KEY (Kimi), ANTHROPIC_API_KEY (Claude), OPENAI_API_KEY (OpenAI), DEEPSEEK_API_KEY (DeepSeek), a running Ollama instance (OLLAMA_BASE_URL), AWS credentials via the standard provider chain (Bedrock - no API key needed, uses IAM), or the claude CLI binary (Claude Code - no API key needed, uses your Claude subscription). The --dedup-llm flag uses the same key.
    • Data residency: graphify extract auto-detects which provider to use based on which API key is set (priority: Gemini → Kimi → Claude → OpenAI → DeepSeek → Azure → Bedrock → Ollama). When it auto-detects, it prints the exact environment variable that chose the provider, so a run is never a surprise. To choose explicitly, pass --backend, or set GRAPHIFY_BACKEND=<name>; set GRAPHIFY_BACKEND=none to disable all LLM backends (semantic extraction and the claude -p labeling fallback) and keep a code-only graph. For code with data-residency requirements, use GRAPHIFY_BACKEND=ollama / --backend ollama (fully local). Kimi (MOONSHOT_API_KEY) routes to Moonshot AI servers in China.
    • No telemetry, no usage tracking, no analytics.
    • Query logging: every graphify query, graphify path, graphify explain, and MCP query_graph call is logged to ~/.cache/graphify-queries.log in JSON Lines format (timestamp, question, corpus, nodes returned, duration). Full subgraph responses are not stored by default. Set GRAPHIFY_QUERY_LOG_DISABLE=1 to opt out, or GRAPHIFY_QUERY_LOG=/dev/null to silence without disabling the code path.

    Troubleshooting

    Common install and extraction issues and their fixes: Troubleshooting.


    Full command reference

    Every command and flag, with examples: CLI reference.


    Learn more


    Graphify Cloud

    Graphify Cloud is the always-on layer built on top of graphify. Instead of a graph you rebuild on demand per folder, it keeps one live graph across your entire software development lifecycle:

    • 80% fewer tokens: always-on memory means your agents stop re-reading and re-explaining the codebase every session.
    • Monorepo and cross-repo: one connected graph across every service and repository, not a graph per folder.
    • Formal verification: check architectural and dependency invariants against the live graph.
    • Code review with a bird's-eye view of your SDLC: see how a change ripples across the whole system before you merge.
    • SDLC connectors: pull in Sentry, Jira, and more, so incidents, tickets, and code live in one graph.
    • Always-on: updates continuously in the background across code, docs, and meetings.

    Start a free 14-day trial at app.graphify.com →


    Contributing

    Contributions are welcome. See CONTRIBUTING.md for the development setup, the test and CI-parity commands, the git workflow, and what makes a strong contribution (worked examples and extraction bug reports are the most useful). Architecture and how to add a language: ARCHITECTURE.md.

    New here? Say hi on Discord or in GitHub Discussions.


    Contributors

    Made with contrib.rocks.


    Translations

    The README is available in 32 languages. Use the language switcher at the top of this file to read it in yours, or browse docs/translations/. To improve a translation or add a new one, open a pull request against the matching file there.


    Building on graphify

    Building something in the graphify ecosystem? That is encouraged. If your project uses "graphify" in its name (for example graphify-dashboard or graphify-action), please add a short note to your README clarifying that it is community-built and not affiliated with or endorsed by Graphify Labs. "graphify" and the graphify logo are marks of Graphify Labs; please do not use them in a way that implies official status.


    Community and links