Skip to content

Commit 309a7b7

Browse files
Mossakaclaude
andauthored
feat(cli): add short flags for frequently used options (#1229)
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>
1 parent 5769b37 commit 309a7b7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
sudo awf [options] -- <command>
77
88
Options:
9-
--allow-domains <domains> Comma-separated list of allowed domains. Supports wildcards and protocol prefixes:
9+
-d, --allow-domains <domains> Comma-separated list of allowed domains. Supports wildcards and protocol prefixes:
1010
- github.com: exact domain + subdomains (HTTP & HTTPS)
1111
- *.github.com: any subdomain of github.com
1212
- api-*.example.com: prefix wildcards
@@ -20,11 +20,11 @@ Options:
2020
--block-domains-file <path> Path to file containing blocked domains (one per line or
2121
comma-separated, supports # comments)
2222
--log-level <level> Log level: debug, info, warn, error (default: info)
23-
--keep-containers Keep containers running after command exits (default: false)
23+
-k, --keep-containers Keep containers running after command exits (default: false)
2424
--tty Allocate a pseudo-TTY for the container (required for interactive
2525
tools like Claude Code) (default: false)
2626
--work-dir <dir> Working directory for temporary files
27-
--build-local Build containers locally instead of using GHCR images (default: false)
27+
-b, --build-local Build containers locally instead of using GHCR images (default: false)
2828
--agent-image <value> Agent container image (default: "default")
2929
Presets (pre-built, fast):
3030
default - Minimal ubuntu:22.04 (~200MB)

src/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ program
684684
.description('Network firewall for agentic workflows with domain whitelisting')
685685
.version(version)
686686
.option(
687-
'--allow-domains <domains>',
687+
'-d, --allow-domains <domains>',
688688
'Comma-separated list of allowed domains. Supports wildcards and protocol prefixes:\n' +
689689
' github.com - exact domain + subdomains (HTTP & HTTPS)\n' +
690690
' *.github.com - any subdomain of github.com\n' +
@@ -711,7 +711,7 @@ program
711711
'info'
712712
)
713713
.option(
714-
'--keep-containers',
714+
'-k, --keep-containers',
715715
'Keep containers running after command exits',
716716
false
717717
)
@@ -726,7 +726,7 @@ program
726726
path.join(os.tmpdir(), `awf-${Date.now()}`)
727727
)
728728
.option(
729-
'--build-local',
729+
'-b, --build-local',
730730
'Build containers locally instead of using GHCR images',
731731
false
732732
)

0 commit comments

Comments
 (0)