随库代码解析(understand-anything)

📅 2026/7/9 10:44:02
随库代码解析(understand-anything)
后端代码随库代码解析使用 understand-anything 搭建后端代码库随库代码解析从安装到检索的完整流程项目github地址https://github.com/Egonex-AI/Understand-Anything一、概述understand-anything 是一款面向源码的知识化处理工具能够对已有代码库进行深度扫描、记录。适用读者研发。二、安装 understand-anything2.1 Claude Code (Native)/plugin marketplace add Egonex-AI/Understand-Anything /plugin install understand-anything2.2 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 codexWindows (PowerShell):iwr -useb https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.ps1 | iex安装程序会将代码仓库克隆至~/.understand-anything/repo目录并为你所选平台创建对应的符号链接软链接。安装完成后请重启命令行工具或 IDE。支持的平台标识platformgemini、codex、opencode、pi、openclaw、antigravity、vibe、vscode、hermes、cline、kimi、trae、nanobot、kiro更新工具./install.sh --update卸载工具./install.sh --uninstall 平台标识Cursor将understand-anything代码仓库克隆后Cursor 编辑器会通过目录下的.cursor-plugin/plugin.json文件自动识别加载该插件无需手动安装只需克隆仓库并用 Cursor 打开即可。若自动识别失效可手动安装打开 Cursor 设置 → 插件页面在搜索框粘贴仓库地址https://github.com/Egonex-AI/Understand-Anything随后完成添加。VS Code GitHub Copilot克隆understand-anything代码仓库后搭载 GitHub Copilotv1.108 及以上版本的 VS Code 会通过.copilot-plugin/plugin.json文件自动识别该插件无需手动安装直接克隆仓库并用 VS Code 打开即可。若想让该插件能力作为个人技能在所有项目中生效执行上文的install.sh脚本并指定平台参数vscode。Copilot CLIcopilot plugin 下载 Egonex-AI/Understand-Anything:understand-anything-pluginKiro CLI / IDEcurl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s kiro下载后:Kiro CLI:kiro-cli chat --agent understand Analyze this projectKiro IDE:skills are 同步关联到~/.kiro/skills/and theunderstandagent 写入到了~/.kiro/agents/understand.json, so both are available after restarting the IDE.如需将该功能设为全局个人能力所有项目均可使用执行上述install.sh脚本并指定平台参数kiro。三、针对已扫描过的代码库使用/understand-dashboard 开启浏览器面板首次可能需要安装部分python包四、针对新建代码库或未扫描处理代码库使用claude code进入项目并唤醒claude后对话框输入/understand --language zh注意从0开始初始化一个代码仓库的understand可能会使用大量token五、其他指令# 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