@objectstack/cli 2.0.6 → 3.0.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/cli@2.0.6 build /home/runner/work/spec/spec/packages/cli
2
+ > @objectstack/cli@3.0.0 build /home/runner/work/spec/spec/packages/cli
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/bin.ts
@@ -15,10 +15,14 @@
15
15
  ESM Build start
16
16
  CLI Cleaning output folder
17
17
  ESM Build start
18
- ESM dist/index.js 58.94 KB
19
- ESM ⚡️ Build success in 158ms
20
- ESM dist/bin.js 61.55 KB
18
+ ESM dist/index.js 69.92 KB
19
+ ESM dist/config-UN34WBHT.js 151.00 B
20
+ ESM dist/chunk-CSHQEILI.js 7.29 KB
21
+ ESM ⚡️ Build success in 188ms
22
+ ESM dist/bin.js 72.87 KB
23
+ ESM dist/config-A7BN6UIT.js 171.00 B
24
+ ESM dist/chunk-Q74JNWKD.js 7.31 KB
21
25
  ESM ⚡️ Build success in 186ms
22
26
  DTS Build start
23
- DTS ⚡️ Build success in 7538ms
24
- DTS dist/index.d.ts 2.93 KB
27
+ DTS ⚡️ Build success in 9514ms
28
+ DTS dist/index.d.ts 3.42 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @objectstack/cli
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Release v3.0.0 — unified version bump for all ObjectStack packages.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @objectstack/spec@3.0.0
13
+ - @objectstack/core@3.0.0
14
+ - @objectstack/objectql@3.0.0
15
+ - @objectstack/runtime@3.0.0
16
+ - @objectstack/rest@3.0.0
17
+ - @objectstack/driver-memory@3.0.0
18
+ - @objectstack/plugin-hono-server@3.0.0
19
+
20
+ ## 2.0.7
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+ - @objectstack/spec@2.0.7
26
+ - @objectstack/core@2.0.7
27
+ - @objectstack/objectql@2.0.7
28
+ - @objectstack/driver-memory@2.0.7
29
+ - @objectstack/plugin-hono-server@2.0.7
30
+ - @objectstack/rest@2.0.7
31
+ - @objectstack/runtime@2.0.7
32
+
3
33
  ## 2.0.6
4
34
 
5
35
  ### Patch Changes
package/README.md CHANGED
@@ -58,6 +58,15 @@ os compile
58
58
 
59
59
  Available generate types: `object`, `view`, `action`, `flow`, `agent`, `dashboard`, `app`
60
60
 
61
+ ### Plugin Management
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `os plugin list [config]` | List plugins defined in configuration (alias: `os plugin ls`) |
66
+ | `os plugin info <name> [config]` | Show detailed plugin information |
67
+ | `os plugin add <package>` | Add a plugin import and entry to config |
68
+ | `os plugin remove <name>` | Remove a plugin from config (alias: `os plugin rm`) |
69
+
61
70
  ### Quality
62
71
 
63
72
  | Command | Description |
@@ -118,6 +127,81 @@ export default defineStack({
118
127
  - `-d, --dir <directory>` — Override target directory
119
128
  - `--dry-run` — Preview without writing files
120
129
 
130
+ ### `os plugin list`
131
+
132
+ - `--json` — Output as JSON
133
+
134
+ ### `os plugin add`
135
+
136
+ - `-d, --dev` — Add as a dev-only plugin
137
+ - `-c, --config <path>` — Configuration file path
138
+
139
+ ### `os plugin remove`
140
+
141
+ - `-c, --config <path>` — Configuration file path
142
+
143
+ ## Plugin CLI Extensions
144
+
145
+ Plugins can extend the CLI with custom commands via the `contributes.commands` manifest field. The CLI automatically discovers and loads these commands at startup.
146
+
147
+ ### How to Create a CLI Plugin
148
+
149
+ **1. Declare commands in the plugin manifest:**
150
+
151
+ ```typescript
152
+ export default defineStack({
153
+ manifest: {
154
+ id: 'com.acme.marketplace',
155
+ version: '1.0.0',
156
+ type: 'plugin',
157
+ name: 'Marketplace Plugin',
158
+ contributes: {
159
+ commands: [
160
+ {
161
+ name: 'marketplace',
162
+ description: 'Manage marketplace applications',
163
+ module: './dist/cli.js',
164
+ },
165
+ ],
166
+ },
167
+ },
168
+ });
169
+ ```
170
+
171
+ **2. Export Commander.js commands from the module:**
172
+
173
+ ```typescript
174
+ // src/cli.ts
175
+ import { Command } from 'commander';
176
+
177
+ const marketplaceCommand = new Command('marketplace')
178
+ .description('Manage marketplace applications')
179
+ .addCommand(
180
+ new Command('search')
181
+ .argument('<query>')
182
+ .action(async (query) => { /* ... */ })
183
+ )
184
+ .addCommand(
185
+ new Command('install')
186
+ .argument('<app>')
187
+ .action(async (app) => { /* ... */ })
188
+ );
189
+
190
+ // Named export (recommended)
191
+ export const commands = [marketplaceCommand];
192
+ // Also supports: export default Command | Command[]
193
+ ```
194
+
195
+ **3. Register the plugin in the host project and use:**
196
+
197
+ ```bash
198
+ os plugin add @acme/plugin-marketplace
199
+ os marketplace search "crm"
200
+ os marketplace install com.acme.crm
201
+ ```
202
+
203
+ For a complete guide, see the [Plugin CLI Extensions](/docs/guides/plugins#cli-command-extensions) section in the Plugins guide.
204
+
121
205
  ### `os info`
122
206
 
123
207
  - `--json` — Output as JSON
@@ -133,9 +217,10 @@ os init # 1. Create project
133
217
  os generate object customer # 2. Add a Customer object
134
218
  os generate object order # 3. Add an Order object
135
219
  os generate view customer # 4. Add a list view
136
- os validate # 5. Validate everything
137
- os dev # 6. Start dev server
138
- os compile # 7. Build for production
220
+ os plugin add @objectstack/plugin-auth # 5. Add auth plugin
221
+ os validate # 6. Validate everything
222
+ os dev # 7. Start dev server
223
+ os compile # 8. Build for production
139
224
  ```
140
225
 
141
226
  ## License