LLM-powered CLI for transforming polyglot codebases into queryable knowledge graphs.
- 🌍 Multi-Language Support - Go, Java, TypeScript, and Swift with extensible provider interface
- 📊 AST Extraction - Fast, deterministic extraction of functions, types, and relationships
- 🤖 LLM Enhancement - Optional semantic analysis to discover implicit dependencies
- 🔍 Graph Queries - BFS/DFS traversal, path finding, community detection
- 📈 Analysis Reports - God nodes, surprising connections, suggested questions
- 🌐 MCP Server - Integrate with Claude Desktop and Claude Code
- 📤 Multiple Exports - HTML, TOON, JSON, GraphML, Neo4j Cypher, Obsidian vault
- 👁️ Watch Mode - Auto-rebuild graph on file changes
- 🔗 Git Hooks - Automatic analysis on commit/checkout
# Build
go build -o graphize ./cmd/graphize
# Initialize a new graph database
graphize init
# Add your repository (Go, Java, TypeScript, Swift)
graphize add .
# Extract the graph (AST-based)
graphize analyze
# Generate an analysis report
graphize report
# Export interactive visualization
graphize export html -o graph.htmlGraphize provides a two-step extraction pipeline:
- Deterministic AST extraction - Fast, reproducible, always available
- LLM semantic extraction - Optional, adds inferred relationships and rationale
# Step 1: AST extraction
graphize analyze
# Step 2: Prepare for LLM (optional)
graphize enhance --json > files.json
# Step 3: Merge LLM results
graphize merge -i agents/graph/semantic-edges.json| Command | Description |
|---|---|
graphize init |
Initialize graph database |
graphize add <repo> |
Track a repository |
graphize status |
Show tracked sources |
graphize analyze |
Extract AST-based graph |
graphize enhance |
Prepare for LLM extraction |
graphize merge |
Merge semantic edges |
graphize query |
Query the graph |
graphize path <A> <B> |
Find shortest path between nodes |
graphize report |
Generate analysis report |
graphize benchmark |
Show token reduction statistics |
graphize watch |
Auto-rebuild on file changes |
graphize hook install |
Install git hooks |
graphize export html |
Cytoscape.js visualization |
graphize export obsidian |
Obsidian vault with wikilinks |
graphize export cypher |
Neo4j Cypher statements |
graphize serve |
Start MCP server |
Integrate with Claude Desktop or Claude Code:
{
"mcpServers": {
"graphize": {
"command": "graphize",
"args": ["serve", "-g", "/path/to/.graphize"]
}
}
}| Format | Use Case |
|---|---|
| TOON | Agent-friendly, token-efficient (default) |
| JSON | Machine-readable, full fidelity |
| HTML | Interactive Cytoscape.js visualization |
| GraphML | Import into Gephi, yEd, Cytoscape desktop |
| Cypher | Neo4j CREATE statements |
| Obsidian | Wiki-style vault with wikilinks |
Uses GraphFS for git-friendly storage:
.graphize/
├── manifest.json # Tracked sources
├── nodes/ # One file per node
├── edges/ # One file per edge
└── cache/ # Per-file extraction cache
Full documentation at plexusone.github.io/graphize
MIT