{"_id":"@alpsckr/pi-codegraph","_rev":"2-38e1439fe9003c81b4dc27401fbd597a","name":"@alpsckr/pi-codegraph","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.2":{"name":"@alpsckr/pi-codegraph","version":"0.1.2","keywords":["pi-package","codegraph","code-intelligence"],"author":{"name":"MrCKR"},"license":"MIT","_id":"@alpsckr/pi-codegraph@0.1.2","maintainers":[{"name":"alpsckr","email":"alpsckr@gmail.com"}],"homepage":"https://github.com/MrCKR/pi-codegraph#readme","bugs":{"url":"https://github.com/MrCKR/pi-codegraph/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"3d17296bed5eab9f31297ce15013bff975e8f817","tarball":"https://registry.npmjs.org/@alpsckr/pi-codegraph/-/pi-codegraph-0.1.2.tgz","fileCount":14,"integrity":"sha512-j1LzJWlK8oGk7Fb77JzAQ/w1m073NJ4aDEEVu3J00EFQ84lTrWEhty7lkDGlHNF1VKJt3waUMAWIhKRjZ5K2KQ==","signatures":[{"sig":"MEQCIFdnKHUv6AmYDp3BskvX78VJ640Jxjg/X3O8yobp5fyCAiBHjzCFMMredlaorz32PXWICrRahruGDV4XlE8LYIpoQQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82920},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"f608c29d28012186dde858cf774db64f277879a8","scripts":{"build":"tsc -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run check && npm run build"},"_npmUser":{"name":"alpsckr","email":"alpsckr@gmail.com"},"repository":{"url":"git+https://github.com/MrCKR/pi-codegraph.git","type":"git"},"_npmVersion":"10.9.8","description":"Pi native extension for CodeGraph tools and indexing commands.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"typebox":"^1.0.58","@earendil-works/pi-tui":"^0.75.5","@colbymchenry/codegraph":"^0.9.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^24.10.1","@earendil-works/pi-coding-agent":"^0.75.5"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-codegraph_0.1.2_1782383761000_0.891337013728815","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@alpsckr/pi-codegraph","version":"0.1.3","description":"Pi native extension for CodeGraph tools and indexing commands.","type":"module","keywords":["pi-package","codegraph","code-intelligence"],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","test":"npm run build && node --test test/lifecycle.test.mjs","prepublishOnly":"npm run check && npm test"},"pi":{"extensions":["./dist/index.js"]},"dependencies":{"@colbymchenry/codegraph":"^0.9.4","@earendil-works/pi-tui":"^0.75.5","typebox":"^1.0.58"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"devDependencies":{"@earendil-works/pi-coding-agent":"^0.75.5","@types/node":"^24.10.1","typescript":"^5.9.3"},"repository":{"type":"git","url":"git+https://github.com/MrCKR/pi-codegraph.git"},"bugs":{"url":"https://github.com/MrCKR/pi-codegraph/issues"},"homepage":"https://github.com/MrCKR/pi-codegraph#readme","license":"MIT","author":{"name":"MrCKR"},"gitHead":"a921c1a02f2a1e861bee75106aacfd5b300e14d1","_id":"@alpsckr/pi-codegraph@0.1.3","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-sQ4ZMnbuvxD5/DGit3QXIQ9MB3Ns2dg0H6owqlseHfHMrD9WSrsKn7fxzUJ7yP0/LIJB+WM6tysrxTj+jCAu+A==","shasum":"6e23fb502c6da907fdf06da9e3b5b7ef902d8f5a","tarball":"https://registry.npmjs.org/@alpsckr/pi-codegraph/-/pi-codegraph-0.1.3.tgz","fileCount":14,"unpackedSize":103063,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCi4qL92pDfCvxGr/OvmHHW5zUTPa47QouFXCjxeYNqQQIhAKenE+ZnPX+TjNm3m96ebzaprsQse4JuCeJ07fV7UsCt"}]},"_npmUser":{"name":"alpsckr","email":"alpsckr@gmail.com"},"directories":{},"maintainers":[{"name":"alpsckr","email":"alpsckr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-codegraph_0.1.3_1783676823692_0.4325916077067473"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T10:36:00.699Z","modified":"2026-07-10T09:47:03.917Z","0.1.2":"2026-06-25T10:36:01.141Z","0.1.3":"2026-07-10T09:47:03.831Z"},"bugs":{"url":"https://github.com/MrCKR/pi-codegraph/issues"},"author":{"name":"MrCKR"},"license":"MIT","homepage":"https://github.com/MrCKR/pi-codegraph#readme","keywords":["pi-package","codegraph","code-intelligence"],"repository":{"type":"git","url":"git+https://github.com/MrCKR/pi-codegraph.git"},"description":"Pi native extension for CodeGraph tools and indexing commands.","maintainers":[{"name":"alpsckr","email":"alpsckr@gmail.com"}],"readme":"# pi-codegraph\n\n## 安装\n\n```bash\npi install npm:@alpsckr/pi-codegraph\n```\n\n安装后在 pi 内执行：\n\n```text\n/reload\n```\n\n初始化并建立当前项目索引：\n\n```text\n/codegraph init\n```\n\n`/codegraph init` 是幂等命令：未初始化时会自动创建 `.codegraph/`，已初始化时会直接重建索引。\n\n只更新本地 CodeGraph 引擎：\n\n```text\n/codegraph update\n/reload\n```\n\n更新整个 pi-codegraph 扩展时：\n\n```bash\npi update npm:@alpsckr/pi-codegraph\n```\n\n然后：\n\n```text\n/reload\n```\n\n如果之前使用 git 安装，可以迁移到 npm 包：\n\n```bash\npi remove git:https://github.com/MrCKR/pi-codegraph\npi install npm:@alpsckr/pi-codegraph\n```\n\n也可以按 Git tag 固定源码版本：\n\n```bash\npi install git:https://github.com/MrCKR/pi-codegraph@v0.1.3\n```\n\n## 这是什么\n\n`pi-codegraph` 把 [CodeGraph](https://github.com/colbymchenry/codegraph) 接成 pi 原生扩展，提供：\n\n- `codegraph_*` native tools\n- `/codegraph <subcommand>` 命令\n- 内置 CodeGraph 工具使用提示词\n- `/codegraph init` / `/codegraph sync` 实时进度界面\n- `/codegraph version` / `/codegraph update` 本地引擎维护命令\n\n不需要全局安装 `codegraph`，也不需要配置 MCP。\n\n## 命令\n\n```text\n/codegraph init       初始化并建立或重建索引，带实时进度界面\n/codegraph sync       手动同步代码变动，带实时进度界面\n/codegraph status     查看索引状态\n/codegraph uninit     删除 .codegraph 索引\n/codegraph version    查看本地 CodeGraph 引擎版本\n/codegraph update     更新本地 CodeGraph 引擎\n/codegraph help       查看帮助\n```\n\n## 工具\n\n扩展会注册这些 pi 原生工具：\n\n- `codegraph_search`\n- `codegraph_context`\n- `codegraph_trace`\n- `codegraph_explore`\n- `codegraph_node`\n- `codegraph_callers`\n- `codegraph_callees`\n- `codegraph_impact`\n- `codegraph_files`\n- `codegraph_status`\n\n## 推荐用法\n\n问代码结构、调用链、影响范围时，优先让 agent 用 CodeGraph：\n\n```text\n这个 UI 框架是怎么打开界面的？\n帮我追一下 UIManager 到 ViewBase 的调用链。\n改 UIManager 会影响哪些地方？\n```\n\n## 同步策略\n\n- session 启动时会后台执行一次 catch-up sync。\n- session 运行期会启动 watcher，文件变化后自动 sync。\n- 需要兜底时手动执行 `/codegraph sync`。\n- 刚编辑文件后不要立刻查索引，watcher 有约 500ms～1s debounce 延迟。\n\n## 上游 CodeGraph 更新\n\n本包依赖 `@colbymchenry/codegraph`。已安装用户想只更新本机的 CodeGraph 引擎时，在 pi 内执行：\n\n```text\n/codegraph update\n/reload\n```\n\n`/codegraph update` 会在扩展自身安装目录内更新 `@colbymchenry/codegraph` 到最新稳定版，不会修改当前项目的 `.codegraph` 索引。\n维护者如果需要锁定或适配上游 API 变化，应同步更新本仓库依赖并运行：\n\n```bash\nnpm run check\nnpm run build\n```\n\n## 注意\n\n不要同时启用 CodeGraph MCP 和这个 pi 扩展，否则模型会看到两套 CodeGraph 工具。\n","readmeFilename":"README.md"}