@nacos-group/cli 1.0.4-beta.1 → 1.0.5-beta.1

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
@@ -6,12 +6,13 @@ A powerful command-line tool for managing Nacos configuration center and AI skil
6
6
 
7
7
  - 🚀 Fast and lightweight - single binary with no dependencies
8
8
  - 💻 Interactive terminal mode with auto-completion
9
- - 🎯 Skill management - upload, download, list, and sync AI skills
10
- - 🤖 AgentSpec management - upload, download, and list AI agent specs
11
- - 📝 Configuration management - list and get configurations
9
+ - 🎯 Skill management - full lifecycle: upload review → release, plus get/list/describe/sync
10
+ - 🤖 AgentSpec management - full lifecycle: upload review release, plus get/list/describe
11
+ - 📝 Configuration management - list, get and set configurations
12
12
  - 🔄 Real-time skill synchronization with Nacos
13
13
  - 🌐 Namespace support for multi-environment management
14
14
  - 📦 Batch operations - upload all skills and agent specs at once
15
+ - 🧾 Structured output - `--output json` on list/describe for scripting
15
16
 
16
17
  ## Installation
17
18
 
@@ -87,18 +88,37 @@ nacos> help
87
88
 
88
89
  ### AgentSpec Management
89
90
 
91
+ Agent specs follow a three-stage lifecycle aligned with the server:
92
+ `upload` (editing) → `review` (reviewing → reviewed) → `release` (online).
93
+
90
94
  #### List AgentSpecs
91
95
 
92
96
  ```bash
93
- # CLI mode (description shown by default, truncated at 200 chars)
97
+ # CLI mode (pretty output by default)
94
98
  nacos-cli agentspec-list -s 127.0.0.1:8848 -u nacos -p nacos
95
99
 
96
100
  # With filters
97
101
  nacos-cli agentspec-list --name my-agentspec --page 1 --size 20
98
102
 
103
+ # Machine-readable output for scripts
104
+ nacos-cli agentspec-list --output json
105
+
99
106
  # Terminal mode
100
107
  nacos> agentspec-list
101
108
  nacos> agentspec-list --name my-agentspec --page 2
109
+ nacos> agentspec-list --output json
110
+ ```
111
+
112
+ #### Describe AgentSpec
113
+
114
+ Show detail + version history (latest / editing / reviewing / online, plus per-version status):
115
+
116
+ ```bash
117
+ nacos-cli agentspec-describe my-agentspec
118
+ nacos-cli agentspec-describe my-agentspec --output json
119
+
120
+ # Terminal mode
121
+ nacos> agentspec-describe my-agentspec
102
122
  ```
103
123
 
104
124
  #### Get/Download AgentSpec
@@ -123,36 +143,96 @@ nacos-cli agentspec-get spec1 spec2 spec3
123
143
  nacos> agentspec-get my-agentspec
124
144
  ```
125
145
 
126
- #### Publish AgentSpec
146
+ #### Upload AgentSpec
127
147
 
128
- Publish an agent spec from local directory:
148
+ Upload an agent spec from local directory (creates or updates the `editing` version):
129
149
 
130
150
  ```bash
131
- # Publish single agent spec
132
- nacos-cli agentspec-publish /path/to/agentspec -s 127.0.0.1:8848 -u nacos -p nacos
151
+ # Upload single agent spec
152
+ nacos-cli agentspec-upload /path/to/agentspec -s 127.0.0.1:8848 -u nacos -p nacos
133
153
 
134
- # Publish all agent specs in a directory
135
- nacos-cli agentspec-publish --all /path/to/agentspecs/folder
154
+ # Upload all agent specs in a directory
155
+ nacos-cli agentspec-upload --all /path/to/agentspecs/folder
156
+
157
+ # Terminal mode
158
+ nacos> agentspec-upload /path/to/agentspec
159
+ nacos> agentspec-upload --all /path/to/agentspecs
160
+ ```
161
+
162
+ #### Review AgentSpec
163
+
164
+ Submit the current editing version for review (editing → reviewing). The server-side
165
+ review pipeline is asynchronous and eventually marks the version as `reviewed`.
166
+
167
+ ```bash
168
+ nacos-cli agentspec-review my-agentspec
136
169
 
137
170
  # Terminal mode
