Skip to content

feat(cli): scan/tui command groups (Stage 3)#75

Merged
WomB0ComB0 merged 2 commits into
masterfrom
feat/cli-scan-tui-groups
Apr 19, 2026
Merged

feat(cli): scan/tui command groups (Stage 3)#75
WomB0ComB0 merged 2 commits into
masterfrom
feat/cli-scan-tui-groups

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

@WomB0ComB0 WomB0ComB0 commented Apr 19, 2026

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

  • New: `resq scan` (audit | secrets | copyright), `resq tui` (explore | logs | health | deploy | clean | asm)
  • Unchanged: `format`, `dev`, `pre-commit`, `version`, `docs`, `hooks`, `commit`, `completions` — these are distinct verbs, not a family.

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

  • `cargo build -p resq-cli` green
  • `cargo test -p resq-cli` green (13/13)
  • `cargo clippy -p resq-cli` clean
  • `resq --help` leads with the new grouped commands + deprecation notice
  • `resq scan --help` enumerates audit/secrets/copyright
  • `resq tui --help` enumerates explore/logs/health/deploy/clean/asm
  • Legacy `resq audit --help` shows "Deprecated: use `resq scan audit`"
  • Legacy `resq explore` still invokes the Perf-Explorer TUI
  • CI green

What's next / out of scope

🤖 Generated with Claude Code

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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@WomB0ComB0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 44 minutes and 9 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb1a4f2f-7242-419d-972f-75b52b1fa094

📥 Commits

Reviewing files that changed from the base of the PR and between aff417c and 36fa439.

📒 Files selected for processing (2)
  • crates/resq-cli/src/lib.rs
  • crates/resq-cli/src/main.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cli-scan-tui-groups

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread crates/resq-cli/src/main.rs Outdated
Comment thread crates/resq-cli/src/main.rs
…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.
@WomB0ComB0
Copy link
Copy Markdown
Member Author

Resolved both gemini review points:

  • Visibility consistency: dropped pub from ScanArgs / TuiArgs. They're enum-variant payloads inside the private Commands enum in main.rs (a binary, not a library), so everything is now crate-private — matches the inner ScanKind / TuiScreen enums.
  • Runtime deprecation warnings: legacy dispatches now emit tracing::warn!("resq <old> is deprecated; use resq <new> instead.") before running. Goes through the standard subscriber so --quiet suppresses, --no-color / TTY detection applies. Extracted as warn_deprecated(old, new) for uniformity.

@WomB0ComB0 WomB0ComB0 merged commit b748d8a into master Apr 19, 2026
24 checks passed
@WomB0ComB0 WomB0ComB0 deleted the feat/cli-scan-tui-groups branch April 19, 2026 04:49
@github-actions github-actions Bot mentioned this pull request Apr 20, 2026
@github-actions github-actions Bot mentioned this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant