GitHubhttps://github.com/Lum1104/Understand-Anything

官网https://understand-anything.com/

演示https://understand-anything.com/demo/

数据⭐ 32,816 Stars · 2,666 Forks · TypeScript

日期2026-05-26 · 调研人:小K ✨

16
支持平台
7
智能体管道
12
编程概念解释
6
多语言 UI

Understand Anything 调研报告

一、项目概览

Understand Anything 是一个将任意代码库、知识库或文档转换为可交互知识图谱的工具,通过多智能体管道分析项目,构建包含每个文件、函数、类和依赖关系的知识图谱,并提供可探索的可视化仪表板。

"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."

你刚加入一个 20 万行代码的团队。从哪里开始?Understand Anything 分析你的项目,构建知识图谱,给你一个交互式仪表板来可视化探索一切。停止盲目读代码,开始看清全局。


二、入口地址一览

类型地址
GitHubhttps://github.com/Lum1104/Understand-Anything
官网https://understand-anything.com/
Demohttps://understand-anything.com/demo/
macOS/Linux 安装curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash
Windows 安装iwr -useb https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.ps1 | iex

三、支持平台(16 个)

最广泛的 AI Coding 平台支持,覆盖所有主流工具:

平台状态安装方式
Claude Code原生Plugin marketplace
Cursor支持自动发现
VS Code + GitHub Copilot支持自动发现
Copilot CLI支持copilot plugin install
Codex支持install.sh codex
OpenCode支持install.sh opencode
OpenClaw支持install.sh openclaw
Antigravity支持install.sh antigravity
Gemini CLI支持install.sh gemini
Pi Agent支持install.sh pi
Vibe CLI支持install.sh vibe
Hermes支持install.sh hermes
Cline支持install.sh cline
KIMI CLI支持install.sh kimi
Trae支持install.sh trae

四、核心功能

🧭 引导游览

自动生成的架构引导游览,按依赖关系排序。以正确的顺序学习代码库。

🔍 模糊和语义搜索

按名称或按含义查找任何内容。搜索"哪些部分处理身份验证?"即可跨图谱获得相关结果。

📊 差异影响分析

在提交前查看更改影响的系统部分。理解代码库中的涟漪效应。

🎭 角色自适应 UI

仪表板根据用户身份调整详细程度——初级开发者、PM 或高级用户。

🏗️ 分层可视化

按架构层自动分组——API、Service、Data、UI、Utility——带有颜色编码图例。

📚 语言概念

12 种编程模式(泛型、闭包、装饰器等)在出现的上下文中解释。

业务逻辑理解

切换到领域视图,查看代码如何映射到真实业务过程——领域、流程和步骤以水平图形式展示。

知识库分析

对准 Karpathy 模式的 LLM wiki,获取带有社区聚类的力导向知识图谱。从 index.md 中提取 wikilinks 和分类,LLM 智能体发现隐式关系、提取实体并呈现声明——将 wiki 转换为可导航的互联思想图谱。


五、命令详解

命令功能
/understand分析代码库,构建知识图谱
/understand-dashboard打开交互式 Web 仪表板
/understand-chat <question>询问任何关于代码库的问题
/understand-diff分析当前更改的影响
/understand-explain <file>深入了解特定文件或函数
/understand-onboard为新团队成员生成入职指南
/understand-domain提取业务领域知识(领域、流程、步骤)
/understand-knowledge <path>分析 Karpathy 模式的 LLM wiki 知识库
/understand --auto-update每次提交时自动更新(post-commit hook)
/understand --language zh生成中文内容(支持 en/zh/zh-TW/ja/ko/ru)
/understand src/frontend限定范围(适用于大型 monorepo)

六、实现原理

6.1 Tree-sitter + LLM 混合架构

静态分析(deterministic) 语义分析(LLM) ↓ ↓ Tree-sitter 解析源码 → LLM 读取解析结构 + 提取结构事实: 原始源码 → imports, exports, 生成自然语言摘要、 函数/类定义、 标签、架构层分配、 调用站点、继承 业务领域映射、 ↓ ↓ importMap(预解析) 引导游览、语言概念标注

为什么这样分工:

6.2 多智能体管道

/understand 协调 7 个专门智能体:

智能体角色
project-scanner发现文件,检测语言和框架
file-analyzer提取函数、类、导入;生成图节点和边
architecture-analyzer识别架构层
tour-builder生成引导学习游览
graph-reviewer验证图完整性和引用完整性
domain-analyzer提取业务领域、流程和步骤(用于 /understand-domain
article-analyzer从 wiki 文章中提取实体、声明和隐式关系(用于 /understand-knowledge

文件分析器并行运行(最多 5 个并发,20-30 个文件/批次)。支持增量更新——只重新分析自上次运行以来已更改的文件。


七、与 CodeGraph 对比

维度Understand AnythingCodeGraph
Stars⭐ 32,816⭐ 26,134
语言TypeScriptTypeScript
核心定位知识图谱 + 交互仪表板 + 多智能体本地知识图谱 + MCP Server
交互界面独立 Web Dashboard纯命令行/MCP 工具
业务理解/understand-domain 业务领域分析
Wiki 支持Karpathy LLM wiki 分析
Diff 影响分析/understand-diffcodegraph_impact
平台数量16 个平台5 个代理
增量更新指纹变化检测文件监听
Benchmark无公开数据详细 7 代码库数据
目标用户新人 onboarding / 团队共享AI 代理上下文增强

八、快速上手

Claude Code(原生)

/plugin marketplace add Lum1104/Understand-Anything /plugin install understand-anything

一键安装(其他平台)

# macOS / Linux curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash # Windows iwr -useb https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.ps1 | iex

使用

# 分析代码库 /understand # 打开交互式仪表板 /understand-dashboard # 询问任何问题 /understand-chat How does the payment flow work? # 分析更改影响 /understand-diff

九、团队共享

图谱是 JSON 文件——提交一次,队友跳过管道。适合 onboarding、PR review 和 docs-as-code。

# .gitignore 中排除本地临时文件 .understand-anything/intermediate/ .understand-anything/diff-overlay.json # 大图谱(10 MB+)使用 git-lfs git lfs install git lfs track ".understand-anything/*.json"

十、核心亮点

亮点说明
最广泛平台支持16 个 AI Coding 平台,Claude Code 原生支持
交互式 Dashboard可视化知识图谱,可点击、搜索、漫游
多智能体管道7 个专门智能体分工协作
业务领域分析/understand-domain 提取业务领域、流程和步骤
LLM Wiki 支持/understand-knowledge 分析 Karpathy 模式 wiki
增量分析指纹变化检测,只重新分析已更改的文件
团队共享图谱 JSON 可提交到 git,队友直接使用
多语言 UI支持 6 种语言(en/zh/zh-TW/ja/ko/ru)生成内容