@coze/cli 0.2.0-alpha.094e22 → 0.2.0-alpha.2ae411
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 +61 -23
- package/lib/cli.js +3 -3
- package/lib/{index-CkTEdvpA.js → index-C6r1MTLx.js} +1 -1
- package/lib/send-message.worker.js +1 -1
- package/lib/session-task-refresh.worker.js +1 -1
- package/lib/task-worker-C08RI2za.js +1 -0
- package/package.json +3 -2
- package/skills/manifest.json +6 -6
- package/skills/using-coze-cli/SKILL.md +19 -26
- package/skills/using-coze-cli/coze-claw/MODULE.md +1 -1
- package/skills/using-coze-cli/coze-code/MODULE.md +77 -3
- package/skills/using-coze-cli/coze-code/references/coze-code-db.md +11 -4
- package/skills/using-coze-cli/coze-code/references/coze-code-deploy.md +2 -2
- package/skills/using-coze-cli/coze-code/references/coze-code-domain.md +1 -1
- package/skills/using-coze-cli/coze-code/references/coze-code-git.md +11 -3
- package/skills/using-coze-cli/coze-code/references/coze-code-message.md +1 -1
- package/skills/using-coze-cli/coze-code/references/coze-code-project.md +48 -2
- package/skills/using-coze-cli/coze-code/references/coze-code-repo.md +18 -7
- package/skills/using-coze-cli/coze-code/references/coze-code-skill.md +4 -0
- package/skills/using-coze-cli/coze-file/MODULE.md +4 -4
- package/skills/using-coze-cli/coze-file/references/coze-file-upload.md +7 -7
- package/skills/using-coze-cli/coze-generate/MODULE.md +2 -2
- package/skills/using-coze-cli/coze-generate/references/coze-generate-audio.md +2 -2
- package/skills/using-coze-cli/coze-generate/references/coze-generate-image.md +5 -5
- package/skills/using-coze-cli/coze-generate/references/coze-generate-video.md +9 -10
- package/lib/task-worker-C2ZfSQY6.js +0 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ coze code project create --message "Build an intelligent assistant" --type web
|
|
|
31
31
|
Before using most commands, you need to authenticate with Coze.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
# Interactive login via browser
|
|
34
|
+
# Interactive login via browser
|
|
35
35
|
coze auth login
|
|
36
36
|
|
|
37
37
|
# Check current login status
|
|
@@ -52,7 +52,7 @@ Manage the full authentication lifecycle. Supports interactive OAuth login via b
|
|
|
52
52
|
|
|
53
53
|
| Command | Description |
|
|
54
54
|
| ------------------ | -------------------------------------------------- |
|
|
55
|
-
| `coze auth login` | Interactive login via browser
|
|
55
|
+
| `coze auth login` | Interactive login via browser (OAuth) |
|
|
56
56
|
| `coze auth status` | Check current login status and credential validity |
|
|
57
57
|
| `coze auth logout` | Logout and clear stored credentials |
|
|
58
58
|
|
|
@@ -65,6 +65,7 @@ View and switch organizations to set the default Organization ID for subsequent
|
|
|
65
65
|
| `coze organization list` | List all accessible organizations and their enterprises |
|
|
66
66
|
| `coze organization use <org_id>` | Set the default organization (auto-saves Enterprise ID) |
|
|
67
67
|
| `coze organization use` | Switch to personal account (clears Organization and Enterprise) |
|
|
68
|
+
| `coze organization unset` | Clear the organization context (same as `use` with no org_id). `reset` is an alias for `unset`, and `org` is an alias for `organization`, so `coze org unset` / `coze org reset` also work |
|
|
68
69
|
|
|
69
70
|
Alias: `coze org`
|
|
70
71
|
|
|
@@ -132,7 +133,7 @@ coze code project list --size 20 --has-published
|
|
|
132
133
|
| `--type <type>` | Filter by type (can pass multiple times): `agent` \| `workflow` \| `webapp` \| `app` \| `web` \| `miniprogram` \| `assistant` |
|
|
133
134
|
| `--name <name>` | Filter by project name |
|
|
134
135
|
| `--has-published` | Filter by publish status |
|
|
135
|
-
| `--search-scope <n>` | Created by (0=All, 1=
|
|
136
|
+
| `--search-scope <n>` | Created by (0=All, 1=CreateByMe, 2=AllWithCollaborator) |
|
|
136
137
|
| `--folder-id <id>` | Filter by folder |
|
|
137
138
|
| `--order-type <n>` | Sort type (0=descending, 1=ascending) |
|
|
138
139
|
| `--order-by <n>` | Order by (0=updated\_at, 1=created\_at) |
|
|
@@ -148,6 +149,10 @@ coze code project list --size 20 --has-published
|
|
|
148
149
|
|
|
149
150
|
> Remote import requires prior OAuth authorization via `coze code git auth login`, and imported projects are automatically bound to the source repo.
|
|
150
151
|
|
|
152
|
+
**Output:** in JSON mode, prints `{ project_id, source, repo?, project_url }` (`repo` is only present for GitHub imports).
|
|
153
|
+
|
|
154
|
+
> After a successful import, the CLI automatically sends an initialization query to the project's default conversation in the background (same behavior as the Web client). Use `coze code message status -p <projectId>` to check its progress. If sending fails, the import result is not affected — the CLI prints a hint to send it manually.
|
|
155
|
+
|
|
151
156
|
#### Message
|
|
152
157
|
|
|
153
158
|
Send and manage chat messages in Coze Coding projects. The project ID is specified on the `message` parent command and shared by all subcommands.
|
|
@@ -371,14 +376,18 @@ coze code git auth login
|
|
|
371
376
|
# Check authorization status
|
|
372
377
|
coze code git auth status
|
|
373
378
|
|
|
379
|
+
# Check authorization status in a pipeline
|
|
380
|
+
coze code git auth status --format json | jq .status
|
|
381
|
+
|
|
374
382
|
# Search repos by keyword
|
|
375
383
|
coze code git search --keyword react
|
|
376
384
|
|
|
377
385
|
# Paginated search
|
|
378
386
|
coze code git search -k react --page 2 --page-size 10
|
|
379
387
|
|
|
380
|
-
# Revoke authorization
|
|
388
|
+
# Revoke authorization (interactive confirmation; use --force to skip)
|
|
381
389
|
coze code git auth logout
|
|
390
|
+
coze code git auth logout --force
|
|
382
391
|
```
|
|
383
392
|
|
|
384
393
|
**`git`** **options (shared by subcommands):**
|
|
@@ -387,6 +396,8 @@ coze code git auth logout
|
|
|
387
396
|
| ----------------------- | ----------------------------------------------------- |
|
|
388
397
|
| `--provider <provider>` | Git service provider: `github` / `gitlab` (default: `github`) |
|
|
389
398
|
|
|
399
|
+
> `git auth logout` prompts for confirmation in an interactive terminal. In JSON mode or non-interactive terminals, `--force` is required — otherwise the command fails with `E1000`.
|
|
400
|
+
|
|
390
401
|
#### Repo
|
|
391
402
|
|
|
392
403
|
Manage remote repository bindings and sync operations for Coze Coding projects.
|
|
@@ -420,6 +431,12 @@ coze code repo pull -p <projectId> --conflict-strategy ours
|
|
|
420
431
|
coze code repo unbind -p <projectId> --force
|
|
421
432
|
```
|
|
422
433
|
|
|
434
|
+
**`repo`** **options (shared by subcommands):**
|
|
435
|
+
|
|
436
|
+
| Option | Description |
|
|
437
|
+
| ----------------------- | ----------------------------------------------------- |
|
|
438
|
+
| `--provider <provider>` | Git service provider: `github` / `gitlab` (default: `github`) |
|
|
439
|
+
|
|
423
440
|
**`repo create`** **options:**
|
|
424
441
|
|
|
425
442
|
| Option | Description |
|
|
@@ -441,12 +458,26 @@ coze code repo unbind -p <projectId> --force
|
|
|
441
458
|
| `-p, --project-id <projectId>` | **(required)** Project ID |
|
|
442
459
|
| `--conflict-strategy <strategy>` | Auto conflict resolution: `ours` / `theirs` |
|
|
443
460
|
|
|
444
|
-
**`repo
|
|
461
|
+
**`repo push`** **options:**
|
|
445
462
|
|
|
446
463
|
| Option | Description |
|
|
447
464
|
| ------------------------------ | ------------------------- |
|
|
448
465
|
| `-p, --project-id <projectId>` | **(required)** Project ID |
|
|
449
|
-
|
|
466
|
+
|
|
467
|
+
**`repo status`** **options:**
|
|
468
|
+
|
|
469
|
+
| Option | Description |
|
|
470
|
+
| ------------------------------ | ------------------------- |
|
|
471
|
+
| `-p, --project-id <projectId>` | **(required)** Project ID |
|
|
472
|
+
|
|
473
|
+
**`repo unbind`** **options:**
|
|
474
|
+
|
|
475
|
+
| Option | Description |
|
|
476
|
+
| ------------------------------ | ------------------------------------ |
|
|
477
|
+
| `-p, --project-id <projectId>` | **(required)** Project ID |
|
|
478
|
+
| `--force` | Skip confirmation and unbind directly |
|
|
479
|
+
|
|
480
|
+
> Without `--force`, `repo unbind` prompts for confirmation in an interactive terminal. In JSON mode or non-interactive terminals, `--force` is required — otherwise the command fails with `E1000`.
|
|
450
481
|
|
|
451
482
|
> `repo push` and `repo pull` are placeholder implementations pending backend wiring — they currently report success without performing a real sync.
|
|
452
483
|
|
|
@@ -510,6 +541,8 @@ coze code db rollback --db-id <id> --timestamp 1713254400000 --confirm
|
|
|
510
541
|
| `--all` | Fetch all databases across pages |
|
|
511
542
|
| `--max-pages <maxPages>` | Max pages to fetch in text mode (default: 10) |
|
|
512
543
|
|
|
544
|
+
> In JSON mode, the output is a `{ databases, next_cursor_id }` object (without `--all` it contains a single page; with `--all` it aggregates all pages). In text mode, the output is an auto-paginated array of databases.
|
|
545
|
+
|
|
513
546
|
**`db gen-types`** **options:**
|
|
514
547
|
|
|
515
548
|
| Option | Description |
|
|
@@ -613,6 +646,7 @@ coze generate image "A storyboard" --sequential auto --max-images 5
|
|
|
613
646
|
| `--optimize-prompt-mode <mode>` | `standard` | Prompt optimization mode |
|
|
614
647
|
| `--sequential <mode>` | `disabled` | Group image generation: `auto` \| `disabled` |
|
|
615
648
|
| `--max-images <n>` | `15` | Maximum group images (1–15) |
|
|
649
|
+
| `--stdin` | `false` | Read prompt from stdin (pipe input) |
|
|
616
650
|
| `--output-path <path>` | — | Directory to save generated images |
|
|
617
651
|
|
|
618
652
|
#### Audio Generation (TTS)
|
|
@@ -641,6 +675,7 @@ coze generate audio "Hello" --speaker zh_female_xiaohe_uranus_bigtts --audio-for
|
|
|
641
675
|
| `--speech-rate <n>` | `0` | Speech rate (-50 to 100) |
|
|
642
676
|
| `--loudness-rate <n>` | `0` | Loudness (-50 to 100) |
|
|
643
677
|
| `--ssml` | `false` | Treat input as SSML instead of plain text |
|
|
678
|
+
| `--stdin` | `false` | Read prompt from stdin (pipe input) |
|
|
644
679
|
| `--uid <uid>` | `cli_user` | User UID |
|
|
645
680
|
| `--output-path <path>` | — | Directory to save generated audio |
|
|
646
681
|
|
|
@@ -684,14 +719,15 @@ Use `coze generate video create` to submit generation tasks, and `coze generate
|
|
|
684
719
|
| `--first-frame <url>` | — | First frame image URL |
|
|
685
720
|
| `--last-frame <url>` | — | Last frame image URL |
|
|
686
721
|
| `--return-last-frame` | `false` | Return last frame URL in output |
|
|
722
|
+
| `--stdin` | `false` | Read prompt from stdin (pipe input) |
|
|
687
723
|
| `--wait` | `false` | Poll until completion instead of returning `taskId` immediately |
|
|
688
724
|
| `--output-path <path>` | — | Directory to save generated video |
|
|
689
725
|
|
|
690
|
-
**`generate video status`**
|
|
726
|
+
**`generate video status`** has no command-specific options. Use the global `--format json` flag to output the full response as JSON:
|
|
691
727
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
728
|
+
```bash
|
|
729
|
+
coze generate video status task_123 --format json
|
|
730
|
+
```
|
|
695
731
|
|
|
696
732
|
### `coze file` — File Operations
|
|
697
733
|
|
|
@@ -767,6 +803,13 @@ coze upgrade --tag beta
|
|
|
767
803
|
| `--force` | Force upgrade even if already on the latest version |
|
|
768
804
|
| `--tag <tag>` | Specify the dist-tag to upgrade to (default: `latest`) |
|
|
769
805
|
|
|
806
|
+
### Other Commands
|
|
807
|
+
|
|
808
|
+
| Command | Description |
|
|
809
|
+
| ------------ | ----------------------------------------------------------------- |
|
|
810
|
+
| `coze guide` | Sync CLI-bundled skills to your AI tools and keep versions aligned |
|
|
811
|
+
| `coze agent` | Agent-facing Coze APIs backed by Claw project endpoints |
|
|
812
|
+
|
|
770
813
|
## Global Options
|
|
771
814
|
|
|
772
815
|
| Option | Description |
|
|
@@ -810,19 +853,14 @@ The CLI reads configuration from multiple sources with the following priority (h
|
|
|
810
853
|
|
|
811
854
|
## Exit Codes
|
|
812
855
|
|
|
813
|
-
| Code | Name
|
|
814
|
-
| ---- |
|
|
815
|
-
| `0` | `SUCCESS`
|
|
816
|
-
| `1` | `
|
|
817
|
-
| `2` | `
|
|
818
|
-
| `
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
| `6` | `NETWORK_ERROR` | Network error |
|
|
822
|
-
| `7` | `SERVER_ERROR` | Server error |
|
|
823
|
-
| `8` | `TIMEOUT` | Operation timed out |
|
|
824
|
-
| `9` | `QUOTA_EXCEEDED` | Quota exceeded |
|
|
825
|
-
| `10` | `CONFLICT` | Resource conflict |
|
|
856
|
+
| Code | Name | Description |
|
|
857
|
+
| ---- | ------------- | ----------------------------------------------------------- |
|
|
858
|
+
| `0` | `SUCCESS` | Command completed successfully |
|
|
859
|
+
| `1` | `FAILURE` | General failure (resource, quota, network, or server error) |
|
|
860
|
+
| `2` | `AUTH_ERROR` | Authentication error (`E2xxx` error codes) |
|
|
861
|
+
| `4` | `INPUT_ERROR` | Invalid argument or input (`E1xxx` error codes) |
|
|
862
|
+
|
|
863
|
+
> Business-level error codes — `E3xxx` (resource), `E4xxx` (quota), and `E5xxx` (network/server) — all exit with code `1`. Check the error `code` field in the JSON output (`--format json`) for the specific error code.
|
|
826
864
|
|
|
827
865
|
## License
|
|
828
866
|
|