Skip to content

feat(cli): add short flags for frequently used options#1229

Merged
Mossaka merged 1 commit intomainfrom
feat/067-short-flags
Mar 11, 2026
Merged

feat(cli): add short flags for frequently used options#1229
Mossaka merged 1 commit intomainfrom
feat/067-short-flags

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Mar 11, 2026

Summary

  • Add -d as short flag for --allow-domains
  • Add -b as short flag for --build-local
  • Add -k as short flag for --keep-containers

These are the three most frequently used options and having short flags improves CLI ergonomics.

Fixes #501

Test plan

  • All 839 existing tests pass
  • Build succeeds
  • Lint passes (0 errors)
  • CI checks pass

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings March 11, 2026 17:07
@github-actions
Copy link
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 82.37% 82.51% 📈 +0.14%
Statements 82.36% 82.50% 📈 +0.14%
Functions 82.60% 82.60% ➡️ +0.00%
Branches 74.47% 74.56% 📈 +0.09%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.4% → 84.0% (+0.54%) 82.8% → 83.3% (+0.52%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 -d alias for --allow-domains
  • Add -k alias for --keep-containers
  • Add -b alias for --build-local and 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.

Comment on lines 667 to 712
@@ -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
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

Smoke Test Results — PASS

💥 [THE END] — Illustrated by Smoke Claude for issue #1229

@github-actions
Copy link
Contributor

Smoke test results for PR #1229@Mossaka

Test Status
GitHub MCP (last 2 merged PRs) #1221 test: add --allow-host-ports validation tests, #1220 test: add --proxy-logs-dir edge case coverage
Playwright (github.com title) ✅ "GitHub · Change is constant. GitHub keeps you ahead. · GitHub"
File write /tmp/gh-aw/agent/smoke-test-copilot-22964820570.txt created
Bash verify cat confirmed file contents

Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot for issue #1229

@github-actions
Copy link
Contributor

Smoke Test Results
GitHub MCP last 2 merged PRs: ✅
Last merged PRs: test: add --allow-host-ports validation tests; test: add --proxy-logs-dir edge case coverage
safeinputs-gh PR list: ✅
Playwright title check: ✅
Tavily search: ❌ (tool unavailable)
File write: ✅
Bash cat: ✅
Discussion comment: ✅
Build: ✅
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex for issue #1229

@github-actions github-actions bot mentioned this pull request Mar 11, 2026
@github-actions
Copy link
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.12 Python 3.12.3 ❌ NO
Node.js v24.14.0 v20.20.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Result: ❌ Not all versions match — Python and Node.js differ between host and chroot environments.

Tested by Smoke Chroot for issue #1229

@Mossaka Mossaka merged commit 309a7b7 into main Mar 11, 2026
61 checks passed
@Mossaka Mossaka deleted the feat/067-short-flags branch March 11, 2026 17:49
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.

Add short flags for frequently used options

2 participants