What Graphify is, how it works, and why use it for codebase understanding.
What Graphify is, how it works, and why it’s useful for understanding codebases.
Graphify is a local knowledge graph builder for codebases. It analyzes your project (code, docs, markdown, configs) and builds a queryable graph of files, symbols, and relationships. You ask natural language questions and get architectural answers with file references.
┌─────────────────────────────────────────────────────────────┐
│ YOUR CODEBASE │
│ Python, JS/TS, Go, Rust, Java, Markdown, YAML, PDF, ... │
└─────────────────────┬───────────────────────────────────────┘
│ AST + Semantic Extraction
▼
┌─────────────────────────────────────────────────────────────┐
│ KNOWLEDGE GRAPH │
│ Nodes: files, functions, classes, variables, docs │
│ Edges: imports, calls, contains, references, reads, writes │
│ Communities: auto-detected logical groups │
└─────────────────────┬───────────────────────────────────────┘
│ Natural Language Queries
▼
┌─────────────────────────────────────────────────────────────┐
│ ANSWERS │
│ "How does X work?" → Architectural explanation + files │
│ "What depends on Y?" → Dependency list + paths │
│ "Trace A to B" → Call/import chain with line numbers │
└─────────────────────────────────────────────────────────────┘
A network of nodes (files, functions, classes, variables, docs) connected by edges (relationships like imports, calls, contains, reads, writes).
Ask questions in plain English: “How does the YouTube pipeline work?” — Graphify traverses the graph and synthesizes an answer citing specific files and lines.
| Mode | Command | API Key | What’s Indexed |
|---|---|---|---|
| Code-Only | graphify . --code-only | ❌ No | Source code (20+ languages via tree-sitter) |
| Full Graph | graphify . | ✅ Yes | Code + Markdown + Docs + PDFs + Images |
Code files → tree-sitter AST → functions, classes, imports, calls
Markdown/docs → LLM semantic → headings, prose, code blocks, refs
YAML/JSON → Parser → structure, keys, cross-refs
PDFs → OCR + LLM → text, sections
Images → Vision LLM → descriptions
imports_from, calls, contains, references, reads, writesUser Question → LLM → Graph Traversal → Subgraph → LLM Synthesis → Answer + Citations
| Mode | Cost | Best For |
|---|---|---|
| Code-Only | $0 (local only) | Architecture, dependencies, call chains |
| Full Graph | API credits per build | Docs queries, cross-refs, semantic search |
Free tier (Gemini): ~1M tokens/day → ~3-10 full builds/day free
Built with graphify . --code-only:
| Metric | Value |
|---|---|
| Nodes | 4,797 |
| Edges | 6,087 |
| Communities | 494 |
| Graph Size | 3.3 MB |
| Build Time | ~45 seconds |
| Languages | Python, JS/TS, Go, Rust, Java, Shell, … |
Communities detected: YouTube Pipeline, Dictionary System, Anki Generation, Hugo Build, CBT Lexicon, JupyterLite, Skills, Config, Tests, …
1# 1. Install (one-time)
2uv tool install graphifyy && graphify install
3
4# 2. Build code-only graph (free, fast)
5cd your-project
6mkdir -p graphify-out && touch graphify-out/.graphify-activity
7graphify . --code-only
8
9# 3. Ask your first question
10mkdir -p graphify-out && touch graphify-out/.graphify-activity
11graphify query "project overview"