Understand-Anything: Interactive Knowledge Graphs for Codebases
Understand-Anything turns any codebase into an interactive knowledge graph you can explore, search, and query. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI. 60,339 GitHub stars.
- ⭐ 71677
- Updated 2026-06-15
Introduction #
You clone a new codebase. 50,000 lines of code across 200 files. You open VS Code and stare at the file tree. Where do you even start?
Most developers reach for grep. Then ripgrep. Then they open the 10 most-referenced files and try to piece together the architecture mentally. It works — for small projects. For anything substantial, it’s exhausting.
Understand-Anything does something fundamentally different. It transforms any codebase into an interactive knowledge graph — nodes for files, classes, and functions; edges for dependencies and relationships. You can explore, search, and ask questions about the code. Not with regex. With natural language.
60,339 GitHub stars in one month. 44,690 of those came this month alone. The AI agent community has found something they didn’t know they needed.
This is how codebases should feel from day one.

What Is Understand-Anything? #
Understand-Anything is an open-source tool by Egonex-AI that converts any codebase, documentation, or knowledge base into an interactive knowledge graph. Unlike static analysis tools that produce flat dependency lists, Understand-Anything builds a semantic graph where nodes represent code entities (files, classes, functions, variables) and edges represent relationships (imports, calls, inheritance, composition).
The result is a visual + queryable representation of code that humans and AI agents can both navigate. Claude Code can traverse it. Codex can reason over it. Cursor can reference it. The graph serves as a shared understanding layer between developers and AI assistants.
# Install via npm (TypeScript-based CLI)
npm install -g understand-anything
# Or use via Docker
docker run -v $(pwd):/code ghcr.io/egonex-ai/understand-anything:latest /code
The tool works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, OpenCode, and other AI coding agents — making it a universal knowledge layer for the AI coding toolchain.
How Understand-Anything Works #
The pipeline has three stages: parsing, graph construction, and indexing:
Source Code (all languages)
│
▼
┌─────────────────┐
│ AST Parser │ Extract files, classes, functions,
│ (multi-lang) │ imports, dependencies
└────────┬────────┘
│
▼
┌─────────────────┐
│ Graph Builder │ Creates nodes + edges:
│ │ Nodes: files, classes, funcs
│ │ Edges: calls, imports, extends
└────────┬────────┘
│
▼
┌─────────────────┐
│ Embedding + │ Vector indices for semantic
│ Indexing │ search; graph indices for
│ │ structural traversal
└────────┬────────┘
│
▼
Knowledge Graph
(explore + query)
Each language is parsed with its native AST (Python with ast, TypeScript with typescript compiler API, etc.). The graph is stored in a compact format optimized for both visualization and fast queries.
The indexing layer adds vector embeddings for semantic search — enabling “find all functions that handle authentication” type queries across the entire codebase.
Installation & Setup #
Quick Install #
# npm installation (recommended)
npm install -g understand-anything
# Verify
understand-anything --version
Docker Installation #
# Pull latest image
docker pull ghcr.io/egonex-ai/understand-anything:latest
# Analyze a codebase
docker run --rm -v $(pwd):/code \
ghcr.io/egonex-ai/understand-anything:latest \
/code --output ./knowledge-graph.json
From Source #
git clone https://github.com/Egonex-AI/Understand-Anything.git
cd Understand-Anything
npm install
npm run build
npm link # global install
Python Wrapper #
pip install understand-anything-python
from understand_anything import CodebaseAnalyzer
analyzer = CodebaseAnalyzer("/path/to/codebase")
analyzer.build_graph()
analyzer.export_graph("graph.json")
Configuration #
{
"include": ["src/**/*.{ts,tsx,js,jsx}", "tests/**/*"],
"exclude": ["node_modules", "dist", "*.test.*"],
"languages": ["typescript", "python", "rust", "go"],
"embedding_model": "all-MiniLM-L6-v2",
"max_file_size": 50000,
"max_depth": 5
}
Integration with Mainstream Tools #
Claude Code Integration #
# Add knowledge graph to Claude Code context
understand-anything analyze ./src --format claude-code
# Claude Code automatically loads the graph for context-aware responses
Cursor IDE Plugin #
# Install the Cursor extension
# Settings → Extensions → Understand-Anything
# Point to your project root
# Cursor will show the knowledge graph sidebar
# Click any node to navigate to the source
GitHub Copilot Extension #
# Generate a .copilot context file
understand-anything analyze ./src --format copilot
# Creates .github/copilot-instructions.md with
# graph-derived context for Copilot
VS Code Extension #
# Install from marketplace
# vscode-marketplace: egonex.understand-anything
# Or CLI install
npx @egonex/vscode-extension install
Benchmarks & Real-World Use Cases #
Analysis Speed by Codebase Size #
| Codebase Size | Files | Analysis Time | Graph Nodes | |
💬 Discussion