GetNotes Tools
Graphify-Labs/graphify
Tool นี้คืออะไร
Graphify เป็นเครื่องมือสำหรับนักพัฒนาที่ช่วยแปลงโปรเจกต์ (โค้ด, เอกสาร, PDF, รูปภาพ, วิดีโอ) ให้เป็น Knowledge Graph ที่สามารถสอบถามได้แทนการค้นหาไฟล์ เหมาะสำหรับผู้ที่ต้องการทำความเข้าใจโครงสร้างโปรเจกต์อย่างลึกซึ้งและค้นหาข้อมูลได้อย่างมีประสิทธิภาพ
ข้อมูลโปรเจกต์
ดาว
151.7K
Forks
14.6K
License
Apache-2.0
อัปเดต GitHub ล่าสุด
21 พ.ย. 2569
เพิ่มใน GetNotes
17 ก.ค. 2569
Repository
Graphify-Labs/graphify
รูปแบบ
เหมาะกับงาน
เหมาะกับอาชีพ
Ecosystem
Python
แปลและเรียบเรียงโดย AI
เนื้อหาฉบับภาษาไทย
ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง

🇺🇸 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 | 🇮🇱 עברית
พิมพ์ /graphify ใน AI coding assistant ของคุณ แล้วมันจะแมปโปรเจกต์ทั้งหมดของคุณ (โค้ด, เอกสาร, PDF, รูปภาพ, วิดีโอ) ให้เป็น knowledge graph ที่คุณสามารถ สอบถามได้แทนการค้นหา (grepping) ผ่านไฟล์
- แผนที่โค้ดฟรี, ทำงานแบบ local ทั้งหมด โค้ดถูกแยกวิเคราะห์ด้วย tree-sitter AST: กำหนดได้, ไม่มี LLM, ไม่มีอะไรออกจากเครื่องของคุณ (เอกสาร, PDF, รูปภาพ และวิดีโอใช้โมเดลของ assistant ของคุณ หรือ API key ที่กำหนดค่าไว้ สำหรับการประมวลผลเชิงความหมาย)
- ทุก edge มีคำอธิบาย การเชื่อมต่อแต่ละรายการจะถูกแท็ก
EXTRACTED(ชัดเจนในแหล่งที่มา) หรือINFERRED(แก้ไขโดย graphify) เพื่อให้คุณสามารถบอกได้ว่าอะไรถูกอ่านโดยตรงจากอะไรที่ถูกอนุมาน - ไม่ใช่ vector index ไม่มี embeddings, ไม่มี vector store: เป็นกราฟจริงที่คุณสามารถสำรวจได้ ถามคำถาม, ติดตามเส้นทางระหว่างสองสิ่ง, หรืออธิบายแนวคิดหนึ่ง

