@Ryrenz: 又挖到一个能让 Claude Code 真正看懂老项目的开源神器——Understand Anything GitHub 星标已经冲到 8 万+,Claude Code、Codex、Cursor、Copilot、Gemini CLI 这些…
摘要
Understand Anything 是一个开源工具,通过多智能体管道分析代码库并构建交互式知识图谱,帮助开发者理解复杂项目。它与 Claude Code、Codex、Cursor 等 AI 工具集成,并在 GitHub 上获得超过 8 万星标。
查看缓存全文
缓存时间: 2026/08/27 05:30
又挖到一个能让 Claude Code 真正看懂老项目的开源神器——Understand Anything
GitHub 星标已经冲到 8 万+,Claude Code、Codex、Cursor、Copilot、Gemini CLI 这些都能接。
接手一个没人讲得清的祖传仓库,最难受的是改一行不知道会连累谁,只能全局搜函数名,一层层点进去看调用,看完还是不敢提交。它先用 Tree-sitter 把文件、函数、类、导入、调用和继承的关系抠出来,再让大模型补上语义,最后给你一张能点开、能搜、能直接提问的图。
问「这个模块归哪一层」「改了它会影响什么」,它直接在图上回;还能生成引导式导览,新人照着走一遍就有了轮廓。改完代码只重新分析变动过的文件,不用整仓重跑,中文输出也支持。
以前是人替 AI 读代码,现在反过来了。
GitHub:
Egonex-AI/Understand-Anything
Source: https://github.com/Egonex-AI/Understand-Anything
Understand Anything
Turn any codebase, knowledge base, or docs 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. Understand Anyone.
AI should help people, not replace them.
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Español | Türkçe | Русский
An open-source project from Egonex
Originally created by Lum1104.
You just joined a new team. The codebase is 200,000 lines of code. Where do you even start?
Understand Anything is a Claude Code Plugin that analyzes your project with a multi-agent pipeline, builds a knowledge graph of every file, function, class, and dependency, then gives you an interactive dashboard to explore it all visually. Stop reading code blind. Start seeing the big picture.
The goal isn’t a graph that wows you with how complex your codebase is — it’s a graph that quietly teaches you how every piece fits together.
✨ Features
Want to skip the reading? Try the live demo in our homepage — a fully interactive dashboard you can pan, zoom, search, and explore right in your browser.
Explore the structural graph
Navigate your codebase as an interactive knowledge graph — every file, function, and class is a node you can click, search, and explore. Select any node to see plain-English summaries, relationships, and guided tours.
Understand business logic
Switch to the domain view and see how your code maps to real business processes — domains, flows, and steps laid out as a horizontal graph.
Analyze knowledge bases
Point /understand-knowledge at a Karpathy-pattern LLM wiki and get a force-directed knowledge graph with community clustering. The deterministic parser extracts wikilinks and categories from index.md, then LLM agents discover implicit relationships, extract entities, and surface claims — turning your wiki into a navigable graph of interconnected ideas.
🧭 Guided ToursAuto-generated walkthroughs of the architecture, ordered by dependency. Learn the codebase in the right order. |
🔍 Fuzzy & Semantic SearchFind anything by name or by meaning. Search "which parts handle auth?" and get relevant results across the graph. |
📊 Diff Impact AnalysisSee which parts of the system your changes affect before you commit. Understand ripple effects across the codebase. |
🎭 Persona-Adaptive UIThe dashboard adjusts its detail level based on who you are — junior dev, PM, or power user. |
🏗️ Layer VisualizationAutomatic grouping by architectural layer — API, Service, Data, UI, Utility — with color-coded legend. |
📚 Language Concepts12 programming patterns (generics, closures, decorators, etc.) explained in context wherever they appear. |
🚀 Quick Start
1. Install the plugin
/plugin marketplace add Egonex-AI/Understand-Anything
/plugin install understand-anything
Using a local model? For privacy or enterprise setups, point your platform at a local model provider such as Ollama — follow their integration guide to change the model provider.
2. Analyze your codebase
/understand
A multi-agent pipeline scans your project, extracts every file, function, class, and dependency, then builds a knowledge graph saved to .ua/knowledge-graph.json. (Projects that already have a .understand-anything/ directory keep using it — it stays the data directory when present, so nothing needs migrating.)
Heads up on token usage: The initial
/understandanalyzes your whole codebase and can consume a significant number of tokens on large projects. We recommend running it on a token plan / subscription, or using a local model (see above) for initialization. Subsequent runs are incremental by default — only changed files are re-analyzed — so they use far fewer tokens.
Localized output: Use --language to generate content in your preferred language:
# Generate Chinese content (知识图节点描述和 Dashboard UI)
/understand --language zh
# Supported languages: en (default), zh, zh-TW, ja, ko, ru
On the first run in a project — when you don’t pass --language and no language is stored yet — /understand detects the language you’re conversing in. If it isn’t English, it asks you to confirm (or override) before generating; English conversations are unaffected. Your choice is saved to .ua/config.json and reused on every later run.
The --language parameter affects:
- Node summaries and descriptions in the knowledge graph
- Dashboard UI labels, buttons, and tooltips
- Guided tour explanations
3. Explore the dashboard
/understand-dashboard
An interactive web dashboard opens with your codebase visualized as a graph — color-coded by architectural layer, searchable, and clickable. Select any node to see its code, relationships, and a plain-English explanation.
4. Keep learning
# Ask anything about the codebase
/understand-chat How does the payment flow work?
# Analyze impact of your current changes
/understand-diff
# Deep-dive into a specific file or function
/understand-explain src/auth/login.ts
# Generate an onboarding guide for new team members
/understand-onboard
# Extract business domain knowledge (domains, flows, steps)
/understand-domain
# Analyze a Karpathy-pattern LLM wiki knowledge base
/understand-knowledge ~/path/to/wiki
# Re-run anytime — incremental by default (only re-analyzes changed files)
/understand
# Auto-update on every commit via a post-commit hook
/understand --auto-update
# Scope to a subdirectory (for huge monorepos)
/understand src/frontend
🌐 Multi-Platform Installation
Understand-Anything works across multiple AI coding platforms.
Claude Code (Native)
/plugin marketplace add Egonex-AI/Understand-Anything
/plugin install understand-anything
One-line install (Codex / OpenCode / OpenClaw / Antigravity / Gemini CLI / Pi Agent / Vibe CLI / VS Code Copilot / Hermes / Cline / KIMI CLI / Trae / Nanobot / Kiro)
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash
# or skip the prompt by passing the platform:
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s codex
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.ps1 | iex
The installer clones the repo to ~/.understand-anything/repo and creates the right symlinks for the chosen platform. Restart your CLI/IDE afterwards.
Note on invoking skills: the invocation prefix differs per platform. Most platforms use slash commands (
/understand), but Codex uses$instead — type$understand, not/understand. If neither prefix is recognized on your platform, just ask in plain language: “Use the understand skill to analyze this project.”
- Supported
<platform>values:gemini,codex,opencode,pi,openclaw,antigravity,vibe,vscode,hermes,cline,kimi,trae,nanobot,kiro - Update later:
- macOS / Linux:
./install.sh --update - Windows:
& "$HOME/.understand-anything/repo/install.ps1" -Update
- macOS / Linux:
- Uninstall:
- macOS / Linux:
./install.sh --uninstall <platform> - Windows:
& "$HOME/.understand-anything/repo/install.ps1" -Uninstall <platform>
- macOS / Linux:
Cursor
Cursor auto-discovers the plugin via .cursor-plugin/plugin.json when this repo is cloned. No manual installation needed — just clone and open in Cursor.
If auto-discovery doesn’t pick it up, install it manually: open Cursor Settings → Plugins, paste https://github.com/Egonex-AI/Understand-Anything into the search field, and add it from there.
VS Code + GitHub Copilot
VS Code with GitHub Copilot (v1.108+) auto-discovers the plugin via .copilot-plugin/plugin.json when this repo is cloned. No manual installation needed — just clone and open in VS Code.
For personal skills (available across all projects), run the install.sh above with the vscode platform.
Copilot CLI
copilot plugin install Egonex-AI/Understand-Anything:understand-anything-plugin
Kiro CLI / IDE
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s kiro
After installation:
- Kiro CLI:
kiro-cli chat --agent understand "Analyze this project" - Kiro IDE: The skills are symlinked into
~/.kiro/skills/and theunderstandagent is written to~/.kiro/agents/understand.json, so both are available after restarting the IDE.
For personal skills (available across all projects), run the install.sh above with the kiro platform.
Platform Compatibility
| Platform | Status | Install Method |
|---|---|---|
| Claude Code | ✅ Native | Plugin marketplace |
| Cursor | ✅ Supported | Auto-discovery |
| VS Code + GitHub Copilot | ✅ Supported | Auto-discovery |
| Copilot CLI | ✅ Supported | Plugin install |
| Codex | ✅ Supported | install.sh codex |
| OpenCode | ✅ Supported | install.sh opencode |
| OpenClaw | ✅ Supported | install.sh openclaw |
| Antigravity | ✅ Supported | install.sh antigravity |
| Gemini CLI | ✅ Supported | install.sh gemini |
| Pi Agent | ✅ Supported | install.sh pi |
| Vibe CLI | ✅ Supported | install.sh vibe |
| Hermes | ✅ Supported | install.sh hermes |
| Cline | ✅ Supported | install.sh cline |
| KIMI CLI | ✅ Supported | install.sh kimi |
| Trae | ✅ Supported | install.sh trae |
| Nanobot | ✅ Supported | install.sh nanobot |
| Kiro CLI / IDE | ✅ Supported | install.sh kiro |
📦 Share the Graph with Your Team
The graph is just JSON — commit it once, and teammates skip the pipeline. Good for onboarding, PR reviews, and docs-as-code.
Example: GoogleCloudPlatform/microservices-demo — Go / Java / Python / Node reference with a committed graph.
What to commit: everything in .ua/ except intermediate/ and diff-overlay.json (those are local scratch). (Legacy projects use .understand-anything/ — substitute that directory name below if it’s the one present.)
.ua/intermediate/
.ua/diff-overlay.json
Keep it fresh: enable /understand --auto-update — a post-commit hook incrementally patches the graph so each commit lands with a matching graph. Or re-run /understand manually before releases.
Large graphs (10 MB+): track with git-lfs.
git lfs install
git lfs track ".ua/*.json"
git add .gitattributes .ua/
View the dashboard without Claude Code
Once a graph has been generated and committed, anyone on the team can open it with one command — no Claude Code, no LLM, no API key. Only Node.js (>= 18) is required:
npx https://github.com/Egonex-AI/Understand-Anything/releases/latest/download/understand-anything-viewer.tgz /path/to/analyzed/project
The terminal prints a tokenized URL (http://127.0.0.1:5173/?token=…) and opens the full interactive dashboard in your browser. The project directory (default: current directory) must contain the committed data directory (.ua/, or legacy .understand-anything/). Everything is served read-only from local disk — no LLM calls, no data leaves your machine.
Working from a clone instead? pnpm install && pnpm --filter @understand-anything/core build, then GRAPH_DIR=/path/to/analyzed/project pnpm dev:dashboard does the same via the Vite dev server.
🔧 Under the Hood
Tree-sitter + LLM hybrid
Static analysis and LLMs do what each does best:
- Tree-sitter (deterministic) — parses source into a concrete syntax tree and extracts structural facts: imports, exports, function/class definitions, call sites, inheritance. Pre-resolved into an
importMapduring the scan phase and passed to file-analyzers so they don’t re-derive imports from source. Same input → same output, every run. Also powers fingerprint-based change detection for incremental updates. - LLM (semantic) — reads the parsed structure alongside the original source to produce what parsers can’t: plain-English summaries, tags, architectural layer assignments, business-domain mapping, guided tours, language concept callouts.
This split is why the graph is reproducible on the structural side (the same code always yields the same edges) while still capturing intent on the semantic side (what a file is for, not just what it imports).
Multi-Agent Pipeline
The /understand command orchestrates 5 specialized agents, /understand-domain adds a 6th, and /understand-knowledge adds a 7th:
| Agent | Role | Used By |
|---|---|---|
project-scanner | Discovers files, detects languages and frameworks | /understand |
file-analyzer | Extracts functions, classes, imports; produces graph nodes and edges | /understand |
architecture-analyzer | Identifies architectural layers | /understand |
tour-builder | Generates guided learning tours | /understand |
graph-reviewer | Validates graph completeness and referential integrity. Runs inline by default; use --review for full LLM review | /understand |
domain-analyzer | Extracts business domains, flows, and process steps | /understand-domain |
article-analyzer | Extracts entities, claims, and implicit relationships from wiki articles | /understand-knowledge |
File analyzers run in parallel, up to 5 concurrent workers and 20–30 files per batch.
The pipeline also supports incremental updates: only files changed since the last run are re-analyzed.
🎥 Community
A community-made walkthrough by Better Stack.
Made a video, blog post, or tutorial? Open an issue or PR — happy to feature it here.
🤝 Contributing
Contributions are welcome! Here’s how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Run the tests (
pnpm --filter @understand-anything/core test) - Commit your changes and open a pull request
Please open an issue first for major changes so we can discuss the approach.
Stop reading code blind. Start understanding everything.
Star History
Thanks to everyone who's used and contributed — knowing this saves people time is what made it worth building.
MIT License © Yuxiang Lin and Infinite Universe, Inc.
相似文章
@Luckyjudy666: 这个名为 Understand-Anything 的开源项目,正成为Github热度榜第一,狂揽2.2万颗星。 它是一个强大的 AI 辅助工具,能够将任何代码库、知识库或文档转化为可交互的、可视化的知识图谱。 1. 功能亮点: 多智能体协…
Understand-Anything 是一个开源的 AI 辅助工具,能将代码库、知识库或文档转化为交互式可视化知识图谱,支持多智能体协作与主流 AI 工具集成,已在 GitHub 获得 2.2 万星。
@GitHub_Daily: 刚接手一个新项目,面对几十万行代码,光是理清文件之间的调用关系和整体架构,就得花上好几天,效率很低。 于是找到 Understand Anything 这个开源项目,把整个代码库生成一张可交互的知识图谱,直观地看清每个模块之间的关系。 通…
Understand Anything 是一个开源项目,通过多智能体流水线自动分析代码库,生成可交互的知识图谱,帮助开发者快速理清代码结构和模块关系,支持与 Claude Code、Cursor 等主流 AI 编程工具集成。
@GoSailGlobal: Claude Code 插件这周出了一个 14.7K star 的爆款 Understand-Anything · 它的钩子很狠 「你刚加入一个新团队,代码 200,000 行,从哪开始?」 · 它做的事 把整个 codebase 跑成一…
Understand-Anything 是一个 Claude Code 插件,通过多 Agent 流水线将代码库转化为可交互的知识图谱,帮助开发者快速理解大型项目,支持依赖分析、Diff Impact Analysis 等功能。
@IndieDevHailey: 程序员跪着啃源码的噩梦时代,终结了! 这个项目让任何代码库直接变成可以点击、可以问答的交互式知识图谱! Understand Anything,21.8k stars,GitHub Trending 第一 点击任意函数,秒告诉你:这模块干…
Understand Anything 是一个开源工具,能将任何代码库转化为可点击、可问答的交互式知识图谱,帮助开发者快速理解代码结构、依赖关系和调用关系,支持 Claude Code、Cursor 和 VS Code,仅需一行命令即可安装。
@axichuhai: 在GitHub上看到一个专门教怎么用 Claude Code 的项目,已经涨到了 4w star 它不是官方操作文档,而是一条从入门到高级智能体的完整学习路径 斜杠命令、MCP配置、钩子脚本、子智能体编排,每个模块都有可视化图解,教你"怎…
介绍一个GitHub上标星4万的Claude Code学习项目,提供从入门到高级智能体的完整学习路径、可视化图解和可复用的模板。
