fix(cli): list prs, provider, and export formats in --help - #3186
Open
SyedFahad7 wants to merge 1 commit into
Open
fix(cli): list prs, provider, and export formats in --help#3186SyedFahad7 wants to merge 1 commit into
SyedFahad7 wants to merge 1 commit into
Conversation
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>
There was a problem hiding this comment.
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--helpoutput to includeprs,provider, and allexportformats (not justcallflow-html). - Add
tests/test_cli_help.pyto assert--helpincludesprs,provider, and everyexport <format>entry, while keepinghook-check/hook-guardexcluded.
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 on lines
+17
to
+21
| r = subprocess.run( | ||
| [PYTHON, "-m", "graphify", "--help"], | ||
| capture_output=True, | ||
| text=True, | ||
| ) |
| 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)" |
| 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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3140.
graphify --helpis a hardcodedprint(...)list ingraphify/__main__.pyand had drifted fromdispatch_command()ingraphify/cli.py. A user who only reads--helpcould not discover:graphify prs(fully documented in the README; runs the PR dashboard)graphify provider [list|show|add|remove]exportformats (html,obsidian,wiki,svg,graphml,neo4j,falkordb— onlyexport callflow-htmlwas listed)Changes
Mechanical listing only — no generated help, no
dispatch_commandrefactor.--helpline forprsand one forprovider, matching existing command-line style.exportformats the waycli.py's export usage block already does (format + flags), not onlycallflow-html.tests/test_cli_help.pyassertinggraphify --helpstdout containsprs,provider, and every export format.Left out on purpose
hook-check/hook-guard: silent hook internals.__main__.pyputs both in_silent_cmdsbecause 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_*.jsonfiles written by semantic subagents). There is no_silent_cmds-equivalent marker, so they stay out until a maintainer call.Verification
python -m graphify --helplistsprs,provider, and all eight export formatspytest tests/test_cli_help.pypasses