Repository navigation
feat(mocactl): CLI help text shorter; the harness TUI moves to mocactl harness - #990
Conversation
…l harness
The sandbox service is mocactl's signature experience, but bare `mocactl`
started the harness TUI and `mocactl --help` printed 130 lines of every
harness command while `mocactl sbx` got one line.
- `mocactl` and `mocactl --help` print a preamble about the harness and
sandbox services and one line per top-level command; details stay in
`mocactl COMMAND --help`.
- The interactive UI is now `mocactl harness [--setup] [--no-animation]`;
--setup and --no-animation elsewhere point at it.
- `mocactl sbx` and `mocactl sbx --help` list each command on one line with
no flags; flags, --record and the control-plane note move to
`mocactl sbx COMMAND --help`.
- `sbx login`'s help drops the clipboard/browser wording ("copies the code"
read as the repository's code).
- The generated reference pages keep the full text; docs updated for
`mocactl harness`.
Part of rossoctl/rossoctl#2642
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Ed Snible <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Review at 0f249af4a5b563781dbfe5860ff1a28b952b6734.
Bare mocactl and mocactl --help now print a SUMMARY (what mocactl is, then one line per top-level command), exit 0, and read no config; the interactive UI moves to mocactl harness; --setup/--no-animation without harness exit 2 and point at it. mocactl sbx/mocactl sbx --help print an overview derived from SBX_USAGE (one line per command, no flags), and sbx COMMAND --help now carries the --record note on the commands that take it and the control-plane note on login/logout; sbx login --help drops the clipboard/browser wording. Reference pages regenerated; docs and the doctor hint say mocactl harness.
Checked at head: SUMMARY covers every top-level command in USAGE (harness, login, logout, auth, doctor, run, promote, bundles, sbx, sessions, credentials, spawn, subagents, watch, get, workloads); sbxOverview() walks SBX_USAGE's commands in group order, de-dups templates, stops at the trailing notes, and every command has a summary (longest overview line 99 columns); bare mocactl sbx still exits 2, now with the overview on stderr (same exit code as before); sbx login --help omits --record (NO_RECORD) while sbx ls --help carries it; mocactl harness extra and harness on a non-TTY return 2 and do not start the UI. No must-fix; two non-blocking notes below. One more, low-priority: docs/specs/2026-09-25-mocactl-control-plane-client-design.md still describes mocactl --setup and plain mocactl as the day-to-day command — fine to leave if dated design specs are historical.
Author: esnible (MEMBER — maintainer)
Areas reviewed: TypeScript (packages/mocactl/src/cli.ts, src/sbx/cli.ts, src/core/diagnostics.ts), generated reference docs, tests
Agent/IDE config (.claude/.vscode): none
Commits: 1, all signed-off: yes (DCO green)
CI status: 11 pass / 6 pending at drafting (check, deploy-scripts*, k8s-kind-e2e, proto, codeql still running)
Not run here: the @moca/mocactl suite (this checkout has no dependencies installed); findings come from reading the head source, the diff and the generated pages. The PR notes the suite needs --testTimeout=30000 under load, matching main.
Assisted-By: Claude Code
|
|
||
| Start `mocactl` and open **Credentials** with `ctrl+x k` (or run `mocactl --setup` for the | ||
| Start `mocactl harness` and open **Credentials** with `ctrl+x k` (or run `mocactl harness --setup` for the | ||
| onboarding flow; a plain `mocactl` with a control-plane URL and a login goes straight to chat). |
There was a problem hiding this comment.
The first half of this sentence moved to mocactl harness, but the parenthetical still says a plain mocactl with a control-plane URL and a login goes straight to chat. After this PR bare mocactl prints the summary and exits 0; the TUI is mocactl harness. Change this to a plain \mocactl harness`` so the demo matches the new behavior.
| io.out(help + '\n'); | ||
| return 0; | ||
| } | ||
| if (positionals.length === 0) { |
There was a problem hiding this comment.
--setup and --no-animation are special-cased here, but every other "only applies to" validator below now runs only when there is a positional. So mocactl --config F, mocactl --record F, mocactl --all, mocactl --kind ..., mocactl --repo ..., mocactl --tag ... etc. now exit 0 with the summary instead of the exit-2 usage error they produced before (each used to fail because command was undefined). Not harmful, but silently accepting a flag that can never apply hides a mistyped command; consider running the same tuiFlag-style check for these before the summary, or routing the bare case through the existing validators.
mocactl harness
clawgenti
left a comment
There was a problem hiding this comment.
Summary
Bare mocactl now prints a summary and the TUI moves to mocactl harness; mocactl sbx --help lists each command on one line. I checked the claims at 0f249af: tsc --noEmit and the bundle build pass, the affected suites pass (207/207 across cli, sbx-cli, diagnostics, sbx-proc, including the new summary, redirect and overview tests), the reference-doc sync test passes, and all 18 CI checks are green. Deriving the summary from USAGE/SBX_USAGE and cross-checking it in tests is the right shape — the docs cannot silently drift from the CLI.
must-fix — two first-run instructions still point at bare mocactl. The rename leaves the two places that tell a new user how to get started sending them to a command that now prints the summary instead of onboarding:
docs/harness/how-to/set-up-mocactl.md:55—mocactl # first run: onboarding. This is the "Set up mocactl" how-to;use-mocactl.mdwas updated, this one was not.scripts/install-mocactl.sh:146—log "next: ... then run: mocactl", the only next step a fresh install prints.
Both should say mocactl harness (the installer could also name mocactl login, which the setup doc already spells out). Neither file is in the diff, so these cannot be inline comments. Before this change either instruction reached onboarding; after it, neither does — which is the confusion this PR sets out to remove.
nit, inline, on the sentence this PR edits in docs/demos/vm-two-user-acceptance.md.
Author: esnible (MEMBER — maintainer)
Areas reviewed: TypeScript (packages/mocactl: cli, sbx/cli, diagnostics), docs (4 pages), generated reference pages, tests
Agent/IDE config (.claude/.vscode): none
Commits: 1, signed off: yes (DCO passes)
CI status: passing (18/18)
Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).
| ### 1b. Store an inference credential | ||
|
|
||
| Start `mocactl` and open **Credentials** with `ctrl+x k` (or run `mocactl --setup` for the | ||
| Start `mocactl harness` and open **Credentials** with `ctrl+x k` (or run `mocactl harness --setup` for the |
There was a problem hiding this comment.
nit: this line and the next still say "a plain mocactl with a control-plane URL and a login goes straight to chat" — after this PR, bare mocactl prints the summary and never starts the UI. Suggested fix: drop the parenthetical, or reword to "mocactl harness goes straight to chat when a control-plane URL and a login are already configured".
…cactl harness Review of rossoctl#990: printing the summary before the flag checks let bare `mocactl --all` (or --json, --tag, ...) exit 0 instead of the usage error it gave before. Bare mocactl now takes only --help, --version and the URLs every command takes, and refuses any other flag with exit 2. The two-user demo's parenthetical still said a plain `mocactl` goes straight to chat; it is `mocactl harness`. Part of rossoctl/rossoctl#2642 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ed Snible <[email protected]>
Upstream rossoctl#972, rossoctl#977, rossoctl#978, rossoctl#979, rossoctl#981, rossoctl#983, rossoctl#985, rossoctl#988 and rossoctl#990 (44 commits past 49cce28). No conflict. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
The sync paragraph named upstream 49cce28 (API 1.35.0, harness 1.7.0); the branch is now at upstream de6c9b5 (rossoctl#953-rossoctl#990: API 1.37.0, harness API 1.8.0), merged in 27df5df. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
Part of rossoctl/rossoctl#2645 (SBX usability).
Why
The sandbox service (
mocactl sbx) is mocactl's signature experience, but baremocactlstarted the harness TUI,mocactl --helpprinted every harness command in full whilemocactl sbxgot a single line, andmocactl sbxitself printed ~300 lines of flags.sbx login's "copies the code" also read as the repository's code rather than the OAuth device code.What
mocactl/mocactl --help: a preamble on the harness and sandbox services, then one line per top-level command, grouped (sandbox service first). Exits 0, reads no config.mocactl COMMAND --helpis unchanged; an unknown command shows the summary.mocactl harness [--setup] [--no-animation]: the interactive UI that baremocactlused to start.--setup/--no-animationwithoutharnessexit 2 and point at it. Other harness commands (run,spawn,sessions, …) stay top-level so existing scripts and skills keep working.mocactl sbx/mocactl sbx --help: every command on one line, no flags, in the existing groups. The overview is derived fromSBX_USAGE, so per-command help can't drift. Notes that applied to many commands move tomocactl sbx COMMAND --help:--record Fon the commands that take it, the control-plane resolution note onlogin/logout.mocactl sbx login --help:--control-plane-url: the sandbox service's URL; --no-browser: only print the sign-in URL and code— no clipboard/browser wording.docs/harness/reference/cli-mocactl.md,docs/sandbox/reference/cli-sbx.md) keep the full text, regenerated; docs and the doctor hint now saymocactl harness.Testing
tsc --noEmitand the bundle build pass.--help(no runtime built, TUI not started), everyUSAGEcommand present in the summary, theharnessredirect for TUI flags, every sbx command once in the overview with no flags and lines ≤ 100 columns,sbx login --helpwording,--recordnote placement.@moca/mocactlsuite passes with--testTimeout=30000; at the default 5 s a varying handful of unrelated tests (sbx-up,sbx-record, overlay tests) time out under load, as they do on unmodifiedmain.Assisted-By: Claude Code