Skip to content

feat(cli): run/tui --help, --version, and a help alias - #143

Merged
sosidudku1 merged 2 commits into
mainfrom
valeryb/cli-help-version
Aug 18, 2026
Merged

feat(cli): run/tui --help, --version, and a help alias#143
sosidudku1 merged 2 commits into
mainfrom
valeryb/cli-help-version

Conversation

@plombeer31

Copy link
Copy Markdown
Collaborator

What

run is the first command in the top-level help and had no help of its own: run --help,
run -h, tui --help and a bare help all exited 2 with unknown flag / unknown command, and there was no way to ask which version is installed.

Now:

  • atomic-agent run --help / -h — usage, every flag with its default, the piping
    behaviour (one-shot vs interactive), /quit & /abort, and the exit-code contract
  • atomic-agent tui --help — same shape; also points scripts at run
  • atomic-agent --version / -v / version — prints atomic-agent 0.2.1 (from the
    existing getAppVersion())
  • atomic-agent help [command] — alias for <command> --help; bare help prints the
    top-level page; unknown targets exit 2

Shape

The HELP constants copy serve-command.ts verbatim in structure, so all subcommand help
pages read alike. --help is parsed as a first-class parse result ({ help: true })
before flag validation, so it always works, and unknown flags still exit 2.

Testing

  • 3 unit tests on parseTuiArgs: --help/-h marker, unknown flags still error, and
    every real flag appears in the help text (rot guard)
  • End-to-end against the built CLI: run --help exit 0, run -h exit 0, tui --help
    exit 0, --version/-v/version all print the version, help run mirrors
    run --help, help nonsense exits 2, run --nope still exits 2
  • npm run lint clean; full build passes

Note: this branch touches parseArgs in run-agent.ts and tui-args.ts, which #141 and
#142 also modify in different regions — whichever merges last may need a trivial rebase.

@sosidudku1
sosidudku1 force-pushed the valeryb/cli-help-version branch from f2f4f86 to 5035ca6 Compare August 18, 2026 18:45
@sosidudku1
sosidudku1 merged commit c020c73 into main Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants