feat(cli): scan/tui command groups (Stage 3)#75
Conversation
Stage 3 of CLI ergonomics work. Cuts visible top-level commands from 17 to
10 by grouping noun-like command families under a shared parent.
New grouped surface:
resq scan {audit,secrets,copyright}
resq tui {explore,logs,health,deploy,clean,asm}
Unchanged flat commands (genuinely distinct verbs, not a family):
resq format, resq dev, resq pre-commit, resq version, resq docs,
resq hooks, resq commit, resq completions
Backwards compat: every legacy flat form (resq audit, resq secrets,
resq copyright, resq explore, resq logs, resq health, resq deploy,
resq clean, resq asm) remains callable but is now hidden from help
output and tagged "Deprecated: use `resq <group> <cmd>`". Keep for one
release cycle, then remove in a subsequent PR.
The root `resq --help` now leads with the grouped commands and mentions
the deprecation timeline. Both `resq scan --help` and `resq tui --help`
enumerate their members with clearer one-line descriptions.
Zero behavior change: every subcommand dispatches to the same
commands::*::run() function as before. cargo build/test/clippy all
green, 13/13 tests pass.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 44 minutes and 9 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request reorganizes the CLI command structure into a hierarchical format, grouping related commands under scan and tui while maintaining legacy flat commands as hidden aliases for backward compatibility. Feedback suggests adding deprecation warnings when legacy aliases are invoked and correcting visibility mismatches for the new argument enums to ensure they are usable outside the module.
…ion warnings
Addresses gemini-code-assist review:
- Visibility consistency: drop `pub` from ScanArgs/TuiArgs. They're
enum-variant payloads in the private Commands enum inside main.rs
(a binary entry), not a public library API; making them pub while
their inner ScanKind/TuiScreen enums were private was misleading.
Everything in this chain is now crate-private.
- Runtime deprecation warnings: legacy flat dispatches now emit
`tracing::warn!("resq <old> is deprecated; use resq <new> instead.")`
before running the command. Goes through the standard tracing
subscriber so --quiet suppresses, --no-color / TTY auto-detection
applies, and the output pattern matches the rest of the CLI.
Extracted as a small `warn_deprecated(old, new)` helper to keep the
match arms uniform.
|
Resolved both gemini review points:
|
Summary
Stage 3 of the CLI ergonomics roadmap. Collapses the flat 17-subcommand surface into meaningful groups so `resq --help` actually orients a new user.
Visible top-level: 17 → 10
Backwards compat: every legacy flat form still works as a hidden alias tagged `Deprecated: use `resq ``. Keep one release cycle, remove in a follow-up.
Before / after
```text
before — 17 visible commands, flat list
resq audit / secrets / copyright / format / dev / explore / logs / health /
deploy / clean / asm / pre-commit / version / docs / hooks / commit / completions
after — 10 visible, hierarchical
resq scan {audit|secrets|copyright}
resq tui {explore|logs|health|deploy|clean|asm}
resq format / dev / pre-commit / version / docs / hooks / commit / completions
```
Test plan
What's next / out of scope
🤖 Generated with Claude Code