ARTICLE DETAIL

资讯详情

深耕网站视觉设计与运营推广的一线实战洞察。

如何在Cursor、Codex、Gemini CLI上安装graphify:20+个AI助手平台一键配置

如何在Cursor、Codex、Gemini CLI上安装graphify:20+个AI助手平台一键配置 如何在Cursor、Codex、Gemini CLI上安装graphify20个AI助手平台一键配置【免费下载链接】graphifyTurn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.项目地址: https://gitcode.com/GitHub_Trending/graph/graphifygraphify 是一款开源的本地代码知识图谱工具在 AI 编程助手里输入/graphify它就能把代码、文档、SQL 配置和 PDF 解析成可查询的 knowledge graph之后用自然语言提问替代反复 grep 翻文件。代码部分完全走本地 tree-sitter AST 解析免费、无向量库、不消耗 LLM 额度。本文以 Cursor、Codex、Gemini CLI 三个主流平台为例带你在 20 个 AI 助手上完成 graphify 一键配置全程只需几条命令。为什么需要 graphify 知识图谱传统方式graphify 方式AI 每次读原始文件token 消耗高查询紧凑的graph.json官方基准显示 token 最多减少71.5xgrep 只能找到字面匹配可跨文件追踪calls/imports/inherits调用链语义靠模型猜每条边都带EXTRACTED源码明确或INFERRED推断置信标签运行一次后会产出三个文件graph.html浏览器里点节点、筛社区、GRAPH_REPORT.md架构亮点报告、graph.json完整图谱可随时查询。工作机制详见 docs/how-it-works.md。graphify 把 FastAPI 代码库映射成的交互式图谱每个节点是一个概念颜色代表自动检测出的社区整张图都可以在浏览器里点击查询。安装前准备30 秒确认环境依赖最低版本检查命令Python3.10python --versionuv推荐任意uv --versionpipx备选任意pipx --versionmacOS 可一键装齐brew install python3.12 uvWindows 用winget install astral-sh.uv。安装器逻辑位于 graphify/install.pyCLI 入口在 graphify/cli.py。⚠️ 注意PyPI 上的官方包名是graphifyy双 y其他graphify*包均非官方命令行仍然是graphify。三步完成 graphify 安装第 1 步安装命令行工具推荐 uv 隔离环境避免 PATH 与环境冲突uv tool install graphifyy # 推荐 # 备选 pipx install graphifyy pip install graphifyy # 可能需要自行配置 PATH第 2 步把技能注册给你的 AI 助手默认注册 Claude Codegraphify install第 3 步在助手里输入/graphify .等待生成图谱即可。Cursor 安装步骤graphify cursor install一条命令完成两件事注册/graphify技能到 Cursor写入.cursor/rules/graphify.mdc并设置alwaysApply: trueCursor 会在每次对话中自动带上优先查图谱的规则无需额外 hook。配置完成后在 Cursor 对话框输入/graphify .即可开始建图。Codex 安装步骤graphify install --platform codexCodex 有两个专属注意点并行抽取需要在~/.codex/config.toml的[features]下开启multi_agent true否则子代理并行建图不可用调用语法Codex 用$graphify .而不是/graphify .$是 Codex 的技能调用符。Gemini CLI 安装步骤graphify install --platform geminiGemini CLI 属于 hook 平台安装时会注册PreToolUsehook当助手准备用搜索类工具翻文件时自动触发引导它改走graphify query 问题的图谱路径。20 个 AI 助手平台一键配置清单同一个 graphify换平台只需换一条命令完整列表见 README.md 的 Install 章节平台安装命令Claude Codegraphify installCodexgraphify install --platform codexGemini CLIgraphify install --platform geminiCursorgraphify cursor installGitHub Copilot CLIgraphify install --platform copilotVS Code Copilot Chatgraphify vscode installOpenCodegraphify install --platform opencodeKilo Codegraphify install --platform kiloAidergraphify install --platform aiderFactory Droidgraphify install --platform droidTrae / Trae CNgraphify install --platform traeCN 版用trae-cnKimi Codegraphify install --platform kimiAmpgraphify amp installKirographify kiro installDevin CLIgraphify devin installGoogle Antigravitygraphify antigravity installAgent Skills跨框架通用graphify install --platform agents 想只装到当前仓库供团队共享而不是个人配置目录加--projectgraphify install --project --platform codex让 AI 助手始终优先查图谱建好图后再执行一次同名安装命令即可写入always-on配置让助手回答架构类问题时优先跑graphify query 问题而不是逐文件读源码Hook 平台Claude Code、Gemini CLI注册PreToolUsehook搜索/读文件前自动提醒走图谱指令文件平台Codex、Cursor 等写入AGENTS.md、.cursor/rules/等持久化规则文件。安装后如何验证/graphify . # Codex 用 $graphify . graphify explain APIRouter # 解释一个概念的所有连接 graphify path FastAPI ModelField # 追踪两节点最短路径看到graphify-out/目录下生成graph.html、GRAPH_REPORT.md、graph.json三个文件即安装成功。常见问题FAQQ1提示graphify: command not founduv/pipx把命令放在~/.local/bin新装后未加入 PATH。运行uv tool update-shell或pipx ensurepath后重开终端即可。Q2Mac/Windows 上ModuleNotFoundError: No module named graphify尽量别用裸pip install——技能会在运行时从graphify-out/.graphify_python解析 Python 环境和 pip 装的环境不一致就会报错。用uv tool install或pipx install隔离环境最省心。Q3PowerShell 里/graphify .不生效PowerShell 中前导/是路径分隔符请改用graphify .。Q4升级 graphify 后 hook 失效graphify hook install会把当时的解释器路径写进 hook 脚本重装/升级后重跑一次即可刷新。Q5想彻底移除graphify uninstall --purge # 从所有平台移除并删除 graphify-out/按平台移除可用graphify cursor uninstall、graphify codex uninstall等命令。小结graphify 的安装路径非常统一装 CLIgraphifyy双 y→ 按平台执行一条 install 命令 → 助手里输入/graphify .。Cursor 写.cursor/rules/规则、Codex 开multi_agent、Gemini CLI 挂 PreToolUse hook——差异都被封装在一条命令里。本地 AST 解析不花一分钱每条边带置信标签比向量检索更可控。装完之后你的 AI 助手就从翻文件升级为查图谱了 【免费下载链接】graphifyTurn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.项目地址: https://gitcode.com/GitHub_Trending/graph/graphify创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表