@coze/cli 0.2.0-alpha.dea2da → 0.2.0-alpha.e81ff3
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 -24
- package/lib/cli.js +3 -3
- package/lib/{index-DNmOe3vH.js → index-C6r1MTLx.js} +1 -1
- package/lib/send-message.worker.js +1 -1
- package/package.json +2 -2
- package/skills/manifest.json +6 -6
- package/skills/using-coze-cli/SKILL.md +15 -23
- package/skills/using-coze-cli/coze-claw/MODULE.md +1 -1
- package/skills/using-coze-cli/coze-code/MODULE.md +4 -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 +12 -0
- 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/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,7 +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 (
|
|
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 |
|
|
69
69
|
|
|
70
70
|
Alias: `coze org`
|
|
71
71
|
|
|
@@ -133,7 +133,7 @@ coze code project list --size 20 --has-published
|
|
|
133
133
|
| `--type <type>` | Filter by type (can pass multiple times): `agent` \| `workflow` \| `webapp` \| `app` \| `web` \| `miniprogram` \| `assistant` |
|
|
134
134
|
| `--name <name>` | Filter by project name |
|
|
135
135
|
| `--has-published` | Filter by publish status |
|
|
136
|
-
| `--search-scope <n>` | Created by (0=All, 1=
|
|
136
|
+
| `--search-scope <n>` | Created by (0=All, 1=CreateByMe, 2=AllWithCollaborator) |
|
|
137
137
|
| `--folder-id <id>` | Filter by folder |
|
|
138
138
|
| `--order-type <n>` | Sort type (0=descending, 1=ascending) |
|
|
139
139
|
| `--order-by <n>` | Order by (0=updated\_at, 1=created\_at) |
|
|
@@ -149,6 +149,10 @@ coze code project list --size 20 --has-published
|
|
|
149
149
|
|
|
150
150
|
> Remote import requires prior OAuth authorization via `coze code git auth login`, and imported projects are automatically bound to the source repo.
|
|
151
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
|
+
|
|
152
156
|
#### Message
|
|
153
157
|
|
|
154
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.
|
|
@@ -372,14 +376,18 @@ coze code git auth login
|
|
|
372
376
|
# Check authorization status
|
|
373
377
|
coze code git auth status
|
|
374
378
|
|
|
379
|
+
# Check authorization status in a pipeline
|
|
380
|
+
coze code git auth status --format json | jq .status
|
|
381
|
+
|
|
375
382
|
# Search repos by keyword
|
|
376
383
|
coze code git search --keyword react
|
|
377
384
|
|
|
378
385
|
# Paginated search
|
|
379
386
|
coze code git search -k react --page 2 --page-size 10
|
|
380
387
|
|
|
381
|
-
# Revoke authorization
|
|
388
|
+
# Revoke authorization (interactive confirmation; use --force to skip)
|
|
382
389
|
coze code git auth logout
|
|
390
|
+
coze code git auth logout --force
|
|
383
391
|
```
|
|
384
392
|
|
|
385
393
|
**`git`** **options (shared by subcommands):**
|
|
@@ -388,6 +396,8 @@ coze code git auth logout
|
|
|
388
396
|
| ----------------------- | ----------------------------------------------------- |
|
|
389
397
|
| `--provider <provider>` | Git service provider: `github` / `gitlab` (default: `github`) |
|
|
390
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
|
+
|
|
391
401
|
#### Repo
|
|
392
402
|
|
|
393
403
|
Manage remote repository bindings and sync operations for Coze Coding projects.
|
|
@@ -421,6 +431,12 @@ coze code repo pull -p <projectId> --conflict-strategy ours
|
|
|
421
431
|
coze code repo unbind -p <projectId> --force
|
|
422
432
|
```
|
|
423
433
|
|
|
434
|
+
**`repo`** **options (shared by subcommands):**
|
|
435
|
+
|
|
436
|
+
| Option | Description |
|
|
437
|
+
| ----------------------- | ----------------------------------------------------- |
|
|
438
|
+
| `--provider <provider>` | Git service provider: `github` / `gitlab` (default: `github`) |
|
|
439
|
+
|
|
424
440
|
**`repo create`** **options:**
|
|
425
441
|
|
|
426
442
|
| Option | Description |
|
|
@@ -442,12 +458,26 @@ coze code repo unbind -p <projectId> --force
|
|
|
442
458
|
| `-p, --project-id <projectId>` | **(required)** Project ID |
|
|
443
459
|
| `--conflict-strategy <strategy>` | Auto conflict resolution: `ours` / `theirs` |
|
|
444
460
|
|
|
445
|
-
**`repo
|
|
461
|
+
**`repo push`** **options:**
|
|
446
462
|
|
|
447
463
|
| Option | Description |
|
|
448
464
|
| ------------------------------ | ------------------------- |
|
|
449
465
|
| `-p, --project-id <projectId>` | **(required)** Project ID |
|
|
450
|
-
|
|
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`.
|
|
451
481
|
|
|
452
482
|
> `repo push` and `repo pull` are placeholder implementations pending backend wiring — they currently report success without performing a real sync.
|
|
453
483
|
|
|
@@ -511,6 +541,8 @@ coze code db rollback --db-id <id> --timestamp 1713254400000 --confirm
|
|
|
511
541
|
| `--all` | Fetch all databases across pages |
|
|
512
542
|
| `--max-pages <maxPages>` | Max pages to fetch in text mode (default: 10) |
|
|
513
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
|
+
|
|
514
546
|
**`db gen-types`** **options:**
|
|
515
547
|
|
|
516
548
|
| Option | Description |
|
|
@@ -614,6 +646,7 @@ coze generate image "A storyboard" --sequential auto --max-images 5
|
|
|
614
646
|
| `--optimize-prompt-mode <mode>` | `standard` | Prompt optimization mode |
|
|
615
647
|
| `--sequential <mode>` | `disabled` | Group image generation: `auto` \| `disabled` |
|
|
616
648
|
| `--max-images <n>` | `15` | Maximum group images (1–15) |
|
|
649
|
+
| `--stdin` | `false` | Read prompt from stdin (pipe input) |
|
|
617
650
|
| `--output-path <path>` | — | Directory to save generated images |
|
|
618
651
|
|
|
619
652
|
#### Audio Generation (TTS)
|
|
@@ -642,6 +675,7 @@ coze generate audio "Hello" --speaker zh_female_xiaohe_uranus_bigtts --audio-for
|
|
|
642
675
|
| `--speech-rate <n>` | `0` | Speech rate (-50 to 100) |
|
|
643
676
|
| `--loudness-rate <n>` | `0` | Loudness (-50 to 100) |
|
|
644
677
|
| `--ssml` | `false` | Treat input as SSML instead of plain text |
|
|
678
|
+
| `--stdin` | `false` | Read prompt from stdin (pipe input) |
|
|
645
679
|
| `--uid <uid>` | `cli_user` | User UID |
|
|
646
680
|
| `--output-path <path>` | — | Directory to save generated audio |
|
|
647
681
|
|
|
@@ -685,14 +719,15 @@ Use `coze generate video create` to submit generation tasks, and `coze generate
|
|
|
685
719
|
| `--first-frame <url>` | — | First frame image URL |
|
|
686
720
|
| `--last-frame <url>` | — | Last frame image URL |
|
|
687
721
|
| `--return-last-frame` | `false` | Return last frame URL in output |
|
|
722
|
+
| `--stdin` | `false` | Read prompt from stdin (pipe input) |
|
|
688
723
|
| `--wait` | `false` | Poll until completion instead of returning `taskId` immediately |
|
|
689
724
|
| `--output-path <path>` | — | Directory to save generated video |
|
|
690
725
|
|
|
691
|
-
**`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:
|
|
692
727
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
728
|
+
```bash
|
|
729
|
+
coze generate video status task_123 --format json
|
|
730
|
+
```
|
|
696
731
|
|
|
697
732
|
### `coze file` — File Operations
|
|
698
733
|
|
|
@@ -768,6 +803,13 @@ coze upgrade --tag beta
|
|
|
768
803
|
| `--force` | Force upgrade even if already on the latest version |
|
|
769
804
|
| `--tag <tag>` | Specify the dist-tag to upgrade to (default: `latest`) |
|
|
770
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
|
+
|
|
771
813
|
## Global Options
|
|
772
814
|
|
|
773
815
|
| Option | Description |
|
|
@@ -811,19 +853,14 @@ The CLI reads configuration from multiple sources with the following priority (h
|
|
|
811
853
|
|
|
812
854
|
## Exit Codes
|
|
813
855
|
|
|
814
|
-
| Code | Name
|
|
815
|
-
| ---- |
|
|
816
|
-
| `0` | `SUCCESS`
|
|
817
|
-
| `1` | `
|
|
818
|
-
| `2` | `
|
|
819
|
-
| `
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
| `6` | `NETWORK_ERROR` | Network error |
|
|
823
|
-
| `7` | `SERVER_ERROR` | Server error |
|
|
824
|
-
| `8` | `TIMEOUT` | Operation timed out |
|
|
825
|
-
| `9` | `QUOTA_EXCEEDED` | Quota exceeded |
|
|
826
|
-
| `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.
|
|
827
864
|
|
|
828
865
|
## License
|
|
829
866
|
|