← 返回 Skills 市场
cengsin

Coze Cli

作者 CengSin · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
123
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install coze-cli-skill
功能描述
Interact with Coze CLI (@coze/cli) — create/deploy Coze projects, manage spaces and organizations, send messages to projects, generate images/audio/video, an...
使用说明 (SKILL.md)

Coze CLI Skill

Overview

This skill enables AI agents to interact with Coze CLI (@coze/cli) — the official command-line tool for Coze/Cozeflow development. It supports project creation, deployment, messaging, multimedia generation, and space management via terminal commands.

Use this skill when: The user wants to create/deploy Coze projects, manage spaces/orgs, generate images/audio/video, send messages to Coze projects, or automate Coze workflows via CLI.

Quick Start

Installation

npm install -g @coze/cli
coze --version   # verify

Authentication

coze auth login --oauth   # opens browser for OAuth flow
coze auth status          # verify login

Initial Setup

# Select organization
coze org list
coze org use \x3Corganization_id>

# Select workspace
coze space list
coze space use \x3Cspace_id>

Core Workflows

Create a Project

# Natural language project creation
coze code project create --message "创建一个数据分析 Web 应用" --type web

# With wait (blocking until done)
coze code project create --message "创建一个客服机器人" --type agent --wait

Supported types: agent, workflow, app, skill, web, miniprogram, assistant

List / Get Projects

coze code project list                          # all projects
coze code project list --type agent --type web  # filter by type
coze code project list --name "客服"            # search by name
coze code project get \x3Cproject_id>              # detail

Send Message to Project

coze code message send "修复登录页面的样式问题" -p \x3Cproject_id>

# With local file context
coze code message send "重构 @src/utils.ts 中的代码" -p \x3Cproject_id>

# Via pipe
cat error.log | coze code message send "分析这个错误日志" -p \x3Cproject_id>

# Check status / cancel
coze code message status -p \x3Cproject_id>
coze code message cancel -p \x3Cproject_id>

Deploy Project

coze code deploy \x3Cproject_id>           # deploy
coze code deploy \x3Cproject_id> --wait    # wait for completion
coze code deploy status \x3Cproject_id>    # check status

Preview Project

coze code preview \x3Cproject_id>

Manage Environment Variables

coze code env list -p \x3Cproject_id>                   # dev env
coze code env list -p \x3Cproject_id> --env prod        # prod env
coze code env set API_KEY xxx -p \x3Cproject_id>         # set
coze code env delete API_KEY -p \x3Cproject_id>          # delete

Generate Multimedia

# Image
coze generate image "一只在太空漫步的猫"
coze generate image "未来城市" --output-path ./city.png --size 4K --no-watermark

# Audio
coze generate audio "你好,欢迎使用 Coze CLI"
coze generate audio "你好世界" --output-path ./hello.mp3 --audio-format ogg_opus

# Video
coze generate video create "一只跳舞的小猫"
coze generate video create "日落延时" --wait --output-path ./sunset.mp4 --resolution 1080p --duration 8
coze generate video status \x3Ctask_id>

Upload File

coze file upload ./document.pdf

Output Format

# Text (default)
coze space list

# JSON (for scripting)
coze space list --format json
coze code project list --format json | jq '.[].name'

CI/CD / Non-Interactive Use

export COZE_ORG_ID=\x3CYOUR_ORG_ID>
export COZE_SPACE_ID=\x3CYOUR_SPACE_ID>
export COZE_PROJECT_ID=\x3CPROJECT_ID>

coze code deploy \x3Cproject_id> --wait --format json

Global Options

Option Description
--format json|text Output format (default: text)
--no-color Disable ANSI colors
--config \x3Cpath> Custom config file
--org-id \x3Cid> Override organization ID
--space-id \x3Cid> Override space ID
-p \x3Cproject_id> Target project ID
--verbose Verbose logging
--debug Full diagnostic logs

Configuration

Config priority (high→low):

  1. Environment variables (COZE_ORG_ID, COZE_SPACE_ID, etc.)
  2. --config CLI flag
  3. COZE_CONFIG_FILE env var
  4. .cozerc.json in project dir
  5. ~/.coze/config.json global
