Skip to content

fix(cli): list prs, provider, and export formats in --help - #3186

Open
SyedFahad7 wants to merge 1 commit into
Graphify-Labs:v8from
SyedFahad7:cursor/fix-help-missing-commands-8535
Open

fix(cli): list prs, provider, and export formats in --help#3186
SyedFahad7 wants to merge 1 commit into
Graphify-Labs:v8from
SyedFahad7:cursor/fix-help-missing-commands-8535

Conversation

@SyedFahad7

Copy link
Copy Markdown
Contributor

Fixes #3140.

graphify --help is a hardcoded print(...) list in graphify/__main__.py and had drifted from dispatch_command() in graphify/cli.py. A user who only reads --help could not discover:

  • graphify prs (fully documented in the README; runs the PR dashboard)
  • graphify provider [list|show|add|remove]
  • seven of the eight export formats (html, obsidian, wiki, svg, graphml, neo4j, falkordb — only export callflow-html was listed)

Changes

Mechanical listing only — no generated help, no dispatch_command refactor.

  • Add one --help line for prs and one for provider, matching existing command-line style.
  • List all eight export formats the way cli.py's export usage block already does (format + flags), not only callflow-html.
  • Add tests/test_cli_help.py asserting graphify --help stdout contains prs, provider, and every export format.

Left out on purpose

  • hook-check / hook-guard: silent hook internals. __main__.py puts both in _silent_cmds because they run on every editor tool use and must be silent. The issue asks to exclude them.
  • cache-check / merge-chunks / merge-semantic: they print a usage string on bad args, but comments describe them as semantic-extraction subagent plumbing (consuming .graphify_chunk_*.json files written by semantic subagents). There is no _silent_cmds-equivalent marker, so they stay out until a maintainer call.

Verification

  • python -m graphify --help lists prs, provider, and all eight export formats
  • pytest tests/test_cli_help.py passes

graphify --help is a hardcoded print list that drifted from
dispatch_command(). Add the missing user-facing commands (prs,
provider, and all eight export formats) and a regression test.

Leave hook-check/hook-guard out (silent hook internals) and
leave cache-check/merge-chunks/merge-semantic out (internal
plumbing, needs a maintainer call).

Fixes Graphify-Labs#3140

Co-authored-by: Syed Fahad <sfahad2904@gmail.com>
@SyedFahad7
SyedFahad7 marked this pull request as ready for review August 29, 2026 07:21
Copilot AI lite review requested due to automatic review settings August 29, 2026 07:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes drift between the hardcoded top-level graphify --help output and the actual command surface implemented in dispatch_command() by explicitly listing missing user-facing commands and export formats, and adding a regression test to prevent future omissions.

Changes:

  • Update graphify/__main__.py’s --help output to include prs, provider, and all export formats (not just callflow-html).
  • Add tests/test_cli_help.py to assert --help includes prs, provider, and every export <format> entry, while keeping hook-check / hook-guard excluded.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
graphify/main.py Adds missing --help lines for prs, provider, and all export formats.
tests/test_cli_help.py New regression test ensuring graphify --help advertises these commands/formats.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/test_cli_help.py
Comment on lines +17 to +21
r = subprocess.run(
[PYTHON, "-m", "graphify", "--help"],
capture_output=True,
text=True,
)
Comment thread tests/test_cli_help.py
assert r.returncode == 0, f"--help should exit 0: {r.stderr}"
out = r.stdout
assert " prs" in out, "`graphify --help` must list prs (#3140)"
assert "provider" in out, "`graphify --help` must list provider (#3140)"
Comment thread graphify/__main__.py
print(" --cargo extract crate→crate deps from Cargo.toml")
print(" --global also merge the resulting graph into the global graph")
print(" --as <tag> repo tag for --global (default: target directory name)")
print(" provider [list|show|add|remove] manage custom LLM providers")
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.

graphify --help omits 14 real, working command paths — including the fully-documented prs dashboard and 7 of export 8 formats

3 participants