duvo-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDuvo CLI
Duvo CLI
duvo@duvoai/cliduvo agents …duvo runs …duvo cases …duvo api <method> <path>Use the CLI when the user wants to automate or script Duvo. The
web UI at https://app.duvo.ai is the right answer when they want to
click around interactively; is the right answer the moment they
ask for a shell snippet, a cron job, a CI step, or "how do I do X
without opening the browser?". Both surfaces talk to the same public
API — there is no functional gap to bridge by reaching for .
duvocurlduvo@duvoai/cliduvo agents …duvo runs …duvo cases …duvo api <method> <path>当用户希望自动化或脚本化操作Duvo时,可使用该CLI。如果用户想要交互式点击操作,https://app.duvo.ai网页UI是合适的选择;而当用户需要Shell代码片段、定时任务、CI步骤,或者询问“如何不用打开浏览器完成X操作?”时,就是正确的选择。两种方式调用的是同一个公共API——无需使用来弥补功能缺口。
duvocurlInstall
安装
bash
npm install -g @duvoai/cli
duvo --versionRequires Node.js ≥ 22.22.0. also works without
a global install.
npx @duvoai/cli <cmd>bash
npm install -g @duvoai/cli
duvo --version需要Node.js ≥ 22.22.0。无需全局安装时,也可使用。
npx @duvoai/cli <cmd>Authentication
认证
duvobash
duvo login # OAuth flow — opens your browser
duvo login --name acme # name the profile up front
duvo login --api-key <key> # skip OAuth and store an API key directly
duvo whoami # confirm who's signed induvo login--api-key <key>Switching between profiles:
bash
duvo profiles list # show all profiles; `▶` marks the default
duvo profiles use # interactively pick the default profile
duvo profiles use acme # set a named profile as the default
duvo --profile acme whoami # one-off override for a single commandResolution precedence (the first match wins):
- Profile: flag →
--profile <name>env →DUVO_PROFILEin config.defaultProfile - Credential: env (bypasses the profile's stored credential lookup) → the profile's stored credential.
DUVO_API_KEY - Base URL: env → the profile's
DUVO_API_BASE_URL→apiBaseUrl.https://api.duvo.ai
duvobash
duvo login # OAuth流程——打开浏览器
duvo login --name acme # 提前指定配置文件名称
duvo login --api-key <key> # 跳过OAuth,直接存储API密钥
duvo whoami # 确认当前登录身份duvo login--api-key <key>切换配置文件:
bash
duvo profiles list # 显示所有配置文件;`▶`标记默认配置
duvo profiles use # 交互式选择默认配置文件
duvo profiles use acme # 将指定名称的配置文件设为默认
duvo --profile acme whoami # 单次命令临时覆盖默认配置文件优先级顺序(匹配到的第一个生效):
- 配置文件:标志 →
--profile <name>环境变量 → 配置中的DUVO_PROFILE。defaultProfile - 凭证:环境变量(绕过配置文件存储的凭证查找)→ 配置文件存储的凭证。
DUVO_API_KEY - 基础URL:环境变量 → 配置文件的
DUVO_API_BASE_URL→apiBaseUrl。https://api.duvo.ai
Reading the help
查看帮助
Every command supports . Reach for it first instead of guessing:
--helpbash
duvo --help # global help, lists every top-level group
duvo agents --help # subcommand group
duvo agents create --help # exact flags for one commandThe CLI's help text is the source of truth — if a flag doesn't appear
there, it doesn't exist in your installed version. Always show the
user rather than copy-pasting flags from
memory if you're unsure.
duvo <command> --help每个命令都支持参数。遇到疑问时请先使用该参数,而非猜测:
--helpbash
duvo --help # 全局帮助,列出所有顶级命令组
duvo agents --help # 子命令组帮助
duvo agents create --help # 单个命令的具体标志说明CLI的帮助文本是权威来源——如果某个标志未出现在帮助中,则说明你安装的版本不支持该标志。如果不确定,务必让用户查看,而非凭记忆复制粘贴标志。
duvo <command> --helpOutput modes
输出模式
Each command picks a default output shape based on what it returns:
- Single resource (,
duvo agents get <id>) → human-readable key/value text.duvo runs get <id> - Collection (,
duvo agents list) → table with a fixed column set per resource.duvo runs list - on either of the above → raw JSON to stdout. This is the stable contract for scripts — table and text formats can change between versions, JSON is safe to pipe into
--jsonorjq.yq
bash
duvo agents list --json | jq '.agents[].id'For scripting, always pass and parse the response. Don't
parse the table output — column widths and truncation thresholds are
not part of the public contract. Envelope keys differ across
endpoints — returns , returns
, returns , returns
. Inspect the shape with a one-off call before
hard-coding a jq path.
--jsonagents list.agents[]queues list.queues[]runs list.data[]agents create.agent.id--json每个命令会根据返回内容选择默认输出格式:
- 单一资源(、
duvo agents get <id>)→ 人类可读的键值文本。duvo runs get <id> - 资源集合(、
duvo agents list)→ 按资源类型固定列的表格。duvo runs list - 在上述两种命令后添加→ 向标准输出返回原始JSON。这是脚本使用的稳定约定——表格和文本格式可能在版本间变化,而JSON可安全地通过管道传递给
--json或jq处理。yq
bash
duvo agents list --json | jq '.agents[].id'编写脚本时,请始终传递参数并解析响应。不要解析表格输出——列宽和截断阈值不属于公开约定。不同端点的响应结构不同——返回,返回,返回,返回。在硬编码jq路径前,请先通过单次调用检查响应结构。
--jsonagents list.agents[]queues list.queues[]runs list.data[]agents create.agent.id--jsonThe duvo api
escape hatch
duvo apiduvo api
兜底方案
duvo apiAny endpoint in the public API is reachable via , modelled directly on . Reach for it when:
duvo api <METHOD> <path>gh api- A new public endpoint shipped but doesn't have a dedicated command yet.
duvo - You need a very narrow query-string or body shape that the high-level command doesn't expose.
- You're debugging — shows exactly what the API returned, with no formatting in the way.
duvo api
bash
duvo api GET /v1/agents -F limit=20 -F offset=0
duvo api POST /v1/agents -f name="Ops bot" -F build[name]="v1"
duvo api POST /v1/agents --input body.json
cat body.json | duvo api POST /v1/agents --input --f-Fnull@filereferences/api-escape-hatch.mdHigh-level commands like are sugar over — they share the same HTTP client, output pipeline, and exit
codes, so a script can mix the two freely.
duvo agents createduvo api公共API中的任意端点都可通过调用,该命令模仿实现。在以下场景中可使用该命令:
duvo api <METHOD> <path>gh api- 新的公共端点已发布,但尚未有对应的专属命令。
duvo - 需要使用高级命令未暴露的特定查询字符串或请求体结构。
- 调试时——会显示API返回的原始内容,无任何格式干扰。
duvo api
bash
duvo api GET /v1/agents -F limit=20 -F offset=0
duvo api POST /v1/agents -f name="Ops bot" -F build[name]="v1"
duvo api POST /v1/agents --input body.json
cat body.json | duvo api POST /v1/agents --input --f-Fnull@filereferences/api-escape-hatch.mdduvo agents createduvo apiResource groups
资源组
See for the full command tree with flags.
The top-level groups are:
references/commands.md- Auth & profiles — ,
login,logout,whoamiprofiles … - Agents — ,
agents …,agents case-triggers …agents schedules - Agent folders — (organize agents in a tree)
agent-folders … - Revisions — ,
revisions …(versioned configs)revision-integrations … - Runs — (start, get, message, stop, respond to HITL)
runs … - Queues & cases — ,
queues …,queue-labels …cases … - Files & sandboxes — ,
files …sandboxes … - Connections & integrations — ,
integrations …,connections …oauth … - Clarity — (read-only process search, versions, captures, gaps, evidence, facets, export, doctor)
clarity … - Skills & plugins — ,
skills …plugins … - Team — ,
team getteam members - Low-level —
api <method> <path>
For end-to-end recipes (create an agent → start a run → respond to
HITL; manage a queue and its cases; upload files for a sandboxed run;
authorize a custom MCP server) see .
references/workflows.md完整命令树及标志请参考。顶级命令组包括:
references/commands.md- 认证与配置文件 —— 、
login、logout、whoamiprofiles … - Agent —— 、
agents …、agents case-triggers …agents schedules - Agent文件夹 —— (以树形结构组织Agent)
agent-folders … - 版本修订 —— 、
revisions …(版本化配置)revision-integrations … - 运行任务 —— (启动、获取、发送消息、停止、响应HITL)
runs … - 队列与案例 —— 、
queues …、queue-labels …cases … - 文件与沙箱 —— 、
files …sandboxes … - 连接与集成 —— 、
integrations …、connections …oauth … - Clarity —— (只读流程搜索、版本、捕获、缺口、证据、维度、导出、诊断)
clarity … - Skill与插件 —— 、
skills …plugins … - 团队 —— 、
team getteam members - 底层命令 ——
api <method> <path>
端到端使用示例(创建Agent → 启动运行任务 → 响应HITL;管理队列及案例;为沙箱运行任务上传文件;授权自定义MCP服务器)请参考。
references/workflows.mdConventions you can rely on across commands
全命令通用约定
These hold for every command group, so call them out when explaining
the CLI rather than restating per-command:
- is a global flag that overrides the default profile for that single invocation.
--profile <name> - is available on every command that hits the API and is the shape to use in scripts.
--json - Destructive operations (,
duvo logout,duvo profiles remove,duvo runs stop,duvo agent-folders delete,duvo cases delete,duvo cases clear,duvo cases bulk-delete,duvo skills delete, …) prompt for confirmation in a TTY and refuse on a non-TTY stdin. Passduvo queues delete/-yto skip the prompt — never pipe--yesinto the CLI to bypass the prompt; it explicitly refuses inferred consent from piped input.yes - Exit codes: success,
0generic error,1auth error (missing or invalid key, unknown profile),2not found. Useful for CI scripts that want to branch on the failure mode.3 - IDs are printed bare (no quotes) so they copy cleanly into shell
pipelines and substitutions:
$()bashagent=$(duvo agents create --name "Ops bot" --input "What to do" --json | jq -r .agent.id) duvo runs start --agent "$agent" - Deprecation warnings print to stderr (so they don't corrupt
stdout) and can't be silenced. If a user reports an unexpected warning, check whether their
--jsonversion is behind.@duvoai/cli
以下约定适用于所有命令组,解释CLI时可统一说明,无需逐个命令重复:
- 是全局标志,可临时覆盖单次调用的默认配置文件。
--profile <name> - 所有调用API的命令都支持参数,这是脚本应使用的格式。
--json - 破坏性操作(、
duvo logout、duvo profiles remove、duvo runs stop、duvo agent-folders delete、duvo cases delete、duvo cases clear、duvo cases bulk-delete、duvo skills delete等)在TTY环境中会提示确认,在非TTY标准输入环境中会拒绝执行。传递duvo queues delete/-y参数可跳过提示——请勿通过管道传递--yes命令绕过提示;CLI明确拒绝通过管道输入推断的同意。yes - 退出码:表示成功,
0表示通用错误,1表示认证错误(缺失或无效密钥、未知配置文件),2表示资源未找到。这对需要根据失败模式分支处理的CI脚本很有用。3 - ID会以无引号的形式打印,以便干净地复制到Shell管道和替换中:
$()bashagent=$(duvo agents create --name "Ops bot" --input "What to do" --json | jq -r .agent.id) duvo runs start --agent "$agent" - 弃用警告会打印到标准错误输出(避免破坏的标准输出),且无法关闭。如果用户报告意外警告,请检查其
--json版本是否过时。@duvoai/cli
Pitfalls and gotchas
陷阱与注意事项
- Profile vs credential. changes which profile is read;
--profile foooverrides the credential but still uses the selected profile'sDUVO_API_KEY=…. To target a totally different environment, set bothapiBaseUrlandDUVO_API_KEY.DUVO_API_BASE_URL - with no argument opens an interactive picker that only works in a TTY. In CI, always pass a name explicitly.
profiles use - is interactive by default. When
agents createand--nameare omitted and stdin is a TTY, the CLI prompts. In CI, pass both flags (and--inputif you don't want an initial build) so it never blocks waiting for input.--no-build - reads JSON from stdin. The file (or stdin) is a single case object or an array of up to 100 cases. Each case is
cases create --from-file -. Labels with no{ "title": "…", "data": "…", "labels": [{ "key": "…", "value": "…" }] }are tag-only labels.key - Sandbox files vs team files. manages persistent team files (visible in the Files surface in the UI);
duvo files …stages files for a single run (duvo sandboxes …). Don't mix them.duvo runs start --sandbox-id <id> - Connections vs integrations. shows the team's catalog of integration types;
duvo integrations listshows the user's actual connected accounts (one per OAuth/credential flow). OAuth-based connections (Gmail, Slack, …) are started byduvo connections listorduvo oauth native start <provider>, not byduvo oauth composio start …— the latter is only for user-provided MCP servers.duvo connections create - Clarity is read-only in this CLI surface. Start with
, then use
duvo clarity overview <process-id>,versions,current,proposal,compare,gaps,evidence, orreadinessas needed. Those v2-only commands require a Clarity v2 process; legacy v1 processes support onlyfacets,overview,status,captures, andcapture. Default output is compact; transcripts and media URLs are included only when a JSON command explicitly passesexport.--include-transcripts
- 配置文件 vs 凭证。会更改读取的配置文件;
--profile foo会覆盖凭证,但仍会使用所选配置文件的DUVO_API_KEY=…。若要完全切换到不同环境,请同时设置apiBaseUrl和DUVO_API_KEY。DUVO_API_BASE_URL - **不带参数的**会打开交互式选择器,仅在TTY环境中可用。在CI环境中,请始终显式传递配置文件名称。
profiles use - 默认是交互式的。当省略
agents create和--name且标准输入为TTY时,CLI会提示输入。在CI环境中,请同时传递这两个标志(如果不需要初始构建,可添加--input),避免命令因等待输入而阻塞。--no-build - ****从标准输入读取JSON。文件(或标准输入)内容可以是单个案例对象,或最多100个案例的数组。每个案例的结构为
cases create --from-file -。没有{ "title": "…", "data": "…", "labels": [{ "key": "…", "value": "…" }] }的标签是仅标签类型。key - 沙箱文件 vs 团队文件。管理持久化的团队文件(在UI的文件界面可见);
duvo files …为单次运行任务暂存文件(duvo sandboxes …)。请勿混淆两者。duvo runs start --sandbox-id <id> - 连接 vs 集成。显示团队的集成类型目录;
duvo integrations list显示用户实际连接的账户(每个OAuth/凭证流程对应一个)。基于OAuth的连接(Gmail、Slack等)需通过duvo connections list或duvo oauth native start <provider>启动,而非duvo oauth composio start …——后者仅适用于用户提供的MCP服务器。duvo connections create - Clarity在该CLI界面中是只读的。从开始,根据需要使用
duvo clarity overview <process-id>、versions、current、proposal、compare、gaps、evidence或readiness命令。这些仅支持v2版本的命令需要Clarity v2流程;旧版v1流程仅支持facets、overview、status、captures和capture。默认输出为精简格式;仅当JSON命令显式传递export时,才会包含转录内容和媒体URL。--include-transcripts
When the CLI is the wrong tool
不适合使用CLI的场景
Steer users to a different surface in these cases:
- They want to read a stream of run events as they happen. The
CLI's /
runs getare point-in-time reads. Useruns messageson--webhook-urlto receive events asynchronously, or open the run in the web UI.runs start - They want to edit an SOP or agent configuration interactively.
and
revisions createaccept a config file, but composing the config by hand is painful. Direct them to the Assignment editor in the web UI for anything beyond a small targeted patch.revisions update - They want to run an agent in their own process rather than on Duvo. That's not what the public API exposes; the CLI is a client to the hosted Duvo platform.
在以下场景中,请引导用户使用其他方式:
- 用户希望实时查看运行任务的事件流。CLI的/
runs get是时点读取。可在runs messages时使用runs start参数异步接收事件,或在网页UI中打开运行任务查看。--webhook-url - 用户希望交互式编辑SOP或Agent配置。和
revisions create接受配置文件,但手动编写配置非常繁琐。对于除小范围针对性修改外的操作,请引导用户使用网页UI中的任务编辑器。revisions update - 用户希望在自己的进程中运行Agent,而非在Duvo平台上。这不是公共API提供的功能;CLI是托管Duvo平台的客户端。
In-skill references
技能内参考
- — full command tree with flags, grouped by resource. Use this when you need the exact flag a command expects.
references/commands.md - — end-to-end recipes (create an agent and start a run; queue + cases lifecycle; sandboxed runs with uploaded files; authorize a custom MCP server).
references/workflows.md - —
references/api-escape-hatch.mdflag reference, with worked examples ofduvo apivs-f,-Ftyped fields, and@filefor raw JSON bodies.--input
When in doubt, run — the installed binary is
the final source of truth.
duvo <command> --help- —— 按资源分组的完整命令树及标志。当需要命令所需的具体标志时,请参考该文档。
references/commands.md - —— 端到端使用示例(创建Agent并启动运行任务;队列+案例生命周期;带上传文件的沙箱运行任务;授权自定义MCP服务器)。
references/workflows.md - ——
references/api-escape-hatch.md标志参考,包含duvo api与-f、-F类型字段、@file用于原始JSON请求体的示例。--input
如有疑问,请运行——已安装的二进制文件是最终权威来源。
duvo <command> --helpSee also
相关工具
- — author or rewrite the SOP that ships in a Build (
sop-writer/duvo revisions create).duvo revisions update - — diagnose a failed Job; pairs with
job-debugger,duvo runs get, andduvo runs messagesfor API-mode reads.duvo revisions get - — audit an Assignment or workflow across many Jobs; pairs with
workflow-debugger,duvo runs list, andduvo queues agents.duvo revisions get
- —— 创建或重写Build中包含的SOP(
sop-writer/duvo revisions create)。duvo revisions update - —— 诊断失败的任务;与
job-debugger、duvo runs get、duvo runs messages配合用于API模式读取。duvo revisions get - —— 审计跨多个任务的任务分配或工作流;与
workflow-debugger、duvo runs list、duvo queues agents配合使用。duvo revisions get
Resources
资源
- Duvo — product website
- Duvo documentation — concepts, building Assignments, Connections
- Duvo API reference — every endpoint the CLI wraps
- on npm — versions, install instructions, changelog
@duvoai/cli - Web app — interactive surface for everything the CLI scripts
- API keys — issue and revoke API keys for
duvo login --api-key - Public skill repository — the MIT-licensed community release of this skill, packaged for installation in third-party Claude Code setups
- Duvo —— 产品官网
- Duvo文档 —— 概念、任务分配构建、连接方式
- Duvo API参考 —— CLI封装的所有端点
- on npm —— 版本、安装说明、变更日志
@duvoai/cli - Web应用 —— CLI可脚本化操作的所有功能的交互式界面
- API密钥 —— 为生成和撤销API密钥
duvo login --api-key - 公共Skill仓库 —— 该技能的MIT许可社区版本,打包用于第三方Claude Code环境安装