Skip to content

help, output, connect: bring the tool up to the house guidelines - #13

Merged
karalabe merged 1 commit into
dark-bio:mainfrom
karalabe:help-guidelines
Sep 19, 2026
Merged

karalabe merged 1 commit into
dark-bio:mainfrom
karalabe:help-guidelines

Conversation

@karalabe

Copy link
Copy Markdown
Member

Brings the CLI up to the house guidelines finalized today, in the help, the output layer and emulator discovery.

Help: the shared options are listed once, on the root page, and every other page hides them, which takes the manual from 1213 to 1068 lines. A page has one shape on a terminal and in a pipe: the contract block prints Requires: and its siblings with a colon padded to one column, wraps values at the width, 80 in a pipe, and lists the examples as bare commands with no prompt; topics render the same way in both, so a piped topic no longer carries Markdown markers. data delete and data repair each show their own examples, help --all has a description, the data, app and firmware one-liners are imperative and under sixty characters, enroll's approval line says Ark Hub, and the text uses American spelling. firmware update keeps --no-wait only, since waiting is the default and --wait was a second option for one thing.

Output: text that comes from a device, a file or the cloud is made printable before a terminal sees it, so a control character in a device name or a verdict can neither drive the terminal nor start a line of its own; JSON keeps the original value. The Ark's error number in a JSON error's remote.code is now a decimal string, like every 64-bit value, where it was a number before; nothing is released, so the break is taken now. Wrapped lines no longer end in a space.

Discovery: the registry decoder reads the listing's version and refuses one it does not know, or a listing without one, as a failed source that ark devices reports as a warning beside the devices found elsewhere; a refused connection stays an empty list.

The tests cover the page shape on a terminal and in a pipe (the same text apart from color), the root page listing the shared options and every other page hiding them, the contract block and bare examples in the piped output of every command, -h and --help on every command and group, usage errors as error[usage]: plain and as the error object under --json, the manual naming the example apps and the emulator, every error code the source can emit being documented in the output topic (read from the source, not from a second list), the registry version check, and the control character escape.

Not in this change: the build-feature gated --env, which is a separate decision, and any wording in the topics beyond spelling and the two sentences the changes above needed.

@karalabe
karalabe merged commit 23fff77 into dark-bio:main Sep 19, 2026
8 checks passed
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.

1 participant