@leemour/cli-core 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@ keyring behind a testable seam, and injectable clocks.
7
7
  Extracted from [`brazecli`](https://github.com/leemour/brazecli), where each piece earned its
8
8
  shape, and shared with [`max-cli`](https://github.com/leemour/max-cli).
9
9
 
10
- **Status: 0.1.1.** Published on npm, used by `max-cli`. Both extraction steps have landed: the
10
+ **Status: 0.2.0.** Published on npm, used by `max-cli`. Both extraction steps have landed: the
11
11
  files that move unchanged, and the ones that needed a parameter threaded through. 75 tests.
12
12
 
13
13
  ## The rule this package exists to keep
@@ -43,6 +43,7 @@ streams.stderr // []
43
43
  | `logging` | a Pino adapter writing JSON lines with secrets redacted by field name; a file that cannot be written is reported to `onError`, never thrown |
44
44
  | `retry` | full-jitter backoff, and the distinction between "no answer came" and "safe to repeat" |
45
45
  | `/testing` | `captureStreams`, `memoryKeyring`, `brokenKeyring`, `fakeClock` |
46
+ | `/commands` | the command registry: `describeProgram`, `annotate`, `flatten` — see below |
46
47
 
47
48
  **Nothing in the root export is HTTP.** Status classification, `Retry-After` parsing and the fetch
48
49
  seam live in `@leemour/cli-core/http`, so a CLI that speaks a socket never depends on a stack it
@@ -52,6 +53,25 @@ does not call:
52
53
  import { providerWaitMs, statusToCode } from "@leemour/cli-core/http"
53
54
  ```
54
55
 
56
+ **The command registry is `@leemour/cli-core/commands`** — the whole command tree as data, like
57
+ `rails routes`, for an agent to read instead of `--help` and for generated documentation. It walks
58
+ the live [Commander](https://github.com/tj/commander.js) tree, so a command built in a loop from a
59
+ catalog appears exactly like a handwritten one; `annotate` adds what the tree cannot say. Commander
60
+ is a type here, not a runtime dependency — an optional peer, 15 or newer.
61
+
62
+ ```ts
63
+ import { annotate, describeProgram } from "@leemour/cli-core/commands"
64
+
65
+ annotate(program.command("send"), { mutates: true, examples: ["max messages send 42 hi"] })
66
+ annotate(generated, { origin: "generated", operationId: "campaigns.list" })
67
+
68
+ describeProgram(program) // [{ path: ["send"], usage, origin, mutates, options: [...], commands: [...] }]
69
+ ```
70
+
71
+ Each option says whether it `takesValue` and, separately, whether it is `mandatory` — not
72
+ Commander's `required`, which means "takes a value when given" — plus its choices, default,
73
+ environment variable, the options it `conflicts` with and the values it `implies`.
74
+
55
75
  **Two traps worth knowing before you use the credential store.** The OS keyring is global: an entry
56
76
  is addressed by service and account and knows nothing about which config directory asked for it, so
57
77
  a throwaway config directory silently overwrites the real secret unless you pass `isolated: true`.
@@ -109,10 +129,18 @@ Raise `version` in `package.json` through a pull request, merge it, then on `mai
109
129
  bin/release
110
130
  ```
111
131
 
112
- It refuses a dirty tree, a branch other than `main` and a version npm already has, runs every
113
- check, publishes with the npm token from the keyring (`secret-tool`, service `npm`, account
114
- `leemour`) without printing it, and tags `v<version>` only once npm shows the new version. The
115
- token must be allowed to write `@leemour/cli-core`, not only `@leemour/max-cli`.
132
+ It refuses a dirty tree, a branch other than `main`, a `main` that is not pushed and a version npm
133
+ already has, then starts [`release.yml`](.github/workflows/release.yml) and follows it. The workflow
134
+ runs every check, publishes through npm's
135
+ [trusted publishing](https://docs.npmjs.com/trusted-publishers/) — no npm token in GitHub, and npm
136
+ attaches provenance — and tags `v<version>` only once npm shows the new version.
137
+
138
+ npm trusts the workflow **by file name**: the package's Trusted Publisher settings on npmjs.com name
139
+ `leemour` / `cli-core` / `release.yml`. Rename the file and publishing stops until they are updated.
140
+
141
+ `bin/release --local` is the fallback: it runs the same checks here and publishes with the npm token
142
+ from the keyring (`secret-tool`, service `npm`, account `leemour`) without printing it. The token
143
+ must be allowed to write `@leemour/cli-core`, not only `@leemour/max-cli`.
116
144
 
117
145
  ## Licence
118
146
 
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The command registry: the whole command tree of a CLI as data, however each command came to be.
3
+ *
4
+ * It walks the live Commander tree rather than a list written by hand, so a command built in a
5
+ * loop from a catalog shows up exactly like one written in a file. What the tree cannot say — where
6
+ * a command came from, whether it changes anything, whether it is on its way out — is attached with
7
+ * `annotate`.
8
+ *
9
+ * Behind its own entry point for the same reason `/http` is: Commander is only a type here, and the
10
+ * root of this package stays free of any command-line framework.
11
+ */
12
+ import type { Command } from "commander";
13
+ export type Origin = "handwritten" | "generated";
14
+ export type CommandState = "beta" | "deprecated";
15
+ export interface CommandMeta {
16
+ origin?: Origin;
17
+ /** The catalog operation a generated command was made from. */
18
+ operationId?: string;
19
+ /** True when running the command changes something outside this machine. */
20
+ mutates?: boolean;
21
+ state?: CommandState;
22
+ examples?: readonly string[];
23
+ }
24
+ export interface ArgumentInfo {
25
+ name: string;
26
+ required: boolean;
27
+ variadic: boolean;
28
+ description: string;
29
+ choices?: readonly string[];
30
+ default?: unknown;
31
+ }
32
+ export interface OptionInfo {
33
+ flags: string;
34
+ description: string;
35
+ /** False for a plain switch like `--json`, so an agent knows not to look for a value. */
36
+ takesValue: boolean;
37
+ /**
38
+ * Whether the option itself must be given. Deliberately not Commander's `required`, which means
39
+ * "takes a value when present" — reading that as "you must pass this" is the obvious misreading.
40
+ */
41
+ mandatory: boolean;
42
+ choices?: readonly string[];
43
+ default?: unknown;
44
+ env?: string;
45
+ /** Options that may not be given together with this one. */
46
+ conflicts?: readonly string[];
47
+ /** Values this option sets on others when they are not given. */
48
+ implies?: Readonly<Record<string, unknown>>;
49
+ }
50
+ export interface CommandInfo {
51
+ /** What to pass to the CLI, already split: `["runs", "list"]`. */
52
+ path: readonly string[];
53
+ name: string;
54
+ summary?: string;
55
+ description: string;
56
+ usage: string;
57
+ origin: Origin;
58
+ operationId?: string;
59
+ mutates?: boolean;
60
+ state?: CommandState;
61
+ examples?: readonly string[];
62
+ arguments: readonly ArgumentInfo[];
63
+ options: readonly OptionInfo[];
64
+ commands: readonly CommandInfo[];
65
+ }
66
+ /** Attaches what the tree cannot say. Repeated calls merge; the command is returned for chaining. */
67
+ export declare const annotate: <T extends Command>(command: T, meta: CommandMeta) => T;
68
+ export declare const metaOf: (command: Command) => CommandMeta;
69
+ export declare const describeProgram: (root: Command) => CommandInfo[];
70
+ export declare const describeOptions: (command: Command) => OptionInfo[];
71
+ export declare const flatten: (commands: readonly CommandInfo[]) => CommandInfo[];
72
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAY,OAAO,EAAU,MAAM,WAAW,CAAA;AAE1D,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,WAAW,CAAA;AAChD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,CAAA;AAEhD,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,yFAAyF;IACzF,UAAU,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,iEAAiE;IACjE,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,kEAAkE;IAClE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5B,SAAS,EAAE,SAAS,YAAY,EAAE,CAAA;IAClC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAC9B,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAA;CACjC;AAID,qGAAqG;AACrG,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,WAAW,KAAG,CAG3E,CAAA;AAED,eAAO,MAAM,MAAM,GAAI,SAAS,OAAO,KAAG,WAAwC,CAAA;AAElF,eAAO,MAAM,eAAe,GAAI,MAAM,OAAO,KAAG,WAAW,EACK,CAAA;AAEhE,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,UAAU,EACW,CAAA;AAExE,eAAO,MAAM,OAAO,GAAI,UAAU,SAAS,WAAW,EAAE,KAAG,WAAW,EACE,CAAA"}
@@ -0,0 +1,59 @@
1
+ const labels = new WeakMap();
2
+ /** Attaches what the tree cannot say. Repeated calls merge; the command is returned for chaining. */
3
+ export const annotate = (command, meta) => {
4
+ labels.set(command, { ...labels.get(command), ...meta });
5
+ return command;
6
+ };
7
+ export const metaOf = (command) => labels.get(command) ?? {};
8
+ export const describeProgram = (root) => root.commands.map((child) => describe(child, root.name(), []));
9
+ export const describeOptions = (command) => command.options.filter((option) => !option.hidden).map(describeOption);
10
+ export const flatten = (commands) => commands.flatMap((command) => [command, ...flatten(command.commands)]);
11
+ const describe = (command, cli, parents) => {
12
+ const path = [...parents, command.name()];
13
+ const args = command.registeredArguments.map(describeArgument);
14
+ const options = describeOptions(command);
15
+ const { origin = "handwritten", ...meta } = metaOf(command);
16
+ const usage = [
17
+ cli,
18
+ ...path,
19
+ ...args.map((argument) => (argument.required ? `<${argument.name}>` : `[${argument.name}]`)),
20
+ options.length > 0 ? "[options]" : "",
21
+ ]
22
+ .filter(Boolean)
23
+ .join(" ");
24
+ return {
25
+ path,
26
+ name: command.name(),
27
+ ...(command.summary() ? { summary: command.summary() } : {}),
28
+ description: command.description(),
29
+ usage,
30
+ origin,
31
+ ...meta,
32
+ arguments: args,
33
+ options,
34
+ commands: command.commands.map((child) => describe(child, cli, path)),
35
+ };
36
+ };
37
+ const describeArgument = (argument) => ({
38
+ name: argument.name(),
39
+ required: argument.required,
40
+ variadic: argument.variadic,
41
+ description: argument.description,
42
+ ...(argument.argChoices ? { choices: argument.argChoices } : {}),
43
+ ...(argument.defaultValue === undefined ? {} : { default: argument.defaultValue }),
44
+ });
45
+ const describeOption = (option) => {
46
+ const { conflictsWith = [], implied } = option;
47
+ return {
48
+ flags: option.flags,
49
+ description: option.description,
50
+ takesValue: option.required || option.optional,
51
+ mandatory: option.mandatory,
52
+ ...(option.argChoices ? { choices: option.argChoices } : {}),
53
+ ...(option.defaultValue === undefined ? {} : { default: option.defaultValue }),
54
+ ...(option.envVar ? { env: option.envVar } : {}),
55
+ ...(conflictsWith.length > 0 ? { conflicts: conflictsWith } : {}),
56
+ ...(implied ? { implies: implied } : {}),
57
+ };
58
+ };
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":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AAS,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzC,CAAA;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leemour/cli-core",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
5
5
  "license": "MIT",
6
6
  "author": "Viacheslav Ptsarev",
@@ -12,6 +12,7 @@
12
12
  "engines": {
13
13
  "node": ">=22"
14
14
  },
15
+ "packageManager": "pnpm@11.20.0",
15
16
  "files": [
16
17
  "dist",
17
18
  "README.md",
@@ -29,12 +30,28 @@
29
30
  "./http": {
30
31
  "types": "./dist/http/index.d.ts",
31
32
  "default": "./dist/http/index.js"
33
+ },
34
+ "./commands": {
35
+ "types": "./dist/commands/index.d.ts",
36
+ "default": "./dist/commands/index.js"
32
37
  }
33
38
  },
39
+ "scripts": {
40
+ "build": "tsc --build",
41
+ "typecheck": "tsc --build --force --emitDeclarationOnly",
42
+ "lint": "biome check .",
43
+ "lint:fix": "biome check --write .",
44
+ "test": "vitest run",
45
+ "test:watch": "vitest",
46
+ "smoke:bun": "bun run scripts/smoke.ts",
47
+ "prepare": "lefthook install || true",
48
+ "secrets:scan": "gitleaks git --no-banner --redact .",
49
+ "prepublishOnly": "pnpm build"
50
+ },
34
51
  "dependencies": {
35
52
  "cli-table3": "^0.6.5",
36
- "picocolors": "^1.1.1",
37
53
  "env-paths": "^4.0.0",
54
+ "picocolors": "^1.1.1",
38
55
  "pino": "^10.3.1",
39
56
  "valibot": "^1.5.0"
40
57
  },
@@ -44,21 +61,20 @@
44
61
  "devDependencies": {
45
62
  "@biomejs/biome": "^2.3.14",
46
63
  "@types/node": "^22.10.2",
64
+ "commander": "^15.0.0",
65
+ "lefthook": "^2.1.8",
47
66
  "typescript": "^5.9.3",
48
- "vitest": "^3.2.4",
49
- "lefthook": "^2.1.8"
67
+ "vitest": "^3.2.4"
50
68
  },
51
69
  "publishConfig": {
52
70
  "access": "public"
53
71
  },
54
- "scripts": {
55
- "build": "tsc --build",
56
- "typecheck": "tsc --build --force --emitDeclarationOnly",
57
- "lint": "biome check .",
58
- "lint:fix": "biome check --write .",
59
- "test": "vitest run",
60
- "test:watch": "vitest",
61
- "smoke:bun": "bun run scripts/smoke.ts",
62
- "secrets:scan": "gitleaks git --no-banner --redact ."
72
+ "peerDependencies": {
73
+ "commander": ">=15"
74
+ },
75
+ "peerDependenciesMeta": {
76
+ "commander": {
77
+ "optional": true
78
+ }
63
79
  }
64
- }
80
+ }