coze config list
coze config get base_url
coze config set base_url https://api.coze.cn

Detailed Command Reference

For the full command reference table, see:

references/commands.md

Contains: auth, org/space, project CRUD, message, deploy, env, domain, skill, multimedia generation, file upload, config, completion, upgrade, CI/CD env vars, and quick command templates.

安全使用建议
This skill is an instruction-only helper for the official Coze CLI and appears internally consistent. Before installing/using: verify you trust the `@coze/cli` npm package source; be aware that following the instructions will (a) ask you to run npm install -g which executes third-party code, (b) open an OAuth login in your browser and store tokens/config under ~/.coze or the configured COZE_CONFIG_FILE, and (c) allow command usage that can read and upload local files if you pass file paths or pipe content into `coze code message send`. Only provide project IDs, environment variables, or local files you intend to share. If you want stronger assurance, check the package repository and the referenced docs (docs.coze.cn / GitHub) before installing.
功能分析
Type: OpenClaw Skill Name: coze-cli-skill Version: 0.1.0 The skill is a legitimate integration for the official Coze CLI (@coze/cli), providing instructions for project management, deployment, and multimedia generation. It follows standard CLI patterns for authentication and environment configuration without any signs of malicious intent, data exfiltration, or harmful prompt injection. All files (SKILL.md, README.md, references/commands.md) are well-documented and align with the stated purpose of automating Coze workflows.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
Name/description match the instructions and included command reference. All referenced environment variables and config paths (COZE_ORG_ID, COZE_SPACE_ID, COZE_PROJECT_ID, COZE_CONFIG_FILE, ~/.coze/config.json, .cozerc.json, etc.) are coherent with a CLI that manages Coze projects and CI/CD usage. No unrelated credentials, binaries, or surprising access are requested.
Instruction Scope
SKILL.md only instructs the agent to run Coze CLI commands and manage local Coze config. It explicitly describes sending local files or piping stdout into `coze code message send` (expected for code/project workflows). Note: those message commands can access local files you reference or pipe in, and the OAuth flow will open a browser and store auth state (e.g., in ~/.coze/config.json). This is expected but worth user awareness.
Install Mechanism
There is no install spec in the skill bundle (instruction-only). The README/SKILL.md recommend installing `@coze/cli` via `npm install -g @coze/cli`, which is a normal public package install pattern. The skill itself does not download or execute code automatically.
Credentials
No secrets or unrelated environment variables are required by the skill. The env vars listed are service-specific (org/space/project/config file) and proportionate to CLI usage. No AWS/GCP/other cloud credentials or generic SECRET/TOKEN variables are requested.
Persistence & Privilege
Skill is not always-enabled and does not request system-level persistence. It does not attempt to modify other skills or global agent settings. Normal CLI operations may write tokens/config to standard Coze config locations (e.g., ~/.coze/config.json), which is expected behavior for an authenticated CLI.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install coze-cli-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /coze-cli-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
coze-cli-skill v0.1.0 - Initial release: Enables interaction with Coze CLI (@coze/cli) through terminal commands. - Supports creating/deploying Coze projects, managing organizations and spaces, sending messages, and automating workflows. - Allows multimedia generation (image, audio, video) and file uploads via CLI. - Provides quick start instructions, core workflows, and output formatting options. - Includes global options and configuration guidance for flexible, scriptable usage.
元数据
Slug coze-cli-skill
版本 0.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Coze Cli 是什么?

Interact with Coze CLI (@coze/cli) — create/deploy Coze projects, manage spaces and organizations, send messages to projects, generate images/audio/video, an... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 123 次。

如何安装 Coze Cli?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install coze-cli-skill」即可一键安装,无需额外配置。

Coze Cli 是免费的吗?

是的,Coze Cli 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Coze Cli 支持哪些平台?

Coze Cli 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Coze Cli?

由 CengSin(@cengsin)开发并维护,当前版本 v0.1.0。

💬 留言讨论