Skip to content

[codex] improve graph CLI for large repos#169

Merged
jayhack merged 1 commit into
developfrom
codex/graph-cli-large-repos
Jun 24, 2026
Merged

[codex] improve graph CLI for large repos#169
jayhack merged 1 commit into
developfrom
codex/graph-cli-large-repos

Conversation

@jayhack

@jayhack jayhack commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add agent-friendly graph CLI commands: symbols for target discovery and callgraph for clean local call graph traversal.
  • Improve existing graph commands with --resolved-only, --local-only, --hide-runtime, and --dedupe filters, plus affected-file reporting in rename --check.
  • Fix large TypeScript monorepo parsing by resolving directory project references to tsconfig.json and avoiding Git config writes for read-only graph inspection.
  • Add a site-native /cli reference page for the new high-level agent command surface, avoiding the retired Mintlify docs path.

Impact

  • Full ClickUp sd TypeScript repo parsing works with the Rust backend: 12,045 files in ~14-15s locally.
  • sd parse memory is about 0.6 GB peak RSS: built-in diagnose reported 615.9 MB peak RSS; /usr/bin/time -l reported 608,649,216 bytes max RSS.
  • Full-repo symbols, inspect, and outbound callgraph work against sd with --backend rust --fallback error.
  • Rust compact inbound callgraph returns file-level usage edges; scoped Python still provides function-level inbound caller recursion.
  • Existing using, usages, and rename behavior remains available, with new filters for cleaner agent output.

Validation

  • uv run --frozen pre-commit run --show-diff-on-failure --color=always --all-files --source origin/develop --origin HEAD
  • uv run ruff check src/graph_sitter/typescript/config_parser.py src/graph_sitter/typescript/ts_config.py src/graph_sitter/git/repo_operator/repo_operator.py src/graph_sitter/cli/cli.py src/graph_sitter/cli/commands/graph/common.py src/graph_sitter/cli/commands/using/main.py src/graph_sitter/cli/commands/usages/main.py src/graph_sitter/cli/commands/callgraph/main.py src/graph_sitter/cli/commands/symbols/main.py src/graph_sitter/cli/commands/rename/main.py tests/unit/cli/commands/graph/test_graph_commands.py tests/unit/cli/commands/parse/test_parse.py
  • uv run ty check --output-format=concise src/graph_sitter/git/repo_operator/repo_operator.py src/graph_sitter/typescript/config_parser.py src/graph_sitter/typescript/ts_config.py src/graph_sitter/cli/commands/callgraph/main.py src/graph_sitter/cli/commands/symbols/main.py src/graph_sitter/cli/cli.py src/graph_sitter/cli/commands/graph/common.py src/graph_sitter/cli/commands/rename/main.py src/graph_sitter/cli/commands/usages/main.py src/graph_sitter/cli/commands/using/main.py
  • uv run pytest tests/unit/cli/commands/graph/test_graph_commands.py tests/unit/cli/commands/parse/test_parse.py
  • uv run pytest tests/unit/cli/commands/graph/test_graph_commands.py tests/unit/cli/commands/parse/test_parse.py tests/unit/cli/commands/run/test_run.py tests/unit/cli/commands/transform/test_transform.py
  • rust-rewrite/tools/check_fast.sh
  • PATH="$HOME/.nvm/versions/node/v22.19.0/bin:$PATH" npm --prefix site run build
  • uv run graph-sitter parse /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --format json
  • uv run graph-sitter diagnose /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --json
  • /usr/bin/time -l uv run graph-sitter parse /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --format json
  • uv run graph-sitter symbols runInference /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --max-results 5 --format json
  • uv run graph-sitter inspect packages/ai-agent-harness/src/inference.ts /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --level functions --format json
  • uv run graph-sitter callgraph packages/ai-agent-harness/src/inference.ts.runInference /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --depth 1 --max-results 12 --format json
  • uv run graph-sitter callgraph packages/ai-agent-harness/src/inference.ts.runInference /Users/jayhack/CS/CLICKUP/sd --language typescript --backend rust --fallback error --direction inbound --depth 1 --max-results 12 --format json
  • Parallel sd smoke: symbols, outbound callgraph, and inbound callgraph ran together without Git config lock errors; /Users/jayhack/CS/CLICKUP/sd stayed clean.

@jayhack jayhack requested a review from a team as a code owner June 24, 2026 02:47
@jayhack jayhack requested review from matthieualouis and removed request for a team June 24, 2026 02:47
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graph-sitter Ready Ready Preview, Comment Jun 24, 2026 3:05am

Request Review

@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
graph-sitter 🔴 Failed Jun 24, 2026, 2:48 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@jayhack jayhack force-pushed the codex/graph-cli-large-repos branch from 24add84 to de5b5bb Compare June 24, 2026 03:05
@jayhack jayhack merged commit 45ecd5e into develop Jun 24, 2026
9 checks passed
@jayhack jayhack deleted the codex/graph-cli-large-repos branch June 24, 2026 03:08
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.

1 participant