Use CodeGraph from Pi.
- Adds
codegraph_explorefor architecture and flow questions. - Adds
codegraph_nodefor one named symbol, optionally pinned to a file. - Adds
codegraph_statusto check whether CodeGraph is ready in the current project.
codegraph_status uses codegraph status.
codegraph_explore and codegraph_node use one-shot calls through codegraph serve --mcp.
pi install git:github.com/bnema/pi-codegraphIf installed into a running Pi session, reload extensions:
/reload
Install CodeGraph first and make sure codegraph is on PATH:
codegraph --helpIndex each repo you want Pi to explore:
cd /path/to/project
codegraph init -iYou do not need codegraph install for Pi.
Ask Pi to use CodeGraph, or call the tools directly.
Examples:
codegraph_statuscodegraph_explorewithquery: "how does request validation reach the database layer"codegraph_explorewithquery: "runCodegraph formatStatus"codegraph_nodewithsymbol: "AuthService.login"codegraph_nodewithsymbol: "render", file: "src/ui/view.ts"
codegraph_exploretakes one required content argument:query. There is no separate names argument; put names directly inquery.codegraph_exploredefaults tomaxFiles: 6when omitted. Increase it only when the first answer is too narrow.- Prefer
codegraph_nodefor one exact symbol. - Prefer Pi's normal
readtool for raw file contents. - Treat
codegraph_exploreoutput as already-explored context; avoid immediately repeating the same area with duplicate file-path exploration unless you still need raw file contents.
npm install
npm run typecheck
npm run smoke
npm run pack:check
pi -e .npm run smoke covers the uninitialized status regression, invalid path error reporting, and an optional live check when codegraph 0.9.9 is on PATH.