From e4eb70f0839c7b88f79f0e78227c343bcd960be0 Mon Sep 17 00:00:00 2001 From: Brummel Date: Fri, 5 Jun 2026 00:04:54 +0200 Subject: [PATCH] feat(aura-cli): --help/-h print usage to stdout and exit 0 `aura --help` and `aura -h` are a newcomer's reflex first command but fell through to the catch-all unknown-subcommand arm: exit 2, empty stdout, error text on stderr. The conventional help affordance returning the error path is a C22 first-contact friction (milestone fieldtest). Add a `Some("--help") | Some("-h")` arm before the catch-all that prints the usage to stdout and returns normally (exit 0). The `_ =>` error path is untouched, so an unknown subcommand still prints `aura: usage: aura run` to stderr and exits 2 -- pinned by the negative-preservation assertion in the RED test (07ba20a). Verified: cli_run.rs all green (help/no-args/run), clippy --all-targets -D warnings clean. Minimal slice per the tdd handoff: the stdout help literal ("usage: aura run") and the stderr error literal ("aura: usage: aura run") are left as two distinct user-facing strings rather than factored into a shared usage constant -- a single usage source is a deliberate non-goal here, left for a future cycle if one wants it. closes #20 --- crates/aura-cli/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/aura-cli/src/main.rs b/crates/aura-cli/src/main.rs index 1a78f8f..3de1f1d 100644 --- a/crates/aura-cli/src/main.rs +++ b/crates/aura-cli/src/main.rs @@ -115,6 +115,7 @@ fn main() { let mut args = std::env::args().skip(1); match args.next().as_deref() { Some("run") => println!("{}", run_sample().to_json()), + Some("--help") | Some("-h") => println!("usage: aura run"), _ => { eprintln!("aura: usage: aura run"); std::process::exit(2);