138
- nacos> agentspec-publish /path/to/agentspec
139
- nacos> agentspec-publish --all /path/to/agentspecs
171
+ nacos> agentspec-review my-agentspec
172
+ ```
173
+
174
+ #### Release AgentSpec
175
+
176
+ Publish an approved (reviewed) version online:
177
+
178
+ ```bash
179
+ nacos-cli agentspec-release my-agentspec --version 0.0.2
180
+ nacos-cli agentspec-release my-agentspec --version 0.0.2 --update-latest=false
181
+
182
+ # Terminal mode
183
+ nacos> agentspec-release my-agentspec --version 0.0.2
184
+ ```
185
+
186
+ > **Note**: if `agentspec-release` fails with `HTTP 400 parameter validate error`
187
+ > right after `agentspec-review`, the async review pipeline probably hasn't
188
+ > marked the version as `reviewed` yet. The CLI will print a hint telling you
189
+ > to wait a few seconds and re-check status via `agentspec-describe`. Retry
190
+ > when `STATUS=reviewed`.
191
+
192
+ #### Publish AgentSpec (deprecated)
193
+
194
+ `agentspec-publish` is kept as a backward-compatible shortcut that runs
195
+ `upload` + `review` in sequence. It prints a deprecation warning and will
196
+ be removed in a future release — prefer the explicit lifecycle commands
197
+ above.
198
+
199
+ ```bash
200
+ # Legacy shortcut (deprecated)
201
+ nacos-cli agentspec-publish /path/to/agentspec
202
+ nacos-cli agentspec-publish --all /path/to/agentspecs/folder
140
203
  ```
141
204
 
142
205
  ### Skill Management
143
206
 
207
+ Skills follow the same three-stage lifecycle as agent specs:
208
+ `upload` (editing) → `review` (reviewing → reviewed) → `release` (online).
209
+
144
210
  #### List Skills
145
211
 
146
212
  ```bash
147
- # CLI mode (description shown by default, truncated at 200 chars)
213
+ # CLI mode (pretty output by default)
148
214
  nacos-cli skill-list -s 127.0.0.1:8848 -u nacos -p nacos
149
215
 
150
216
  # With filters
151
217
  nacos-cli skill-list --name skill-creator --page 1 --size 20
152
218
 
219
+ # Machine-readable output for scripts
220
+ nacos-cli skill-list --output json
221
+
153
222
  # Terminal mode
154
223
  nacos> skill-list
155
224
  nacos> skill-list --name skill-creator --page 2
225
+ nacos> skill-list --output json
226
+ ```
227
+
228
+ #### Describe Skill
229
+
230
+ ```bash
231
+ nacos-cli skill-describe skill-creator
232
+ nacos-cli skill-describe skill-creator --output json
233
+
234
+ # Terminal mode
235
+ nacos> skill-describe skill-creator
156
236
  ```
157
237
 
158
238
  #### Get/Download Skill
@@ -170,7 +250,7 @@ nacos> skill-get skill-creator
170
250
 
171
251
  #### Upload Skill
172
252
 
173
- Upload a skill from local directory:
253
+ Upload a skill from local directory (creates or updates the `editing` version):
174
254
 
175
255
  ```bash
176
256
  # Upload single skill
@@ -184,6 +264,44 @@ nacos> skill-upload /path/to/skill
184
264
  nacos> skill-upload --all /path/to/skills
185
265
  ```
186
266
 
267
+ #### Review Skill
268
+
269
+ Submit the current editing version for review (editing → reviewing):
270
+
271
+ ```bash
272
+ nacos-cli skill-review skill-creator
273
+
274
+ # Terminal mode
275
+ nacos> skill-review skill-creator
276
+ ```
277
+
278
+ #### Release Skill
279
+
280
+ Publish an approved (reviewed) version online:
281
+
282
+ ```bash
283
+ nacos-cli skill-release skill-creator --version 0.0.2
284
+ nacos-cli skill-release skill-creator --version 0.0.2 --update-latest=false
285
+
286
+ # Terminal mode
287
+ nacos> skill-release skill-creator --version 0.0.2
288
+ ```
289
+
290
+ > Same async-pipeline note as `agentspec-release`: if `skill-release` returns
291
+ > `HTTP 400 parameter validate error` just after `skill-review`, wait and retry
292
+ > when `skill-describe` shows the version as `reviewed`.
293
+
294
+ #### Publish Skill (deprecated)
295
+
296
+ `skill-publish` is kept as a backward-compatible shortcut that runs
297
+ `upload` + `review` in sequence. Prefer the explicit lifecycle commands.
298
+
299
+ ```bash
300
+ # Legacy shortcut (deprecated)
301
+ nacos-cli skill-publish /path/to/skill
302
+ nacos-cli skill-publish --all /path/to/skills/folder
303
+ ```
304
+
187
305
  #### Sync Skill
188
306
 
189
307
  Real-time synchronization - automatically syncs local skills when they change in Nacos:
@@ -302,10 +420,20 @@ namespace: ""
302
420
  Configuration values are applied in the following priority order:
303
421
  1. **Command line arguments** (highest priority)
304
422
  2. **Configuration file**
305
- 3. **Default values** (lowest priority)
423
+ 3. **Environment variables**
424
+ 4. **Default values** (lowest priority)
425
+
426
+ Supported environment variables:
427
+
428
+ ```bash
429
+ export NACOS_HOST=127.0.0.1
430
+ export NACOS_PORT=8848
431
+ export NACOS_NAMESPACE=xxx
432
+ ```
306
433
 
307
434
  For example:
308
435
  - `nacos-cli --config ./local.conf --host 10.0.0.1` - Uses `10.0.0.1` from command line, other values from config file
436
+ - `NACOS_HOST=127.0.0.1 NACOS_PORT=8848 NACOS_NAMESPACE=xxx nacos-cli skill-list` - Uses environment variables when command line and config file values are not provided
309
437
  - `nacos-cli` - Uses default `market.hiclaw.io:80` when neither `--host` nor `--port` is provided
310
438
  - `nacos-cli --host 127.0.0.1` - Uses `127.0.0.1:8848` because `--host` was provided without `--port`
311
439
  - `nacos-cli --port 8849` - Uses `127.0.0.1:8849` because only `--port` was provided
@@ -315,26 +443,36 @@ For example:
315
443
 
316
444
  ```
