safishamsi/graphify
⭐ 45,847 · Python · GitHub Repo
AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs, papers, images, or videos into a queryable knowledge graph. App code + database schema + infrastructure in one graph.
antigravity claude-code codex gemini graphrag knowledge-graph leiden openclaw
1-Sentence Summary
Graphify turns any folder into a queryable knowledge graph, slashing LLM token costs by 71.5x.
🔥 Key Capabilities & USP
- Multimodal Knowledge Graph Construction: Ingests code (AST/tree-sitter), SQL schemas, PDFs, images, and whiteboard photos into a single, unified graph. Solves the pain of fragmented knowledge across mixed-format codebases and documentation.
- 71.5x Token Reduction: By building a persistent graph, queries against the graph use dramatically fewer tokens than re-reading raw files. This is the core USP—directly reduces AI coding assistant costs and latency.
- Transparent Edge Tagging: Every relationship is tagged as
EXTRACTED,INFERRED, orAMBIGUOUS. You always know whether a connection was found in source code or guessed by the LLM, eliminating the "black box" trust issue. - Auto-Sync & Git Integration:
--watchmode rebuilds the graph in real-time as files change. Thegraphify hook installcommand adds a post-commit git hook, so your knowledge graph is always up-to-date with zero manual effort. - Rich Export Ecosystem: Outputs to interactive HTML, Obsidian vaults, Wikipedia-style wikis, SVG, GraphML (Gephi/yEd), Neo4j Cypher, and MCP stdio server—making the graph usable across visualization, analysis, and agentic workflows.
Technical Architecture
| Component | Technology | Role |
|---|---|---|
| Graph Engine | NetworkX | In-memory graph representation and traversal |
| Clustering | Leiden (via graspologic) | Community detection for graph structure |
| Code Parsing | tree-sitter | AST-based extraction of code concepts and relationships |
| LLM Extraction | Claude (Anthropic) | Concept and relationship extraction from docs, images, PDFs |
| Visualization | vis.js | Interactive HTML graph rendering |
| Caching | SHA256 | Only reprocesses changed files on re-runs |
| Storage | Local filesystem | No Neo4j or server dependencies; fully local operation |
Architectural Highlight: Runs entirely locally with zero external infrastructure. The --update flag merges new extractions into an existing graph without rebuilding from scratch, enabling incremental growth.
Quick Start Guide
# Install (note: PyPI name is graphifyy due to naming conflict)
pip install graphifyy && graphify install
# Run on current directory
/graphify .
# Run on a specific folder with deep inference
/graphify ./raw --mode deep
# Re-extract only changed files, merge into existing graph
/graphify ./raw --update
# Fetch a paper and update the graph
/graphify add https://arxiv.org/abs/1706.03762
# Query the graph
/graphify query "what connects attention to the optimizer?"
/graphify path "DigestAuth" "Response"
/graphify explain "SwinTransformer"
# Auto-sync as files change
/graphify ./raw --watch
# Export to various formats
/graphify ./raw --wiki
/graphify ./raw --svg
/graphify ./raw --graphml
/graphify ./raw --neo4j
/graphify ./raw --mcp
# Install post-commit git hook
graphify hook installPros, Cons & Use Cases
Pros
- Dramatic token reduction (71.5x) directly lowers costs for AI coding assistant users.
- Fully local—no Neo4j, no cloud dependencies, no data leaving your machine.
- Transparent extraction with edge tagging builds trust in the knowledge graph.
- Multimodal support (code, docs, images, PDFs) covers real-world heterogeneous repositories.
- Rich export formats integrate with existing tools (Obsidian, Gephi, Neo4j, MCP).
Cons
- Requires Python 3.10+ and Claude Code for LLM-based extraction—not a standalone tool.
- LLM extraction latency for docs/images may slow initial graph construction on large corpora.
- PyPI naming conflict means install command is
pip install graphifyyinstead ofgraphify. - No built-in vector search—queries rely on graph traversal, not semantic similarity.
Who should NOT use this?
- Developers working with small, single-language codebases—the overhead of graph construction outweighs benefits for projects you can already navigate manually.
- Teams without access to Claude Code—LLM extraction is a core feature; without it, you lose doc/image support and inference capabilities.
- Users needing real-time collaborative graphs—Graphify is a local, single-user tool with no multi-user or server mode.
- Projects requiring strict air-gapped operation—while the tool runs locally, Claude Code requires API access for LLM features.
Ideal Use Cases
- Large, mixed-format repositories (code + SQL + docs + images) where navigating manually is painful.
- AI coding assistant workflows (Claude Code, Codex, Cursor, Gemini CLI) where token costs are a concern.
- Research codebases with papers, whiteboard photos, and experimental scripts that need to be connected.
- Legacy system onboarding—quickly build a queryable map of undocumented code and infrastructure.
- Continuous integration pipelines—use the git hook to keep a live knowledge graph synced with every commit.
Community & Activity
With 45,847 stars, Graphify has clearly struck a nerve in the developer community. This is not a niche experiment—it's a rapidly adopted tool for anyone working with AI coding assistants on complex projects. The project was last updated on May 10, 2026, indicating active maintenance and a responsive maintainer. The breadth of topics (antigravity, claude-code, codex, gemini, graphrag, knowledge-graph, leiden, openclaw, rag, skills, tree-sitter) shows a project that's thinking about the full ecosystem, not just a single use case. If you're building agentic workflows or managing heterogeneous codebases, this is a project worth watching—and contributing to.