feat(cli): run/tui --help, --version, and a help alias - #143
Merged
Conversation
sosidudku1
force-pushed
the
valeryb/cli-help-version
branch
from
August 18, 2026 18:45
f2f4f86 to
5035ca6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
runis the first command in the top-level help and had no help of its own:run --help,run -h,tui --helpand a barehelpall exited 2 withunknown 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 pipingbehaviour (one-shot vs interactive),
/quit&/abort, and the exit-code contractatomic-agent tui --help— same shape; also points scripts atrunatomic-agent --version/-v/version— printsatomic-agent 0.2.1(from theexisting
getAppVersion())atomic-agent help [command]— alias for<command> --help; barehelpprints thetop-level page; unknown targets exit 2
Shape
The HELP constants copy
serve-command.tsverbatim in structure, so all subcommand helppages read alike.
--helpis parsed as a first-class parse result ({ help: true })before flag validation, so it always works, and unknown flags still exit 2.
Testing
parseTuiArgs:--help/-hmarker, unknown flags still error, andevery real flag appears in the help text (rot guard)
run --helpexit 0,run -hexit 0,tui --helpexit 0,
--version/-v/versionall print the version,help runmirrorsrun --help,help nonsenseexits 2,run --nopestill exits 2npm run lintclean; full build passesNote: this branch touches
parseArgsinrun-agent.tsandtui-args.ts, which #141 and#142 also modify in different regions — whichever merges last may need a trivial rebase.