@nacos-group/cli 1.0.3 → 1.0.4

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
136
156
 
137
157
  # Terminal mode
138
- nacos> agentspec-publish /path/to/agentspec
139
- nacos> agentspec-publish --all /path/to/agentspecs
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
169
+
170
+ # Terminal mode
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:
@@ -315,26 +433,36 @@ For example:
315
433
 
316
434
  ```
317
435
  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
436
+ ├── cmd/ # CLI commands
437
+ │ ├── root.go # Root command / global flags
438
+ │ ├── list_skill.go # skill-list
439
+ │ ├── describe_skill.go # skill-describe
440
+ │ ├── get_skill.go # skill-get
441
+ │ ├── upload_skill.go # skill-upload
442
+ │ ├── review_skill.go # skill-review
443
+ │ ├── release_skill.go # skill-release
444
+ │ ├── publish_skill.go # skill-publish (deprecated wrapper)
445
+ │ ├── sync_skill.go # skill-sync
446
+ │ ├── list_agentspec.go # agentspec-list
447
+ ├── describe_agentspec.go # agentspec-describe
448
+ │ ├── get_agentspec.go # agentspec-get
449
+ │ ├── upload_agentspec.go # agentspec-upload
450
+ │ ├── review_agentspec.go # agentspec-review
451
+ │ ├── release_agentspec.go # agentspec-release
452
+ │ ├── publish_agentspec.go # agentspec-publish (deprecated wrapper)
453
+ │ ├── list_config.go # config-list
454
+ │ ├── get_config.go # config-get
455
+ │ ├── set_config.go # config-set
456
+ │ ├── profile.go # profile / config file handling
457
+ │ └── interactive.go # Interactive terminal entry
330
458
  ├── 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
459
+ │ ├── client/ # Nacos client
460
+ │ ├── skill/ # Skill service
461
+ │ ├── agentspec/ # AgentSpec service
462
+ │ ├── sync/ # Sync service
463
+ │ ├── listener/ # Config listener
464
+ │ ├── terminal/ # Interactive terminal implementation
465
+ │ └── help/ # Help system
338
466
  ├── main.go
339
467
  ├── go.mod
340
468
  └── README.md
@@ -383,6 +511,16 @@ MIT License
383
511
 
384
512
  ## Changelog
385
513
 
514
+ ### v1.0.4 (2026-05-08)
515
+
516
+ - Aligned `agentspec-*` commands with `skill-*` around the full server lifecycle
517
+ (`upload` → `review` → `release`), plus new `agentspec-describe` / `skill-describe`
518
+ - Added `--output pretty|json` on `*-list` and `*-describe` for scripting
519
+ - `agentspec-publish` / `skill-publish` are now deprecated wrappers that run
520
+ `upload` + `review` and emit a deprecation warning
521
+ - `*-release` now prints a targeted hint when failing with `HTTP 400 parameter
522
+ validate error`, pointing to the async review pipeline timing issue
523
+
386
524
  ### v0.2.0 (2026-01-28)
387
525
 
388
526
  - 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.3';
10
+ const VERSION = '1.0.4';
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.3",
3
+ "version": "1.0.4",
4
4
  "description": "A command-line tool for managing Nacos configurations and AI skills",
5
5
  "bin": {
6
6
  "nacos-cli": "./bin/cli.js"