Skip to content

Commit a178c1e

Browse files
committed
docs(spec): cli-extension Discover step says what loads an oclif plugin into os
The module TSDoc's step 2 said @objectstack/cli lists the plugin in its oclif.plugins array, or that users install it with `os plugins install`. @objectstack/cli declares no oclif.plugins and ships no plugin manager, so neither is true. The step now names the oclif rule (oclif.plugins plus dependencies of the CLI's own package.json) and the os-distribution route. Claude-Session: https://claude.ai/code/session_01UtnxvdiN376GF3sgXwAw4d Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3a6d92f commit a178c1e

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
The `kernel/cli-extension` module documentation no longer tells plugin authors to run `os plugins install`. Step 2, "Discover", said the plugin is listed in `@objectstack/cli`'s `oclif.plugins` array, or that users install it with `os plugins install`. Neither is true: `@objectstack/cli` declares no `oclif.plugins` and ships no plugin manager, so `os plugins` is not a command. The step now says what loads a plugin: oclif loads a plugin that the CLI's own `package.json` lists in both `oclif.plugins` and `dependencies`. To add a plugin's commands to `os`, build an `os` distribution whose own `package.json` lists the plugin in both places. The generated reference page carries the same text.
6+
7+
Clause-②: no
8+
9+
Documentation only. No schema, export or type changes.

‎packages/spec/src/kernel/cli-extension.zod.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ import { z } from 'zod';
1414
*
1515
* 1. **Declare** — Plugin's `package.json` includes an `oclif` config section
1616
* declaring its commands directory and any topics.
17-
* 2. **Discover** — The main CLI (`@objectstack/cli`) lists the plugin in its
18-
* `oclif.plugins` array, or users install it via `os plugins install <pkg>`.
17+
* 2. **Discover** — oclif loads a plugin that the CLI's own `package.json`
18+
* lists in both `oclif.plugins` and `dependencies`. `@objectstack/cli`
19+
* lists none and ships no plugin manager, so `os plugins` is not a
20+
* command. To add a plugin's commands to `os`, build an `os` distribution:
21+
* a package whose own `package.json` lists the plugin in both places.
1922
* 3. **Load** — oclif automatically discovers and registers all Command classes
2023
* exported from the plugin's commands directory.
2124
*

0 commit comments

Comments
 (0)