Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/cli-090-swap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"coordinate": minor
---

Move the whole CLI surface onto @cutils/cli 0.9.0: the argv parser, the help screens and the did-you-mean block all live in the library now.

`enqueue` and `run` capture the command with the library's remainder args, so a dash-leading command works without `--`. The group verbs (`lease`, `agent`, `cap`, `dead`, `service`) are nested command trees with a help screen per sub-verb, and `daemon` answers `--help` without touching the running daemon. A verb that does not exist exits 1 with a did-you-mean block, so `coordinate statu` points at `status` and `stats`.

The local sectioned help renderer and the argparse-style remainder pre-split are gone, along with roughly 750 lines of hand-rolled argv parsing.
4 changes: 3 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ coordinate <verb> [args]

Every verb has its own help screen. `coordinate --help` lists the verbs, `coordinate <verb> --help` documents one verb, and `coordinate help <verb>` prints the same screen. A group verb (`lease`, `agent`, `cap`, `dead`, `service`) has one screen per sub-verb, so `coordinate lease acquire --help` documents the acquire call and `coordinate lease --help` lists the sub-verbs.

The screens are plain text with no escape sequences when the output is piped, so an agent can read them without a terminal. Each screen has the same sections: a one-line summary, `USAGE`, `ARGUMENTS`, `OPTIONS`, `SUBCOMMANDS` for a group verb, `EXAMPLES` where they help, and a `LEARN MORE` pointer to this page.
The screens are plain text with no escape sequences when the output is piped, so an agent can read them without a terminal. Each screen has the same sections: a one-line summary, `USAGE`, `ARGUMENTS`, `OPTIONS`, `COMMANDS` for a group verb, `EXAMPLES` where they help, and a `LEARN MORE` pointer to this page.

A verb that does not exist exits 1 and prints a did-you-mean block with the closest matches, so `coordinate statu` points at `status` and `stats`.

`coordinate --help` with no other argument exits 1 (the CLI is waiting for a verb), while `coordinate <verb> --help` exits 0. An unknown verb exits 1 and names the command.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@cutils/cli": "0.8.1",
"@cutils/cli": "0.9.0",
"@cutils/sqlite": "0.8.0",
"effect": "4.1.5"
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ allowBuilds:
koffi: true
esbuild: true
"@docmd/engine-rust": false
minimumReleaseAgeExclude:
- "@cutils/cli@0.9.0"
patchedDependencies:
effect@4.1.5: patches/effect@4.1.5.patch
"@cutils/sqlite@0.8.0": patches/@cutils+sqlite@0.8.0.patch
324 changes: 0 additions & 324 deletions src/cli-spec.ts

This file was deleted.

220 changes: 0 additions & 220 deletions src/help.ts

This file was deleted.

Loading
Loading