feat(cli): add short flags for frequently used options#1229
Conversation
Add -d for --allow-domains, -b for --build-local, and -k for --keep-containers to improve CLI ergonomics for frequent users. Fixes #501 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
Adds short-form CLI flags for the most commonly used options to improve awf ergonomics, and updates user documentation accordingly.
Changes:
- Add
-dalias for--allow-domains - Add
-kalias for--keep-containers - Add
-balias for--build-localand document the new short flags
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/cli.ts |
Adds short flag aliases to existing Commander option definitions. |
docs/usage.md |
Updates the usage guide to list the new short flags in the options section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -692,7 +692,7 @@ program | |||
| 'info' | |||
| ) | |||
| .option( | |||
| '--keep-containers', | |||
| '-k, --keep-containers', | |||
| 'Keep containers running after command exits', | |||
| false | |||
| ) | |||
| @@ -707,7 +707,7 @@ program | |||
| path.join(os.tmpdir(), `awf-${Date.now()}`) | |||
| ) | |||
| .option( | |||
| '--build-local', | |||
| '-b, --build-local', | |||
| 'Build containers locally instead of using GHCR images', | |||
| false | |||
There was a problem hiding this comment.
New short flags (-d/-k/-b) are user-facing behavior changes, but the existing CLI tests only exercise long-form flags and helper functions. Add coverage to ensure Commander parses these short aliases correctly (including that -d requires a value and -k/-b set the expected booleans).
|
Smoke Test Results — PASS
|
|
Smoke test results for PR #1229 —
Overall: PASS
|
|
Smoke Test Results
|
Chroot Version Comparison Results
Result: ❌ Not all versions match — Python and Node.js differ between host and chroot environments.
|
Summary
-das short flag for--allow-domains-bas short flag for--build-local-kas short flag for--keep-containersThese are the three most frequently used options and having short flags improves CLI ergonomics.
Fixes #501
Test plan
🤖 Generated with Claude Code