317
445
  nacos-cli/
318
- ├── cmd/ # CLI commands
319
- │ ├── root.go # Root command
320
- │ ├── list_skill.go # skill-list command
321
- │ ├── get_skill.go # skill-get command
322
- │ ├── upload_skill.go # skill-upload command
323
- │ ├── sync_skill.go # skill-sync command
324
- │ ├── list_agentspec.go # agentspec-list command
325
- │ ├── get_agentspec.go # agentspec-get command
326
- │ ├── publish_agentspec.go # agentspec-publish command
327
- │ ├── list_config.go # config-list command
328
- │ ├── get_config.go # config-get command
329
- └── interactive.go # Interactive terminal
446
+ ├── cmd/ # CLI commands
447
+ │ ├── root.go # Root command / global flags
448
+ │ ├── list_skill.go # skill-list
449
+ │ ├── describe_skill.go # skill-describe
450
+ │ ├── get_skill.go # skill-get
451
+ │ ├── upload_skill.go # skill-upload
452
+ │ ├── review_skill.go # skill-review
453
+ │ ├── release_skill.go # skill-release
454
+ │ ├── publish_skill.go # skill-publish (deprecated wrapper)
455
+ │ ├── sync_skill.go # skill-sync
456
+ │ ├── list_agentspec.go # agentspec-list
457
+ ├── describe_agentspec.go # agentspec-describe
458
+ │ ├── get_agentspec.go # agentspec-get
459
+ │ ├── upload_agentspec.go # agentspec-upload
460
+ │ ├── review_agentspec.go # agentspec-review
461
+ │ ├── release_agentspec.go # agentspec-release
462
+ │ ├── publish_agentspec.go # agentspec-publish (deprecated wrapper)
463
+ │ ├── list_config.go # config-list
464
+ │ ├── get_config.go # config-get
465
+ │ ├── set_config.go # config-set
466
+ │ ├── profile.go # profile / config file handling
467
+ │ └── interactive.go # Interactive terminal entry
330
468
  ├── internal/
331
- │ ├── client/ # Nacos client
332
- │ ├── skill/ # Skill service
333
- │ ├── agentspec/ # AgentSpec service
334
- │ ├── sync/ # Sync service
335
- │ ├── listener/ # Config listener
336
- │ ├── terminal/ # Terminal implementation
337
- │ └── help/ # Help system
469
+ │ ├── client/ # Nacos client
470
+ │ ├── skill/ # Skill service
471
+ │ ├── agentspec/ # AgentSpec service
472
+ │ ├── sync/ # Sync service
473
+ │ ├── listener/ # Config listener
474
+ │ ├── terminal/ # Interactive terminal implementation
475
+ │ └── help/ # Help system
338
476
  ├── main.go
339
477
  ├── go.mod
340
478
  └── README.md
@@ -383,6 +521,16 @@ MIT License
383
521
 
384
522
  ## Changelog
385
523
 
524
+ ### v1.0.4 (2026-05-08)
525
+
526
+ - Aligned `agentspec-*` commands with `skill-*` around the full server lifecycle
527
+ (`upload` → `review` → `release`), plus new `agentspec-describe` / `skill-describe`
528
+ - Added `--output pretty|json` on `*-list` and `*-describe` for scripting
529
+ - `agentspec-publish` / `skill-publish` are now deprecated wrappers that run
530
+ `upload` + `review` and emit a deprecation warning
531
+ - `*-release` now prints a targeted hint when failing with `HTTP 400 parameter
532
+ validate error`, pointing to the async review pipeline timing issue
533
+
386
534
  ### v0.2.0 (2026-01-28)
387
535
 
388
536
  - Rewritten in Go for better performance and portability
package/bin/cli.js CHANGED
@@ -7,7 +7,7 @@ const os = require('os');
7
7
 
8
8
  // Fixed nacos-cli binary version
9
9
  // npm package version is independent from binary version
10
- const VERSION = '1.0.4-beta.1';
10
+ const VERSION = '1.0.5-beta.1';
11
11
 
12
12
  // Detect platform and architecture
13
13
  function getBinaryName() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nacos-group/cli",
3
- "version": "1.0.4-beta.1",
3
+ "version": "1.0.5-beta.1",
4
4
  "description": "A command-line tool for managing Nacos configurations and AI skills",
5
5
  "bin": {
6
6
  "nacos-cli": "./bin/cli.js"