Skip to content

Slim down init/scan CLI flags#34

Merged
cvetty merged 1 commit into
mainfrom
feature/reduce-cli-args
Jul 9, 2026
Merged

Slim down init/scan CLI flags#34
cvetty merged 1 commit into
mainfrom
feature/reduce-cli-args

Conversation

@cvetty

@cvetty cvetty commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

Reduces the CLI option surface on two commands, removing flags whose behavior is better served by defaults or --help.

whygraph init — 7 flags → 3 (--agent, --force, --yes)

Removed flag Replacement
--list-agents Supported-agents list now renders in whygraph init --help (a no-rewrap epilog)
--print Removed entirely — flag + both agents.py docstring mentions. The manual-merge path still exists for user-scoped agents via render_snippet()
--install-assets / --no-install-assets Assets always install (still --force-gated for overwrite)
--skip-preflight Preflight diagnostics always run

whygraph scan

  • Rename --no-llm-descriptions--skip-analyze (same behavior). Propagated in lockstep to the git-hook helper (hooks.py), the MCP/analyze comments, CLAUDE.md, and the docs site.

Why

--list-agents/--print duplicate information that belongs in --help/docs; --install-assets/--skip-preflight only existed to opt out of behavior that should always happen. --no-llm-descriptions was a mouthful — --skip-analyze reads better.

Verification

  • uv run pytest525 passing (incl. rename of the scan flag test file to test_cli_scan_skip_analyze.py)
  • uv run ruff check src/ tests/ — clean
  • uv run ruff format --check src/ tests/ — clean
  • E2E smoke: init --agent claude runs preflight, writes .mcp.json, and copies all .claude/ assets with no opt-out flag; scan --help shows --skip-analyze, old flag gone.
  • Repo-wide sweep: zero residual references to any removed/renamed flag (the only remaining --print is the unrelated external claude --print CLI).

Note

No backward-compat alias for --no-llm-descriptions — every caller is in-repo and updated here, and WhyGraph is pre-1.0.

Reduce the option surface on two commands:

whygraph init (7 flags -> 3: --agent, --force, --yes)
- Drop --list-agents; the supported-agents list now renders in
  `whygraph init --help` via a no-rewrap epilog.
- Drop --print entirely (flag + docstring mentions); the manual-merge
  path survives for user-scoped agents via render_snippet().
- Drop --install-assets/--no-install-assets; assets always install
  (still --force-gated for overwrite).
- Drop --skip-preflight; preflight diagnostics always run.

whygraph scan
- Rename --no-llm-descriptions -> --skip-analyze (same behavior),
  propagated to the git-hook helper, MCP/analyze comments, CLAUDE.md,
  and the docs site.

Tests updated (incl. rename of the scan flag test file); full suite,
ruff check, and ruff format --check all pass.
@cvetty cvetty merged commit b166dca into main Jul 9, 2026
2 checks passed
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