Skip to content

feat(cli): add callers, callees, impact commands for CLI/MCP parity#204

Merged
colbymchenry merged 3 commits into
colbymchenry:mainfrom
zhuchaokn:feat/cli-callers-callees-impact
May 22, 2026
Merged

feat(cli): add callers, callees, impact commands for CLI/MCP parity#204
colbymchenry merged 3 commits into
colbymchenry:mainfrom
zhuchaokn:feat/cli-callers-callees-impact

Conversation

@zhuchaokn
Copy link
Copy Markdown
Contributor

MCP couples graph intelligence to the agent runtime. Developers using scripts, CI pipelines, git hooks, or editor-agnostic workflows need the same capabilities without a running MCP server. This brings the CLI to feature parity with the three most-used graph traversal MCP tools.

New commands:
codegraph callers Find what calls a function/method (--limit, --json)
codegraph callees Find what a function/method calls (--limit, --json)
codegraph impact Analyze what code is affected by a change (--depth, --json)

All three commands support --path for explicit project targeting and --json for machine-readable output suitable for piping into other tools. impact groups output by file, matching the MCP codegraph_impact layout.

zhuchao14 and others added 3 commits May 20, 2026 16:10
MCP couples graph intelligence to the agent runtime. Developers using
scripts, CI pipelines, git hooks, or editor-agnostic workflows need the
same capabilities without a running MCP server. This brings the CLI to
feature parity with the three most-used graph traversal MCP tools.

New commands:
  codegraph callers <symbol>   Find what calls a function/method (--limit, --json)
  codegraph callees <symbol>   Find what a function/method calls (--limit, --json)
  codegraph impact <symbol>    Analyze what code is affected by a change (--depth, --json)

All three commands support --path for explicit project targeting and
--json for machine-readable output suitable for piping into other tools.
impact groups output by file, matching the MCP codegraph_impact layout.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Drop the opinionated 'Why CLI parity with MCP matters' README blockquote
and the long motivation code comment; keep the factual command docs. No
behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@colbymchenry colbymchenry merged commit 1f11de7 into colbymchenry:main May 22, 2026
@colbymchenry
Copy link
Copy Markdown
Owner

Merged — thanks @zhuchaokn! 🎉 Solid, clean implementation. Validated end-to-end on the current main (your branch was 47 commits behind, so I merged main in first): all three commands produce correct output against a fresh index — callers/callees resolve symbols with the exact-match-plus-fallback logic, impact groups by file to match the MCP layout, --json is clean, and the not-found / uninitialized paths behave.

One small polish on your branch before merge (credited to you): dropped the 'Why CLI parity with MCP matters' README blockquote and trimmed the long motivation comment — kept the factual command docs to match the repo's terser README/comment voice. The feature itself is unchanged. Great contribution. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants