understand-dashboard
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/understand-dashboard
/understand-dashboard
Start the Understand Anything dashboard to visualize the knowledge graph for the current project.
启动Understand Anything仪表板,以可视化当前项目的知识图谱。
Instructions
操作步骤
-
Determine the project directory:
- If contains a path, use that as the project directory
$ARGUMENTS - Otherwise, use the current working directory
- If
-
Check thatexists in the project directory. If not, tell the user:
.understand-anything/knowledge-graph.jsonNo knowledge graph found. Run /understand first to analyze this project. -
Find the dashboard code. The dashboard is atrelative to this plugin's root directory. Use the Bash tool to resolve the path:
packages/dashboard/bashPLUGIN_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"Or locate it by checking these paths in order:${CLAUDE_PLUGIN_ROOT}/packages/dashboard/- The parent directory of this skill file, then
../../packages/dashboard/
-
Install dependencies if needed:bash
cd <dashboard-dir> && pnpm install --frozen-lockfile 2>/dev/null || pnpm install -
Start the Vite dev server pointing at the project's knowledge graph:bash
cd <dashboard-dir> && GRAPH_DIR=<project-dir> npx vite --openRun this in the background so the user can continue working. -
Report to the user:
Dashboard started at http://localhost:5173 Viewing: <project-dir>/.understand-anything/knowledge-graph.json The dashboard is running in the background. Press Ctrl+C in the terminal to stop it.
-
确定项目目录:
- 如果包含路径,则使用该路径作为项目目录
$ARGUMENTS - 否则,使用当前工作目录
- 如果
-
检查项目目录中是否存在。如果不存在,告知用户:
.understand-anything/knowledge-graph.json未找到知识图谱。请先运行/understand命令分析此项目。 -
查找仪表板代码。仪表板位于此插件根目录的路径下。使用Bash工具解析路径:
packages/dashboard/bashPLUGIN_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"或者按以下顺序检查路径来定位:${CLAUDE_PLUGIN_ROOT}/packages/dashboard/- 此skill文件的父目录,然后是
../../packages/dashboard/
-
如有需要,安装依赖:bash
cd <dashboard-dir> && pnpm install --frozen-lockfile 2>/dev/null || pnpm install -
启动指向项目知识图谱的Vite开发服务器:bash
cd <dashboard-dir> && GRAPH_DIR=<project-dir> npx vite --open在后台运行此命令,以便用户可以继续工作。 -
向用户反馈:
仪表板已在http://localhost:5173启动 当前查看:<project-dir>/.understand-anything/knowledge-graph.json 仪表板正在后台运行。在终端中按Ctrl+C可停止它。
Notes
注意事项
- The dashboard auto-opens in the default browser via
--open - If port 5173 is already in use, Vite will pick the next available port
- The environment variable tells the dashboard where to find the knowledge graph
GRAPH_DIR
- 仪表板会通过参数在默认浏览器中自动打开
--open - 如果端口5173已被占用,Vite会选择下一个可用端口
- 环境变量用于告知仪表板知识图谱的位置
GRAPH_DIR