Skip to content

fix(cli): hide the repl scaffold from --help, answer repl --help instead of hijacking the terminal - #147

Merged
sosidudku1 merged 1 commit into
mainfrom
valeryb/hide-repl-scaffold
Aug 18, 2026
Merged

fix(cli): hide the repl scaffold from --help, answer repl --help instead of hijacking the terminal#147
sosidudku1 merged 1 commit into
mainfrom
valeryb/hide-repl-scaffold

Conversation

@plombeer31

Copy link
Copy Markdown
Collaborator

What

atomic-agent --help advertised repl Interactive debug REPL: step the agent manually — but the command is an M1 scaffold whose only working inputs are help
and quit. Worse, repl --help did not answer the help request: it opened the
readline prompt, swallowed the terminal, and answered unknown command: --help.

Two small changes:

  1. Hidden from the top-level help. CommandDescriptor gains a hidden flag;
    printHelp filters on it. The command still dispatches when typed — nothing
    breaks for anyone who uses it — it is just no longer advertised as a feature.
  2. repl --help / -h answers before readline starts. Prints a short usage
    note that states the scaffold status and exits 0, instead of dropping into the
    interactive prompt.

Testing

  • 2 new unit tests. The discriminator is built in: under vitest, stdin is a pipe
    that never closes, so on the unpatched code both tests hang in the readline loop
    until the 15 s timeout (verified: 2/2 fail on main, 2/2 pass with the patch).
  • e2e against the built CLI: --help no longer lists repl (the only remaining
    match is the word "replace" in the config summary); repl --help prints the
    note and exits 0 immediately.
  • npm run lint (tsc) clean.

@sosidudku1
sosidudku1 merged commit 52234f9 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