Egonex-AI/Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
📚 Understand Anything – Turn any codebase, knowledge base, or docs into an interactive knowledge graph
What it is – A plugin/CLI that runs on a variety of AI‑coding platforms (Claude Code, Codex, Cursor, VS Code + Copilot, Gemini CLI, etc.). It scans a project, extracts every file, function, class and dependency, then builds a JSON knowledge‑graph. The graph can be explored in a web dashboard where nodes are searchable, clickable, and annotated with plain‑English summaries, architectural layers, business‑domain mappings, and guided tours.
🎯 Core capabilities
| Feature | What you get |
|---|---|
| Structural graph | Every source file, function and class becomes a node; edges show imports, calls, inheritance, etc. |
| Semantic enrichment | LLM agents add human‑readable descriptions, layer tags (API, Service, Data, UI, Utility), and business‑logic mapping. |
| Guided tours | Auto‑generated walkthroughs that order the code by dependency so you can learn the architecture step‑by‑step. |
| Fuzzy & semantic search | Ask “which parts handle auth?” and the system returns relevant nodes across the graph. |
| Diff impact analysis | After a change, the tool highlights which parts of the graph are affected. |
| Persona‑adaptive UI | Dashboard simplifies or expands details for junior devs, PMs, or power users. |
| Knowledge‑base mode | Point the tool at a markdown wiki (e.g., Karpathy‑pattern LLM wiki) and get a force‑directed graph of concepts, entities and claims. |
| Incremental updates | Only files that changed since the last run are re‑analyzed, saving tokens and time. |
| Multi‑language UI | Node summaries and UI can be generated in English, Chinese (simplified/traditional), Japanese, Korean, Russian. |
🛠️ How it works under the hood
- Tree‑sitter parser – Deterministically builds a concrete syntax tree for each file, extracts imports, definitions, call sites, and creates a stable
importMap. - LLM agents – Take the parsed structure plus the raw source and produce natural‑language summaries, layer assignments, domain mapping, and tour scripts.
- Multi‑agent pipeline – Five core agents (project‑scanner, file‑analyzer, architecture‑analyzer, tour‑builder, graph‑reviewer) run in parallel (up to 5 workers). Optional domain‑analyzer and article‑analyzer handle business‑process extraction and wiki parsing.
- Output – A reproducible structural graph (same code → same edges) plus semantic annotations stored in
.ua/knowledge-graph.json.
🚀 Getting started (quick‑start)
# 1️⃣ Install on your platform (example for Claude Code)
/plugin marketplace add Egonex-AI/Understand-Anything
/plugin install understand-anything
# 2️⃣ Analyze a project (first run may use many LLM tokens)
/understand # creates .ua/knowledge-graph.json
# 3️⃣ Open the interactive dashboard
/understand-dashboard
For other platforms use the universal installer:
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s <platform>
Supported <platform> values include codex, gemini, vscode, kiro, cursor, etc.
💡 Typical use cases
- On‑boarding – New hires run
/understandand instantly explore the whole codebase visually. - PR reviews – Commit the generated
.ua/*.jsongraph; reviewers can see impact analysis without re‑running the pipeline. - Business‑logic discovery –
/understand-domainextracts high‑level processes (e.g., payment flow) from the code. - Documentation of wikis – Point
/understand-knowledgeat a markdown wiki to get a concept graph for internal knowledge bases. - Local, privacy‑first analysis – Plug a local LLM (e.g., Ollama) via the
--modelconfig to avoid sending source to the cloud.
📦 Sharing the graph
The graph is plain JSON, so you can commit it (excluding intermediate/ and diff‑overlay.json). Large graphs can be stored with git‑LFS. Anyone can view the dashboard without an LLM by running:
npx https://github.com/Egonex-AI/Understand-Anything/releases/latest/download/understand-anything-viewer.tgz /path/to/project
This serves the graph locally on http://127.0.0.1:5173.
🤝 Contributing & community
- Run tests with
pnpm --filter @understand-anything/core test. - Follow the usual fork → branch → PR workflow.
- Community videos are welcomed; open an issue or PR to be featured.
📜 License
MIT – © Yuxiang Lin and Infinite Universe, Inc.
Bottom line: Understand Anything lets you turn any sizable codebase (or markdown knowledge base) into a searchable, visual knowledge graph powered by a hybrid static‑analysis + LLM pipeline, with support for many AI coding assistants and a privacy‑friendly local‑only mode.
Related
- Project
- Project
- Project