Developers working across complex codebases waste hours grepping through files, tracing imports across modules, and reconstructing mental models of how systems connect. As projects grow—especially those spanning application code, database schemas, infrastructure definitions, and documentation—the cost of navigation compounds. [INTERNAL_LINK: code intelligence tools]
safishamsi/graphify (https://github.com/safishamsi/graphify) attacks this directly: it parses entire project folders into a queryable knowledge graph that you interrogate instead of reading raw files. With 88,741 GitHub stars and 8,680 forks, this MIT-licensed Python↗ Bright Coding Blog tool has gained substantial traction among developers who want deterministic, local-first code understanding without embedding-based retrieval.
The core promise is specific: run /graphify . in your AI coding assistant, and your project becomes a traversable graph of concepts, relationships, and communities—code parsed locally via tree-sitter AST, with no LLM calls and no data leaving your machine for the code layer.
What is safishamsi/graphify?
Graphify is an AI coding assistant skill designed for Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and 15+ other platforms. It was created by Safi Shamsi (safishamsi) and is actively developed under the Graphify-Labs organization, with the latest commit dated July 16, 2026. The project is backed by Y Combinator S26.
Technically, graphify sits at the intersection of static analysis, knowledge representation, and developer tooling. Unlike vector-RAG systems that chunk code into embeddings and perform similarity search, graphify builds an actual property graph with typed nodes and edges. Every relationship is tagged as EXTRACTED (explicit in source) or INFERRED (resolved by graphify's analysis), giving you transparency into what the tool actually found versus what it derived.
The project supports 36+ tree-sitter grammars for code parsing, plus semantic extraction for documents, PDFs, images, and video/audio. Code parsing is fully local and deterministic; only non-code content triggers LLM calls, and even then only if you configure a backend or run through an AI assistant that provides the model.
Graphify outputs three artifacts: an interactive graph.html, a GRAPH_REPORT.md with highlights and suggested questions, and graph.json—the full graph you can query programmatically.
Key Features
Local-first code parsing with tree-sitter AST. Code files are parsed deterministically using tree-sitter grammars—no LLM, no API calls, no embeddings. This covers ~40 languages including Python, TypeScript, Go, Rust, Java, C/C++, CUDA, Metal, Ruby, C#, Kotlin, Scala, PHP↗ Bright Coding Blog, Swift, Lua, Zig, PowerShell, Elixir, Julia, Vue, Svelte, Astro, Dart, SQL, Fortran, Pascal, shell scripts, and more.
Real graph structure, not vector search. Graphify explicitly rejects the embedding approach: "Not a vector index. No embeddings, no vector store: a real graph you traverse." You ask questions, trace paths between concepts, and explain nodes through graph traversal, not cosine similarity.
Confidence-tagged edges. Every edge carries an EXTRACTED or INFERRED tag. EXTRACTED means the relationship was read directly from source (imports, calls, inheritance). INFERRED means graphify resolved it through analysis. This transparency matters for debugging extraction quality and trusting results.
Community detection via Leiden algorithm. The graph is partitioned into subsystems (communities) with LLM-free labeling, color-coded in the HTML visualization. You see architectural boundaries emerge from connection patterns, not folder structure.
Cross-file link resolution. calls, imports, inherits, mixes_in, and other relationship types are resolved across files and languages, giving you a unified view of how your application code connects to your database schema and infrastructure definitions.
Multi-modal ingestion. Beyond code, graphify handles Markdown↗ Smart Converter with wiki-links, PDFs, Office documents (docx, xlsx), Google Workspace files (with gws auth), images, video/audio (via faster-whisper), and even YouTube URLs.
20+ AI assistant integrations. Native skill installation for Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, Aider, Trae, Kiro, Devin, and others—each with platform-specific hooks or instruction files that make the graph query-first in your assistant's behavior.
Use Cases
Onboarding to unfamiliar codebases. New team members can run /graphify . and immediately ask "what connects auth to the database?" or trace the shortest path between FastAPI and ModelField (3 hops in the documented example). The GRAPH_REPORT.md surfaces "god nodes"—the most-connected concepts everything flows through—accelerating architectural understanding.
Refactoring impact analysis. Before changing a widely used utility, query the graph for dependents. The community detection reveals which subsystems would be affected, and path queries show exactly how changes propagate through calls and imports edges.
Documentation-to-code traceability. # NOTE:, # WHY:, # HACK: comments and ADR/RFC citations become first-class nodes linked to the code they explain. When documentation lives in Markdown with [[wikilinks]], those become references edges—so your design rationale is traversable alongside implementation.
Cross-domain system understanding. Graphify's explicit goal is "App code + database schema + infrastructure in one graph." A microservice's Python handlers, PostgreSQL↗ Bright Coding Blog schema (via --postgres live introspection), Terraform definitions, and API documentation can coexist in one queryable structure.
Headless CI/CD integration. The graphify extract command runs without any IDE, enabling automated graph rebuilding in pipelines. The git hook (graphify hook install) auto-rebuilds on commit, with a merge driver that union-merges graph.json to prevent conflicts.
Installation & Setup
Graphify installs in roughly 30 seconds. The PyPI package is graphifyy (note the double-y); the CLI command remains graphify.
Prerequisites: Python 3.10+, plus uv (recommended) or pipx.
Install uv if needed:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
winget install astral-sh.uv
Step 1: Install the package
# Recommended: isolated environment
uv tool install graphifyy
# Alternative
pipx install graphifyy
Important:
uv tool installandpipx installisolate the package in their own environment, avoidingModuleNotFoundErrorissues that plainpip installcan cause when Python interpreter paths diverge.
Step 2: Register with your AI assistant
graphify install
This writes the skill file to your user profile. For project-scoped installation (committed to repo):
graphify install --project
Step 3: Use in your assistant
/graphify .
PowerShell users: Use
graphify .not/graphify .— the leading slash is a path separator in PowerShell.
After running, you get three files in graphify-out/:
graphify-out/
├── graph.html # Interactive visualization
├── GRAPH_REPORT.md # Key concepts, connections, suggested questions
└── graph.json # Full graph for programmatic queries
Real Code Examples
Example 1: Basic project graph generation
The simplest invocation builds a graph for the current directory:
/graphify .
This parses all supported files, builds the graph, detects communities, and generates all three output files. For large projects, you may want to skip the HTML visualization:
/graphify . --no-viz
Example 2: Querying the built graph
Once built, query the graph from terminal instead of grepping:
# Explain a specific node
graphify explain "APIRouter"
Real output from graphify run on FastAPI:
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]
...
Notice the edge tags: [EXTRACTED] for explicit source relationships, [INFERRED] for derived ones.
Example 3: Path tracing between concepts
graphify path "FastAPI" "ModelField"
Output:
Shortest path (3 hops):
FastAPI --uses--> DefaultPlaceholder <--references-- get_request_handler() --references--> ModelField
This reveals indirect relationships that would require multiple grep and find invocations to discover manually.
Example 4: Natural language query
graphify query "what connects auth to the database?"
Returns a scoped subgraph relevant to the question, leveraging the graph structure rather than keyword matching.
Advanced Usage & Best Practices
Incremental updates. After initial build, use --update to re-extract only changed files, avoiding full rebuild costs:
/graphify ./docs --update
Commit graphify-out/ to version control. The project explicitly recommends this for team sharing. Add cost.json to .gitignore (local-only), and optionally cache/ if you want smaller repos. The manifest.json is now portable with relative paths.
Auto-rebuild with git hooks. Install post-commit and post-checkout hooks:
graphify hook install
This also configures a merge driver for graph.json—parallel commits get union-merged automatically.
Suppress utility super-hubs. High-degree utility nodes (loggers, common imports) can dominate community detection. Exclude them:
/graphify . --cluster-only --exclude-hubs 99
Claude Code prompt cache protection. Graphify outputs in graphify-out/ can invalidate Claude Code's prompt cache. Add to .claudeignore:
graph.json
graphify-out/
Ollama for fully local operation. For data-residency requirements or air-gapped environments, use --backend ollama with a local model—no API keys needed for code parsing, and semantic extraction runs entirely on-device.
Comparison with Alternatives
| Aspect | safishamsi/graphify | Vector-RAG (typical) | Traditional static analysis |
|---|---|---|---|
| Code representation | Property graph with typed edges | Embedding vectors + chunks | AST with limited cross-file |
| Query model | Graph traversal, path finding | Similarity search | Symbol lookup, call graphs |
| Local execution | Full code parsing offline | Requires embedding model | Offline, but narrow scope |
| Relationship provenance | EXTRACTED/INFERRED tags |
Opaque similarity scores | Explicit where implemented |
| Non-code content | Integrated (docs, PDFs, media) | Requires separate pipeline | Typically unsupported |
| AI assistant integration | 20+ native skills | Generic retrieval plugin | None |
Vector-RAG systems (embedding-based retrieval) scale well to massive corpora and handle fuzzy semantic similarity naturally. Graphify trades some of that fuzziness for structure, explainability, and deterministic code relationships. If your primary need is "find code similar to this description," embeddings may serve better. If your need is "how does X connect to Y across my system," graphify's explicit edges are superior.
Traditional static analysis tools (language servers, cscope, ctags) offer precise symbol navigation within single languages but rarely cross language boundaries or integrate documentation and infrastructure. Graphify's multi-modal, multi-language graph is broader in scope.
FAQ
Is graphify free? Yes, MIT-licensed. Code parsing requires no API keys. Non-code semantic extraction uses your configured AI backend or assistant's model.
Does it work offline?
Code parsing is fully offline. Docs/images/video require LLM access unless using --backend ollama with a local model.
Why is the PyPI package graphifyy with two y's?
The graphify name was unavailable. The CLI command is still graphify.
How does it handle large codebases?
The HTML visualization may struggle beyond ~5000 nodes; use --no-viz and query graph.json directly. Community detection supports parallel labeling with --max-concurrency.
Can I use this without an AI assistant?
Yes, graphify extract and all graphify query/path/explain commands work headless. Assistant integration is optional but convenient.
What about data privacy?
No telemetry, no analytics. Query logging is opt-in (GRAPHIFY_QUERY_LOG_ENABLE=1). Code never leaves your machine during parsing.
How do I fix "graphify: command not found"?
Run uv tool update-shell (uv) or pipx ensurepath, then open a new terminal. The binary is in ~/.local/bin.
Conclusion
safishamsi/graphify offers a genuinely different approach to codebase understanding: structure over similarity, traversal over search, provenance over opacity. For developers maintaining complex systems—especially polyglot codebases with intertwined application logic, schemas, and infrastructure—the ability to query relationships as a graph rather than grep through files is a meaningful productivity shift.
The tool is best suited for teams who value local-first processing, deterministic code analysis, and transparent AI-assisted exploration of their systems. With 88,741 stars, active YC-backed development, and broad assistant platform support, it's past the experimental stage and worth evaluating for production workflows.
Ready to map your codebase? Install graphify and run your first /graphify . at https://github.com/safishamsi/graphify.