เริ่มต้นใช้งาน (30 วินาที):
uv tool install graphifyy # ติดตั้ง CLI (หรือ: pipx install graphifyy)
graphify install # ลงทะเบียน skill กับ AI assistant ของคุณจากนั้น ใน AI assistant ของคุณ:
/graphify .แค่นั้นเอง คุณจะได้ สามไฟล์:
graphify-out/
├── graph.html เปิดในเบราว์เซอร์ใดก็ได้ — คลิกโหนด, กรอง, ค้นหา
├── GRAPH_REPORT.md ไฮไลท์: แนวคิดหลัก, การเชื่อมต่อที่น่าประหลาดใจ, คำถามที่แนะนำ
└── graph.json กราฟฉบับเต็ม — สอบถามได้ตลอดเวลาโดยไม่ต้องอ่านไฟล์ซ้ำใช้งานได้ใน Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot และอีก 15+ รายการ — เลือกแพลตฟอร์มของคุณ
ดูการทำงานจริง
เมื่อสร้างกราฟเสร็จแล้ว คุณสามารถสอบถามได้แทนการอ่านไฟล์ นี่คือผลลัพธ์จริงที่ graphify รันบนโค้ดเบส FastAPI ที่แสดงด้านบน:
$ 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ทุก edge มี แท็กความน่าเชื่อถือ (EXTRACTED = ชัดเจนในแหล่งที่มา, INFERRED = ได้มาจากการแก้ไข) เพื่อให้คุณสามารถบอกได้ว่าอะไรถูกอ่านโดยตรงจากอะไรที่ถูกอนุมาน graphify query "<question>" จะส่งคืน subgraph ที่กำหนดขอบเขตสำหรับคำถามภาษาธรรมดา และ graphify path A B จะติดตามว่าสองสิ่งเชื่อมต่อกันอย่างไร
สิ่งที่ทำได้
สิ่งที่คุณจะได้รับทันที:
| ความสามารถ | สิ่งที่คุณจะได้รับ |
|---|---|
| God nodes | แนวคิดที่มีการเชื่อมต่อมากที่สุด เพื่อให้คุณเห็นว่าทุกสิ่งไหลผ่านอะไร |
| Communities | กราฟที่แบ่งออกเป็นระบบย่อย (Leiden) พร้อมป้ายกำกับที่ไม่มี LLM |
| Cross-file links | calls / imports / inherits / mixes_in ที่แก้ไขข้ามภาษาประมาณ 40 ภาษาผ่าน tree-sitter AST |
| Query, path, explain | ถามคำถาม, ติดตามเส้นทางระหว่างสองสิ่ง, หรืออธิบายแนวคิดหนึ่ง ทั้งหมดนี้เทียบกับ graph.json |
| Rationale + doc refs | คอมเมนต์ # NOTE: / # WHY: และการอ้างอิง ADR/RFC กลายเป็นโหนดระดับเฟิร์สคลาสที่เชื่อมโยงกับโค้ด |
| นอกเหนือจากโค้ด | เอกสาร, PDF, รูปภาพ และวิดีโอ/เสียง ทั้งหมดถูกแมปเข้าสู่กราฟเดียวกัน |
| Local-first | โค้ดถูกแยกวิเคราะห์แบบ local ด้วย tree-sitter (ไม่มี LLM, ไม่มีอะไรออกจากเครื่องของคุณ); เฉพาะการประมวลผลเชิงความหมายของเอกสาร/สื่อเท่านั้นที่เรียกใช้แบ็กเอนด์ และเฉพาะเมื่อคุณกำหนดค่าไว้ |
เกณฑ์มาตรฐาน
| เกณฑ์มาตรฐาน | ตัวชี้วัด | 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% | เท่ากับ dense RAG |
| Graph build | LLM credits | 0 | ต่อโทเค็นสำหรับระบบส่วนใหญ่ |
ทุกระบบทำงานบนชุดทดสอบเดียวกันด้วยโมเดลและงบประมาณเดียวกัน โดยให้คะแนนโดยผู้ประเมินที่ได้รับการตรวจสอบแบบ blind-validated กับผู้ประเมินคนที่สอง (ความเห็นพ้อง 90.6%, Cohen's kappa 0.81) ตารางเต็มต่อระบบ, ผลลัพธ์ code-intelligence และคำสั่งสำหรับการทำซ้ำ: BENCHMARKS.md
ข้อกำหนดเบื้องต้น
| ข้อกำหนด | ขั้นต่ำ | ตรวจสอบ | ติดตั้ง |
|---|---|---|---|
| Python | 3.10+ | python --version | python.org |
| uv (แนะนำ) | ใดๆ | uv --version | curl -LsSf https://astral.sh/uv/install.sh | sh |
| pipx (ทางเลือก) | ใดๆ | pipx --version | pip install pipx |
การติดตั้งด่วนบน macOS (Homebrew):
brew install python@3.12 uvการติดตั้งด่วนบน Windows:
winget install astral-sh.uvUbuntu/Debian:
sudo apt install python3.12 python3-pip pipx
# หรือติดตั้ง uv:
curl -LsSf https://astral.sh/uv/install.sh | shการติดตั้ง
แพ็กเกจอย่างเป็นทางการ: แพ็กเกจ PyPI คือ graphifyy (มี y สองตัว) แพ็กเกจ graphify* อื่นๆ บน PyPI ไม่เกี่ยวข้อง
ขั้นตอนที่ 1 — ติดตั้งแพ็กเกจ:
# แนะนำ (สภาพแวดล้อมแยก; หากไม่พบ 'graphify' หลังจากนั้น ให้รัน: uv tool update-shell):
uv tool install graphifyy
# ทางเลือก:
pipx install graphifyy
pip install graphifyy # อาจต้องตั้งค่า PATH — ดูหมายเหตุด้านล่าง
**ขั้นตอนที่ 2 — ลงทะเบียน skill กับผู้ช่วย AI ของคุณ:**
```bash
graphify installแค่นั้นเอง เปิดผู้ช่วย AI ของคุณแล้วพิมพ์ /graphify .
หากต้องการติดตั้ง skill ของผู้ช่วยลงใน repository ปัจจุบัน แทนที่จะเป็นโปรไฟล์ผู้ใช้ของคุณ ให้เพิ่ม --project:
graphify install --project
graphify install --project --platform codexการติดตั้งแบบ project-scoped จะเขียนไฟล์ลงในไดเรกทอรีปัจจุบัน เช่น .claude/skills/graphify/SKILL.md หรือ .agents/skills/graphify/SKILL.md (พร้อมกับไฟล์ references/ ที่ skill จะโหลดเมื่อจำเป็น) และแสดงคำแนะนำ git add สำหรับไฟล์ที่สามารถคอมมิตได้
คำสั่งเฉพาะแพลตฟอร์มที่รองรับการติดตั้งแบบ project-scoped ยอมรับแฟล็กเดียวกัน เช่น graphify claude install --project หรือ graphify codex install --project
หมายเหตุสำหรับ PowerShell: ใช้ graphify . ไม่ใช่ /graphify . — เครื่องหมายสแลชนำหน้าเป็นตัวคั่นพาธใน PowerShell
graphify: command not found? uv tool install / pipx install จะวางคำสั่ง graphify ไว้ในไดเรกทอรี bin ของเครื่องมือ (~/.local/bin) หากเชลล์ของคุณหาไม่พบหลังจากติดตั้งทันที — ซึ่งมักเกิดขึ้นในการตั้งค่า macOS + zsh ใหม่ — แสดงว่าไดเรกทอรีนั้นยังไม่ได้อยู่ใน PATH ของคุณ: ให้รัน uv tool update-shell (หรือ pipx ensurepath) จากนั้นเปิดเทอร์มินัลใหม่ หากใช้ pip ปกติ ให้เพิ่ม ~/.local/bin (Linux) หรือ ~/Library/Python/3.x/bin (Mac) ลงใน PATH ของคุณ หรือรัน python -m graphify
กำลังรันด้วย uvx / uv tool run แทนการติดตั้งใช่หรือไม่? ระบุชื่อแพ็กเกจ ไม่ใช่ชื่อคำสั่ง: uvx --from graphifyy graphify install uvx graphify … แบบธรรมดาจะล้มเหลว (No solution found … no versions of graphify) เนื่องจาก uv tool run อ่านคำแรกเป็น แพ็กเกจ และแพ็กเกจคือ graphifyy — คำสั่ง graphify อยู่ภายในนั้น
หลีกเลี่ยง pip install บน Mac/Windows หากเป็นไปได้ skill จะระบุ Python ณ รันไทม์จาก graphify-out/.graphify_python หากสิ่งนั้นชี้ไปยังสภาพแวดล้อมที่แตกต่างจากที่ pip ติดตั้งแพ็กเกจ คุณจะได้รับข้อผิดพลาด ModuleNotFoundError: No module named 'graphify' uv tool install และ pipx install จะแยกแพ็กเกจในสภาพแวดล้อมของตัวเองและหลีกเลี่ยงปัญหานี้ได้อย่างสมบูรณ์
Git hooks และ uv tool / pipx: graphify hook install จะฝังพาธของ interpreter ปัจจุบันลงในสคริปต์ hook โดยตรงในขณะติดตั้ง เพื่อให้ post-commit hook ทำงานได้อย่างถูกต้องแม้ในไคลเอนต์ Git แบบ GUI และ CI runner ที่ ~/.local/bin ไม่ได้อยู่ใน PATH หากคุณติดตั้งใหม่หรืออัปเกรด graphify ให้รัน graphify hook install อีกครั้งเพื่อรีเฟรชพาธที่ฝังไว้
| แพลตฟอร์ม | คำสั่งติดตั้ง |
|---|---|
| Claude Code (Linux/Mac) | graphify install |
| Claude Code (Windows) | graphify install (ตรวจจับอัตโนมัติ) หรือ 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 |
| Hermes | graphify install --platform hermes |
| Kimi Code | graphify install --platform kimi |
| Amp | graphify amp install |
| Agent Skills (cross-framework) | graphify install --platform agents (ชื่อเรียกอีกอย่าง --platform skills) |
| Kiro IDE/CLI | graphify kiro install |
| Pi coding agent | graphify install --platform pi |
| Cursor | graphify cursor install |
| Devin CLI | graphify devin install |
| Google Antigravity | graphify antigravity install |
ผู้ใช้ Codex ยังต้องตั้งค่า multi_agent = true ภายใต้ [features] ใน ~/.codex/config.toml สำหรับการแยกข้อมูลแบบขนาน CodeBuddy ใช้เครื่องมือ Agent และกลไก PreToolUse hook เดียวกันกับ Claude Code Factory Droid ใช้เครื่องมือ Task สำหรับการส่งงาน subagent แบบขนาน OpenClaw และ Aider ใช้การแยกข้อมูลแบบลำดับ (การรองรับ agent แบบขนานยังอยู่ในช่วงเริ่มต้นสำหรับแพลตฟอร์มเหล่านี้) Trae ใช้เครื่องมือ Agent สำหรับการส่งงาน subagent แบบขนานและ ไม่ รองรับ PreToolUse hooks ดังนั้น AGENTS.md จึงเป็นกลไกที่ทำงานตลอดเวลา
--platform agents (หรือชื่อเรียกอีกอย่างว่า --platform skills) กำหนดเป้าหมายไปยังตำแหน่งของ Agent-Skills แบบ cross-framework ทั่วไป: คือ ~/.agents/skills/ ที่เป็น user-global ตามข้อกำหนด (อ่านโดย npx skills และเฟรมเวิร์กที่สอดคล้องกับข้อกำหนด) สำหรับการติดตั้งแบบ global และ ./.agents/skills/ สำหรับการติดตั้งแบบ project (--project) คำสั่ง graphify install แบบไม่มีแฟล็กจะยังคงเป็นแพลตฟอร์มเดียว (Claude Code) โดยการออกแบบ — ใช้แพลตฟอร์ม agents ที่ระบุชื่อเมื่อคุณต้องการให้ skill สามารถค้นพบได้โดยเฟรมเวิร์กใดๆ ที่อ่าน .agents/skills
Codex ใช้ $graphify แทน /graphify
| ส่วนเสริม | สิ่งที่เพิ่มเข้ามา | ติดตั้ง |
|---|---|---|
pdf | การแยกข้อมูล PDF | uv tool install "graphifyy[pdf]" |
office | รองรับ .docx และ .xlsx | uv tool install "graphifyy[office]" |
google | การเรนเดอร์ Google Sheets | uv tool install "graphifyy[google]" |
video | การถอดเสียงวิดีโอ/เสียง (faster-whisper + yt-dlp) | uv tool install "graphifyy[video]" |
mcp | MCP stdio server | uv tool install "graphifyy[mcp]" |
neo4j | รองรับการพุช Neo4j | uv tool install "graphifyy[neo4j]" |
falkordb | รองรับการพุช FalkorDB | uv tool install "graphifyy[falkordb]" |
svg | การส่งออกกราฟ SVG | uv tool install "graphifyy[svg]" |
leiden | การตรวจจับชุมชน Leiden (Python < 3.13 เท่านั้น) | uv tool install "graphifyy[leiden]" |
ollama | การอนุมานภายในเครื่องด้วย Ollama | uv tool install "graphifyy[ollama]" |
openai | OpenAI / API ที่เข้ากันได้กับ OpenAI | uv tool install "graphifyy[openai]" |
gemini | Google Gemini API | uv tool install "graphifyy[gemini]" |
anthropic | Anthropic Claude API (--backend claude, ใช้ ANTHROPIC_API_KEY) | uv tool install "graphifyy[anthropic]" |
bedrock | AWS Bedrock (ใช้ IAM, ไม่มี API key) | uv tool install "graphifyy[bedrock]" |
azure | Azure OpenAI Service (--backend azure, ใช้ AZURE_OPENAI_API_KEY + AZURE_OPENAI_ENDPOINT) | uv tool install "graphifyy[openai]" |
sql | การแยก Schema ของ SQL | uv tool install "graphifyy[sql]" |
postgres | การตรวจสอบ PostgreSQL แบบสด (--postgres DSN) | uv tool install "graphifyy[postgres]" |
dm | การแยก AST ของ BYOND DreamMaker .dm/.dme (อาจต้องใช้ C compiler + python3-dev หากไม่มี wheel ที่ตรงกับแพลตฟอร์มของคุณ) | uv tool install "graphifyy[dm]" |
terraform | การแยก AST ของ Terraform / HCL .tf/.tfvars/.hcl | uv tool install "graphifyy[terraform]" |
pascal | การแยก AST ของ Pascal / Delphi .pas/.dpr/.dpk/.inc (ให้ edge calls/inherits ที่แม่นยำยิ่งขึ้น; จะใช้ regex extractor แทนหากไม่มี) | uv tool install "graphifyy[pascal]" |
chinese | การแบ่งส่วนคำค้นหาภาษาจีน (jieba) | uv tool install "graphifyy[chinese]" |
all | ทั้งหมดข้างต้น | uv tool install "graphifyy[all]" |
ทำให้ผู้ช่วยของคุณใช้กราฟเสมอ
รันคำสั่งนี้เพียงครั้งเดียวในโปรเจกต์ของคุณหลังจากสร้างกราฟแล้ว:
| แพลตฟอร์ม | คำสั่ง |
|---|---|
| Claude Code | graphify claude install |
| CodeBuddy | graphify codebuddy install |
| Codex | graphify codex install |
| OpenCode | graphify opencode install |
| Kilo Code | graphify kilo install |
| GitHub Copilot CLI | graphify copilot install |
| VS Code Copilot Chat | graphify vscode install |
| Aider | graphify aider install |
| OpenClaw | graphify claw install |
| Factory Droid | graphify droid install |
| Trae | graphify trae install |
| Trae CN | graphify trae-cn install |
| Cursor | graphify cursor install |
| Gemini CLI | graphify gemini install |
| Hermes | graphify hermes install |
| Kimi Code | graphify install --platform kimi |
| Amp | graphify amp install |
| Agent Skills (cross-framework) | graphify agents install (ชื่อเรียกอีกอย่าง graphify skills install) |
| Kiro IDE/CLI | graphify kiro install |
| Pi coding agent | graphify pi install |
| Devin CLI | graphify devin install |
| Google Antigravity | graphify antigravity install |
สิ่งนี้จะเขียนไฟล์คอนฟิกขนาดเล็กที่บอกให้ผู้ช่วยของคุณปรึกษากราฟความรู้สำหรับคำถามเกี่ยวกับโค้ดเบส โดยจะเลือกใช้การค้นหาแบบ scoped เช่น graphify query "<question>" แทนที่จะอ่านรายงานฉบับเต็มหรือ grepping ไฟล์ดิบ
- แพลตฟอร์มที่ใช้ Hook (Claude Code, Gemini CLI): hook จะทำงานโดยอัตโนมัติก่อนการเรียกใช้เครื่องมือแบบค้นหา (และใน Claude Code จะทำงานก่อนการอ่านไฟล์ต้นฉบับทีละไฟล์ผ่านเครื่องมือ Read/Glob) และจะผลักดันให้ผู้ช่วยของคุณใช้เส้นทางกราฟ
- แพลตฟอร์มที่ใช้ไฟล์คำสั่ง (Codex, OpenCode, Cursor, เป็นต้น): ไฟล์คำสั่งแบบถาวร (
AGENTS.md,.cursor/rules/, เป็นต้น) จะให้คำแนะนำแบบ query-first เดียวกัน
GRAPH_REPORT.md ยังคงมีให้สำหรับการตรวจสอบสถาปัตยกรรมในวงกว้าง
CodeBuddy ทำสองสิ่งเหมือนกับ Claude Code: เขียนส่วน CODEBUDDY.md ที่บอกให้ CodeBuddy อ่าน graphify-out/GRAPH_REPORT.md ก่อนตอบคำถามเกี่ยวกับสถาปัตยกรรม และติดตั้งฮุก PreToolUse (.codebuddy/settings.json) ที่ทำงานก่อนคำสั่งค้นหา Bash และการอ่านไฟล์ โดยจะแนะนำให้ใช้ graphify query แทน
Codex เขียนไปยัง AGENTS.md และยังติดตั้งฮุก PreToolUse ใน .codex/hooks.json ที่ทำงานก่อนการเรียกใช้เครื่องมือ Bash ทุกครั้ง ซึ่งเป็นกลไกที่ทำงานตลอดเวลาเช่นเดียวกับ Claude Code
Kilo Code ติดตั้งทักษะ Graphify ไปยัง ~/.config/kilo/skills/graphify/SKILL.md และคำสั่ง /graphify แบบเนทีฟไปยัง ~/.config/kilo/command/graphify.md graphify kilo install ยังเขียน AGENTS.md และปลั๊กอิน tool.execute.before แบบเนทีฟ (.kilo/plugins/graphify.js + การลงทะเบียน .kilo/kilo.json หรือ .kilo/kilo.jsonc) เพื่อให้ Kilo ได้รับพฤติกรรมการเตือนกราฟที่ทำงานตลอดเวลาแบบเดียวกันผ่านการกำหนดค่า .kilo แบบเนทีฟ
Cursor เขียน .cursor/rules/graphify.mdc ด้วย alwaysApply: true ดังนั้น Cursor จะรวมไว้ในการสนทนาทุกครั้งโดยอัตโนมัติ ไม่ต้องใช้ฮุก
หากต้องการลบ graphify ออกจากทุกแพลตฟอร์มพร้อมกัน: graphify uninstall (เพิ่ม --purge เพื่อลบ graphify-out/ ด้วย) หรือใช้คำสั่งต่อแพลตฟอร์ม (เช่น graphify claude uninstall)
มีอะไรอยู่ในรายงาน
- God nodes — แนวคิดที่เชื่อมโยงกันมากที่สุดในโปรเจกต์ของคุณ ทุกอย่างไหลผ่านสิ่งเหล่านี้
- Surprising connections — ลิงก์ระหว่างสิ่งต่างๆ ที่อยู่ในไฟล์หรือโมดูลที่แตกต่างกัน จัดอันดับตามความไม่คาดคิด
- The "why" — คอมเมนต์ในบรรทัด (
# NOTE:,# WHY:,# HACK:), docstrings และเหตุผลในการออกแบบจากเอกสารจะถูกแยกออกมาเป็นโหนดแยกต่างหากที่เชื่อมโยงกับโค้ดที่อธิบาย - Suggested questions — คำถาม 4–5 ข้อที่กราฟสามารถตอบได้โดยเฉพาะ
- Confidence tags — ความสัมพันธ์ที่อนุมานได้ทุกรายการจะถูกทำเครื่องหมาย
EXTRACTED,INFERREDหรือAMBIGUOUSคุณจะรู้เสมอว่าอะไรถูกพบเทียบกับอะไรที่ถูกคาดเดา
ไฟล์ที่รองรับ
| ประเภท | นามสกุล |
|---|
| แฟล็ก | ค่าเริ่มต้น | วัตถุประสงค์ |
|---|---|---|
--transport {stdio,http} | stdio | ช่องทางการสื่อสารที่จะให้บริการ |
--host | 127.0.0.1 | โฮสต์สำหรับผูก HTTP (ใช้ 0.0.0.0 เพื่อเปิดเผยนอก localhost) |
--port | 8080 | พอร์ตสำหรับผูก HTTP |
--api-key | env GRAPHIFY_API_KEY | กำหนดให้มี Authorization: Bearer <key> (หรือ X-API-Key) |
--path | /mcp | พาธสำหรับเมานต์ HTTP |
--json-response | off | ส่งคืน JSON ธรรมดาแทนสตรีม SSE |
--stateless | off | ไม่มีสถานะต่อเซสชัน (สำหรับการปรับใช้แบบโหลดบาลานซ์ / CI) |
--session-timeout | 3600 | ลบเซสชันที่มีสถานะที่ไม่ได้ใช้งานหลังจาก N วินาที (0 ปิดใช้งาน) |
การผูก 127.0.0.1 โดยค่าเริ่มต้นเป็นแบบ loopback-only ตั้งค่า --host 0.0.0.0 และ --api-key พร้อมกันเมื่อเปิดเผยบนโฮสต์ที่ใช้ร่วมกัน รันในคอนเทนเนอร์:
docker build -t graphify .
docker run -p 8080:8080 -v "$(pwd)/graphify-out:/data" graphify \
/data/graph.json --transport http --host 0.0.0.0 --api-key "$SECRET"หมายเหตุสำหรับ WSL / Linux: Ubuntu มาพร้อมกับ python3 ไม่ใช่ python ใช้ venv เพื่อหลีกเลี่ยงความขัดแย้ง:
python3 -m venv .venv && .venv/bin/pip install "graphifyy[mcp]"ตัวแปรสภาพแวดล้อม
สิ่งเหล่านี้จำเป็นสำหรับ การดึงข้อมูลแบบ headless / CI (graphify extract) เท่านั้น เมื่อรันผ่านสกิล /graphify ภายใน IDE ของคุณ API ของโมเดลจะถูกจัดหาโดยเซสชัน IDE ของคุณ — ไม่จำเป็นต้องใช้คีย์เพิ่มเติม
| ตัวแปร | ใช้สำหรับ | เมื่อจำเป็น |
|---|---|---|
ANTHROPIC_API_KEY | แบ็กเอนด์ Claude (Anthropic) | --backend claude |
ANTHROPIC_BASE_URL | URL ปลายทางที่เข้ากันได้กับ Anthropic (LiteLLM proxy, gateways, ...) | --backend claude (ค่าเริ่มต้น: https://api.anthropic.com) |
ANTHROPIC_MODEL | ชื่อโมเดลสำหรับแบ็กเอนด์ Claude — สำหรับปลายทางที่กำหนดเอง ให้ใช้ชื่อโมเดล/นามแฝงที่เซิร์ฟเวอร์ของคุณเปิดเผย | --backend claude (ค่าเริ่มต้น: claude-sonnet-4-6) |
GEMINI_API_KEY หรือ GOOGLE_API_KEY | แบ็กเอนด์ Google Gemini | --backend gemini |
OPENAI_API_KEY | OpenAI หรือ API ที่เข้ากันได้กับ OpenAI | --backend openai (เซิร์ฟเวอร์โลคัลยอมรับค่าที่ไม่ว่างเปล่าใดๆ) |
OPENAI_BASE_URL | URL เซิร์ฟเวอร์ที่เข้ากันได้กับ OpenAI (llama.cpp, vLLM, LM Studio, ...) | --backend openai (ค่าเริ่มต้น: https://api.openai.com/v1) |
OPENAI_MODEL | ชื่อโมเดลสำหรับแบ็กเอนด์ OpenAI — สำหรับเซิร์ฟเวอร์ที่โฮสต์เอง ให้ใช้ชื่อโมเดล/นามแฝงที่เซิร์ฟเวอร์ของคุณเปิดเผย (ตรวจสอบปลายทาง /v1/models) เช่น LFM2.5-8B-A1B-UD-Q4_K_XL สำหรับ llama.cpp | --backend openai (ค่าเริ่มต้น: gpt-4.1-mini) |
DEEPSEEK_API_KEY | แบ็กเอนด์ DeepSeek | --backend deepseek |
MOONSHOT_API_KEY | แบ็กเอนด์ Kimi Code | --backend kimi |
OLLAMA_BASE_URL | URL การอนุมานโลคัลของ Ollama | --backend ollama (ค่าเริ่มต้น: http://localhost:11434) |
OLLAMA_MODEL | ชื่อโมเดล Ollama | --backend ollama (ค่าเริ่มต้น: ตรวจจับอัตโนมัติ) |
GRAPHIFY_OLLAMA_NUM_CTX | แทนที่ขนาดหน้าต่าง KV-cache ของ Ollama | ไม่บังคับ — ปรับขนาดอัตโนมัติโดยค่าเริ่มต้น |
GRAPHIFY_OLLAMA_KEEP_ALIVE | จำนวนนาทีที่จะเก็บโมเดล Ollama โหลดไว้ | ไม่บังคับ — ตั้งค่า 0 เพื่อยกเลิกการโหลดหลังจากแต่ละส่วน |
AZURE_OPENAI_API_KEY | แบ็กเอนด์ Azure OpenAI Service | --backend azure |
AZURE_OPENAI_ENDPOINT | URL ปลายทางทรัพยากร Azure | --backend azure (จำเป็นควบคู่กับ API key) |
AZURE_OPENAI_API_VERSION | การแทนที่เวอร์ชัน Azure API | ไม่บังคับ — ค่าเริ่มต้น 2024-12-01-preview |
AZURE_OPENAI_DEPLOYMENT หรือ GRAPHIFY_AZURE_MODEL | ชื่อการปรับใช้ Azure | ไม่บังคับ — ค่าเริ่มต้น gpt-4o |
AWS_* / ~/.aws/credentials | AWS Bedrock — เชนข้อมูลรับรองมาตรฐาน | --backend bedrock (ไม่มี API key, ใช้ IAM) |
GRAPHIFY_MAX_WORKERS | จำนวนเธรดสำหรับ AST parallelism | ไม่บังคับ — มีแฟล็ก --max-workers ด้วย |
GRAPHIFY_MAX_OUTPUT_TOKENS | เพิ่มขีดจำกัดเอาต์พุตสำหรับคลังข้อมูลหนาแน่น | ไม่บังคับ — เช่น 32768 สำหรับไฟล์ขนาดใหญ่ |
GRAPHIFY_API_TIMEOUT | การหมดเวลาต่อการเรียกเป็นวินาทีสำหรับแบ็กเอนด์ HTTP, claude-cli และ Anthropic SDK (ค่าเริ่มต้น: 600) | ไม่บังคับ — มีแฟล็ก --api-timeout ด้วย |
GRAPHIFY_MAX_RETRIES | จำนวนครั้งที่จะลองส่งคำขอที่ถูกจำกัดอัตรา (429) ซ้ำก่อนที่จะยอมแพ้ (ค่าเริ่มต้น: 6; เคารพ Retry-After) | ไม่บังคับ — เพิ่มสำหรับข้อจำกัดที่เข้มงวดต่อองค์กร (เช่น kimi); 0 ปิดใช้งาน |
GRAPHIFY_FORCE | บังคับสร้างกราฟใหม่แม้จะมีโหนดน้อยลง | ไม่บังคับ — มีแฟล็ก --force ด้วย |
GRAPHIFY_GOOGLE_WORKSPACE | เปิดใช้งานการส่งออก Google Workspace โดยอัตโนมัติ | ไม่บังคับ — ตั้งค่าเป็น 1 |
GRAPHIFY_TRIAGE_BACKEND | แบ็กเอนด์สำหรับ graphify prs --triage | ไม่บังคับ — ตรวจจับอัตโนมัติจากคีย์ที่มีอยู่ |
GRAPHIFY_TRIAGE_MODEL | การแทนที่โมเดลสำหรับการคัดแยก | ไม่บังคับ — เช่น claude-opus-4-7 |
GRAPHIFY_QUERY_LOG_ENABLE | ตั้งค่าเป็น 1 เพื่อเปิดบันทึกการสอบถามโลคัลที่ ~/.cache/graphify-queries.log (บันทึกคำถามการสอบถาม/พาธ/อธิบายแต่ละรายการ + พาธคลังข้อมูล) ปิดใช้งานโดยค่าเริ่มต้น — จะไม่มีการเขียนอะไรเลยเว้นแต่คุณจะเลือกใช้ (#1797) | ไม่บังคับ |
เอกสารโปรเจกต์
อ่านเอกสารต้นฉบับ
README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ

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) orINFERRED(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? Graphify 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 free, no card required.

Get started (30 seconds). Needs Python 3.11.5–3.14 and uv (or pipx):
uv tool install graphifyy # install the CLI (or: pipx install graphifyy)
graphify install # sets up Claude Code (the default)Using a different assistant? Name it explicitly:
graphify cursor install # Cursor
graphify install --platform codex # Codex (invoke with $graphify, not /graphify)See pick your platform for all 20+ assistants.
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 filesThe 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--> ModelFieldEvery 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:
| Capability | What you get |
|---|---|
| Most-connected components | The concepts everything flows through, the hubs of the graph (also called god nodes) |
| Subsystems | The graph split into cohesive groups (Leiden communities), each with an LLM-free label |
| Cross-file links | calls / imports / inherits / mixes_in 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 |
Running this across many repos or a monorepo? Graphify does it continuously, with cross-repo links, SDLC-wide code review, formal verification, and Sentry/Jira connectors. Start free, no card required →
When to reach for Graphify
Reach for the graph when you need to understand a codebase, not just read through it:
| Situation | What to ask Graphify |
|---|---|
| Joining an unfamiliar project | "Explain how the main components connect." |
| Changing a shared component | "Trace its callers and dependencies." |
| Investigating a bug | "Show the path between this endpoint and storage." |
| Revisiting previous work | "Find the relevant design decisions and notes." |
Benchmarks: 0.497 recall@10, 0 LLM credits
| 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 |
| ERPNext cross-tool (n=6) | key-fact coverage | 82.0% | grep/read baseline 70.8% |
| 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.
Documentation
Full guides and reference live at docs.graphify.com:
- Quickstart: build your first graph
- CLI reference: every command and flag
- Ask better graph questions: querying patterns
- Configuration: environment variables and tuning
- Supported inputs: languages and file types
- Team workflows and PR review
- Troubleshooting and How it works
Prerequisites
| Requirement | Minimum | Check | Install |
|---|---|---|---|
| Python | 3.11.5–3.14 | 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 uvWindows quick install:
winget install astral-sh.uvUbuntu/Debian:
# uv manages its own Python, so this is the only step you need:
curl -LsSf https://astral.sh/uv/install.sh | sh
# or use the system Python with pipx:
sudo apt install python3 python3-pip pipxInstall
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 belowThen 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 codexProject-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.
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.
| Platform | Install command |
|---|---|
| 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 (invoke with $graphify) |
| 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 |
| Hermes | graphify install --platform hermes |
| Kimi Code | graphify install --platform kimi |
| Amp | graphify amp install |
| Agent Skills (cross-framework) | graphify install --platform agents (alias --platform skills) |
| Kiro IDE/CLI | graphify kiro install |
| Pi coding agent | graphify install --platform pi, plus graphify pi guard install for the native guard |
| Cursor | graphify cursor install |
| Devin CLI | graphify devin install |
| Google Antigravity | graphify 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.
| Extra | What it adds | Install |
|---|---|---|
pdf | PDF extraction | uv tool install "graphifyy[pdf]" |
office | .docx and .xlsx support | uv tool install "graphifyy[office]" |
google | Google Sheets rendering | uv tool install "graphifyy[google]" |
video | Video/audio transcription (faster-whisper + yt-dlp) | uv tool install "graphifyy[video]" |
mcp | MCP stdio server | uv tool install "graphifyy[mcp]" |
watch | Auto-rebuild on file changes (graphify watch) | uv tool install "graphifyy[watch]" |
neo4j | Neo4j push support | uv tool install "graphifyy[neo4j]" |
falkordb | FalkorDB push support | uv tool install "graphifyy[falkordb]" |
svg | SVG graph export | uv tool install "graphifyy[svg]" |
leiden | Leiden community detection (graspologic on Python < 3.13; native backend on 3.13+) | uv tool install "graphifyy[leiden]" |
ollama | Ollama local inference | uv tool install "graphifyy[ollama]" |
openai | OpenAI / OpenAI-compatible APIs | uv tool install "graphifyy[openai]" |
gemini | Google Gemini API | uv tool install "graphifyy[gemini]" |
anthropic | Anthropic Claude API (--backend claude, uses ANTHROPIC_API_KEY) | uv tool install "graphifyy[anthropic]" |
bedrock | AWS Bedrock (uses IAM, no API key) | uv tool install "graphifyy[bedrock]" |
azure | Azure OpenAI Service (--backend azure, uses AZURE_OPENAI_API_KEY + AZURE_OPENAI_ENDPOINT) | uv tool install "graphifyy[openai]" |
sql | SQL schema extraction | uv tool install "graphifyy[sql]" |
postgres | Live PostgreSQL introspection (--postgres DSN) | uv tool install "graphifyy[postgres]" |
dm | BYOND DreamMaker .dm/.dme AST extraction (may need a C compiler + python3-dev if no wheel matches your platform) | uv tool install "graphifyy[dm]" |
terraform | Terraform / HCL .tf/.tfvars/.hcl AST extraction | uv tool install "graphifyy[terraform]" |
pascal | Pascal / 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]" |
ocaml | OCaml .ml/.mli AST extraction | uv tool install "graphifyy[ocaml]" |
commonlisp | Common Lisp .lisp/.cl/.lsp/.asd AST extraction | uv tool install "graphifyy[commonlisp]" |
robot | Robot Framework .robot/.resource extraction (suites, test cases, keywords, keyword-call and resource/library import edges) | uv tool install "graphifyy[robot]" |
chinese | Chinese query segmentation (jieba) | uv tool install "graphifyy[chinese]" |
all | Everything above | uv 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 -nand 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:
| Setup | Guidance to use | Query access |
|---|---|---|
| Local CLI and installed assistant skill | The platform instructions written by graphify install | Run graphify query, graphify path, and graphify explain against the local graph (graphify-out/ by default). |
| Connected Graphify MCP server | The connection's instructions and the tools listed by that server | Call 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.
Connect your agent over MCP
Point any MCP-capable agent at a Graphify graph and it queries the graph directly instead of grepping files. Connect to the hosted graph (Graphify, free plan, no card):
# Claude Code
claude mcp add --transport http graphify https://api.graphify.com/mcp
# Codex
codex mcp add graphify --url https://api.graphify.com/mcp
# Gemini CLI
gemini extensions install https://github.com/Graphify-Labs/Graphify-gemini-extensionPrefer to stay local? Install the stdio server with uv tool install "graphifyy[mcp]" and run graphify-mcp against your own graph.json — no account needed.
Once connected, your agent gets these tools:
| Tool | What it does |
|---|---|
query_graph | Ask a question in natural language, get back the relevant subgraph; pass seeds to start from known nodes |
affected | Reverse traversal: what breaks if you change a node, symbol, or file |
shortest_path | Trace how two nodes connect |
get_node / get_neighbors | Look up a node and what it touches |
get_community / god_nodes | Detected clusters and the most-connected hubs |
get_section | Read a labeled region of the graph |
graph_stats | Size, languages, and edge breakdown of the graph |
The server also exposes PR tooling (list_prs, get_pr_impact, triage_prs) so your agent can review pull requests with graph context.
What's in the report
GRAPH_REPORT.md summarizes the most-connected components, subsystems, 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 subsystems
/graphify . --cluster-only --exclude-hubs 99 # suppress utility super-hubs from most-connected-component 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 subsystems: merge-order riskSee 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 40for an 8k window. Context overflow is not split-retried; failed batches keep hub-derived names.--missing-only:label --missing-onlykeeps existing labels and names only unnamed /Community Nentries. Uselabel(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/.graphifyrcviz_node_limit=Napply tocluster-only,update,watch, and hooks, notexport html.- Leiden fallback: without the
leidenextra, 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=0The 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=3For 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.
Set demote_docs=false (alias query_demote_docs; accepts true/false, 1/0, yes/no, on/off) to turn off document demotion in graphify query by default. --demote-docs / --no-doc-demotion on the command line override it.
To exclude test files and generated sources from a traversal, run
graphify query "transport" --no-tests --exclude '^src/generated/'.
--no-tests uses Graphify's test-path conventions. Each --exclude is a
regular expression matched against the source path with forward slashes.
Excluded nodes cannot serve as seeds or connect other results.
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_CACHEcontrols system-prompt caching for--backend claude. Unset or blank keeps caching enabled;1,true,yes, oronexplicitly enables it, and0,false,no, oroffdisables it (case-insensitive, surrounding whitespace ignored). Invalid values raise an error before sending a request. For example, runGRAPHIFY_CLAUDE_PROMPT_CACHE=0 graphify extract . --backend claudewhen an Anthropic-compatible endpoint rejectscache_control. Disabling sends the original plain-text system prompt. The setting applies equally to official Anthropic and customANTHROPIC_BASE_URL/ANTHROPIC_MODELendpoints, 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_MODELoverrides the model for theclaude-clibackend (default: Opus).haikuorsonnetare usually enough for community naming; the semantic extraction pass benefits from a larger model. - Claude CLI arguments — Set
GRAPHIFY_CLAUDE_CLI_ARGSto pass additional flags during extraction and labeling. Use shell-style quoting inside the value to keep an argument together. For example, the value--strict-mcp-config --mcp-config '{"mcpServers":{}}'runs with an empty MCP server list.
Privacy
- Code files: processed locally via tree-sitter. Nothing leaves your machine. A code-only corpus requires no API key:
graphify extractruns fully offline. On a mixed repo, add--code-onlyto 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
/graphifyskill, using whatever model your IDE session runs). Headlessgraphify extractrequiresGEMINI_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 theclaudeCLI binary (Claude Code - no API key needed, uses your Claude subscription). The--dedup-llmflag uses the same key. - Data residency:
graphify extractauto-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 setGRAPHIFY_BACKEND=<name>; setGRAPHIFY_BACKEND=noneto disable all LLM backends (semantic extraction and theclaude -plabeling fallback) and keep a code-only graph. For code with data-residency requirements, useGRAPHIFY_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 MCPquery_graphcall is logged to~/.cache/graphify-queries.login JSON Lines format (timestamp, question, corpus, nodes returned, duration). Full subgraph responses are not stored by default. SetGRAPHIFY_QUERY_LOG_DISABLE=1to opt out, orGRAPHIFY_QUERY_LOG=/dev/nullto 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
- docs.graphify.com: full documentation: guides, command reference, and integrations
- How it works: the extraction pipeline, community detection, confidence scoring, benchmarks
- ARCHITECTURE.md: module breakdown, how to add a language
- Optional integrations: Docker MCP Toolkit + SQLite
- The Memory Layer: the book on the ideas behind graphify, the architecture end to end
Graphify
Graphify is the always-on layer built on top of the Graphify CLI. Instead of a graph you rebuild on demand per folder, it keeps one live graph across your entire software development lifecycle:
- Less re-reading: 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 free, no card required →
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.
