5dive-cli-extras
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese5dive-cli-extras
5dive-cli-extras
Companion to the skill: everything on the CLI that isn't
reached for every session. Read first for the mental model,
the output contract, and the core spawn/send/task recipes — they
apply here too and aren't repeated.
5dive-cli5dive5dive-cli--json作为技能的配套工具:涵盖 CLI中所有非日常高频使用的功能。请先阅读文档,了解其核心概念、输出规范以及生成/发送/任务管理的基础用法——这些规则同样适用于本工具,此处不再重复说明。
5dive-cli5dive5dive-cli--jsonAdvanced agent create: personas, BYO providers, auth deferral
进阶Agent创建:角色定制、自定义提供商、延迟授权
Hire a ready-made persona from the agent market
从Agent市场雇佣现成角色
Beyond a blank teammate, hire a ready-made persona off the agent market
(character-pack registry, DIVE-993/1020):
bash
5dive market # browse every pack, rarity-first
5dive market <keyword> [--role=<r>] [--rarity=<tier>] [--seasoned] # --seasoned = ships trained memory
5dive market show <slug> # preview: tier, model, skills, card, DID
5dive hire <role> --from-market --dry-run --json # resolve + show disclosure, create NOTHING
5dive hire <role> --from-market [--as=<name>] --yes --json # provision the top match--from-market--dry-runy/N--yes5dive hire <name> [--role="CTO"] [--title=...]--from-marketagent createorg set--role--titleagent import.tar.gzinspectbash
5dive agent inspect <slug|pack.tar.gz> --json # what shell/hooks/skills it would run
sudo 5dive agent import <slug|pack.tar.gz> --as=<name> [--allow-hooks] --jsonA pack's hooks are arbitrary shell that auto-runs on the new agent's tool
events, so is deny-by-default on hooks — stripped unless you
pass — and refuses any member with a /absolute path or a
symlink (zip-slip + link-escape guards).
import--allow-hooks..agent clone <src> <dst>--with-skills=<spec>[,<spec>...]<owner/repo>:<id>--no-skills5dive-cli--inherit-memory=<scope>wiki<agent-name>allteam--no-team-bot除了创建空白Agent,你还可以从Agent市场雇佣现成的角色(角色包注册表,对应DIVE-993/1020):
bash
5dive market # 浏览所有角色包,按稀有度排序
5dive market <keyword> [--role=<r>] [--rarity=<tier>] [--seasoned] # --seasoned = 包含训练记忆
5dive market show <slug> # 预览角色包:等级、模型、技能、卡片、DID
5dive hire <role> --from-market --dry-run --json # 解析并展示披露信息,不实际创建
5dive hire <role> --from-market [--as=<name>] --yes --json # 创建匹配度最高的角色--from-market--dry-runy/N--yes--from-market5dive hire <name> [--role="CTO"] [--title=...]agent create--role--titleorg setagent import.tar.gzinspectbash
5dive agent inspect <slug|pack.tar.gz> --json # 查看该包会运行的shell/钩子/技能
sudo 5dive agent import <slug|pack.tar.gz> --as=<name> [--allow-hooks] --json角色包中的钩子是可自动运行的任意shell脚本,因此默认拒绝钩子——除非添加参数,否则钩子会被移除;同时会拒绝包含/绝对路径或符号链接的成员(防止zip-slip和链接逃逸攻击)。
import--allow-hooks..agent clone <src> <dst>--with-skills=<spec>[,<spec>...]<owner/repo>:<id>--no-skills5dive-cli--inherit-memory=<scope><agent-name>allteam--no-team-botCreate-then-auth: --defer-auth
--defer-auth创建后授权:--defer-auth
--defer-authRegisters the agent before its credentials are wired up:
bash
sudo 5dive agent create draft-bot --type=claude --defer-auth --json先注册Agent,之后再配置凭证:
bash
sudo 5dive agent create draft-bot --type=claude --defer-auth --jsonBYO API key: --provider
(hermes / openclaw / claude)
--provider自定义API密钥:--provider
(hermes / openclaw / claude)
--providerhermesopenclawbash
sudo 5dive agent create cheap-bot --type=openclaw \
--provider=openrouter --api-key=- --json # key on stdinProviders: . Since 0.8.0, also works on
for the Anthropic-compatible subset (); it requires and wires
/ plus per-tier model defaults.
Override with at create or
later. Keep the background HAIKU slot on a prompt-caching-capable model.
openrouter google minimax moonshot huggingface anthropic deepseek qwen nous openai zai--provider--type=claudeopenrouter deepseek moonshot zai--auth-profile=<name>ANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKEN--model=<slug>agent config set model=<slug>hermesopenclawbash
sudo 5dive agent create cheap-bot --type=openclaw \
--provider=openrouter --api-key=- --json # 从标准输入读取密钥支持的提供商:。从0.8.0版本开始,也可用于,兼容Anthropic的子集();需要配合参数,自动配置/以及对应等级的模型默认值。可在创建时通过或后续通过覆盖默认模型。建议将后台HAKU插槽设置为支持提示缓存的模型。
openrouter google minimax moonshot huggingface anthropic deepseek qwen nous openai zai--provider--type=claudeopenrouter deepseek moonshot zai--auth-profile=<name>ANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKEN--model=<slug>agent config set model=<slug>Tune a running claude agent: model + effort
调整运行中的Claude Agent:模型与算力
bash
sudo 5dive agent config worker-1 set model=claude-opus-4-8
sudo 5dive agent config worker-1 set effort=highbash
sudo 5dive agent config worker-1 set model=claude-opus-4-8
sudo 5dive agent config worker-1 set effort=higheffort: low|medium|high|xhigh|max — claude only; xhigh/max are Opus-tier.
effort取值:low|medium|high|xhigh|max — 仅Claude支持;xhigh/max为Opus等级专属
undefinedundefinedRecover from auth_required
auth_required从auth_required
错误中恢复
auth_requiredbash
undefinedbash
undefinedIf create fails with error.class=auth_required, the type isn't authenticated.
如果创建Agent时出现error.class=auth_required错误,说明该类型未完成授权。
A) Static API key in $KEY (preferred for automation)
A) 从环境变量$KEY读取静态API密钥(自动化场景首选)
echo "$KEY" | sudo 5dive agent auth set claude --api-key=- --json
echo "$KEY" | sudo 5dive agent auth set claude --api-key=- --json
B) Device-code flow (when only a human can complete login)
B) 设备码流程(仅人工可完成登录)
sudo 5dive agent auth start claude --json
sudo 5dive agent auth start claude --json
-> session id; give the URL from auth poll
to the user; they paste the
auth poll-> 返回会话ID;将auth poll
返回的URL提供给用户,用户粘贴回调码后执行auth submit
完成登录。
auth pollauth submitcallback code back via auth submit
.
auth submit—
Never call `5dive agent auth login <type>` from your own process — it hands
the TTY off to the upstream CLI's interactive flow and hangs your agent.
Use `auth start`/`auth set` instead.
请勿在自己的进程中调用`5dive agent auth login <type>`——该命令会将终端控制权交给上游CLI的交互式流程,导致你的Agent挂起。请使用`auth start`/`auth set`替代。Multi-account: the account
noun
account多账号管理:account
指令
accountA 5dive account is a named auth profile — one bag of credentials that any
number of agents can share via . Use it when the host
has more than one human/billing identity and different agents should use
different ones.
--auth-profile=<name>bash
sudo 5dive account list --json # which accounts exist, types, agents bound
sudo 5dive account usage --json # per-account 5h/7d rate-limit headroom
sudo 5dive account show acme-prod --json # detail incl. which env keys are populated
sudo 5dive account add acme-prod # provision empty, then sign in (TTY-only)
sudo 5dive account login acme-prod --type=claude
sudo 5dive agent set-account worker-1 acme-prod --json # rebind + restart
sudo 5dive agent set-account worker-1 default --json # clear the override
sudo 5dive account rename acme-prod acme-staging --json # remove refuses while bound
sudo 5dive account remove acme-staging --json
sudo 5dive account set-active-provider acme-prod hermes openrouter --json # hermes-onlyThe reserved name is rejected by / — at the
agent level, means "no override, use the shared
". Check before blaming
quota for a failure or moving agents between accounts.
defaultaccount addrenameauth-profile=default/etc/5dive/connectors/<type>.envaccount usage5dive的account是命名的授权配置文件——一组凭证,可通过让多个Agent共享。适用于主机拥有多个用户/计费身份,且不同Agent需使用不同身份的场景。
--auth-profile=<name>bash
sudo 5dive account list --json # 查看所有账号、类型及绑定的Agent
sudo 5dive account usage --json # 查看每个账号的5小时/7天调用余量
sudo 5dive account show acme-prod --json # 查看账号详情,包括已配置的环境变量
sudo 5dive account add acme-prod # 创建空账号,之后登录(仅交互式终端支持)
sudo 5dive account login acme-prod --type=claude
sudo 5dive agent set-account worker-1 acme-prod --json # 重新绑定账号并重启Agent
sudo 5dive agent set-account worker-1 default --json # 清除账号覆盖,使用默认配置
sudo 5dive account rename acme-prod acme-staging --json # 账号绑定Agent时无法删除
sudo 5dive account remove acme-staging --json
sudo 5dive account set-active-provider acme-prod hermes openrouter --json # 仅hermes生效defaultaccount addrenameauth-profile=default/etc/5dive/connectors/<type>.envaccount usageTelegram/Discord pairing and shared team bot
Telegram/Discord配对与共享团队机器人
bash
undefinedbash
undefinedClassic — return a pairing code, user DMs the bot, paste the bot reply.
经典方式 — 返回配对码,用户向机器人发送私信,粘贴机器人回复的内容完成配对。
sudo 5dive agent pair worker-1 --json
sudo 5dive agent pair worker-1 --code=AB12CD --json
sudo 5dive agent pair worker-1 --json
sudo 5dive agent pair worker-1 --code=AB12CD --json
Auto-detect — long-poll for the next inbound message, seed access.json.
自动检测 — 长轮询下一条入站消息,生成access.json。
sudo 5dive agent telegram-discover --token="$BOT_TOKEN" --poll-secs=60 --json
sudo 5dive agent pair worker-1 --user-id=<userId> --chat-id=<chatId> --json
sudo 5dive agent telegram-discover --token="$BOT_TOKEN" --poll-secs=60 --json
sudo 5dive agent pair worker-1 --user-id=<userId> --chat-id=<chatId> --json
Bot identity for a tappable deep link.
获取机器人身份,用于生成可点击的深度链接。
sudo 5dive agent telegram-getme --token="$BOT_TOKEN" --json
`telegram-discover`/`telegram-getme` are read-only and need no bound agent.
A few more helpers:
```bash
sudo 5dive agent telegram-info worker-1 [--refresh] --json # cached getMe, backfills @handle
sudo 5dive agent telegram-pending-ignore worker-1 <code> --json # drop a pending pairing
sudo 5dive agent telegram-resolve-handle worker-1 @someuser --json # getChat for @handleAttach a bot after create, and prefer stdin over argv for tokens (never
lands in or logs):
/proc/<pid>/cmdlinebash
echo "$BOT_TOKEN" | sudo 5dive agent config worker-1 set telegram.token=-
sudo 5dive agent config worker-1 set channels=telegram
sudo 5dive agent config worker-1 set telegram.home-channel=<chat-id> # hermes onlyOnly one key can be read per invocation, and with nothing piped
blocks on stdin until your timeout. For non-channel secrets there's a
root-only drop primitive:
=-=-bash
echo -n "$TOKEN" | sudo 5dive secret write OPENAI_API_KEY --connector=openaiWho may talk to the bot is governed by (no restart needed —
the plugin re-reads per message):
access.jsonbash
sudo 5dive agent telegram-access get worker-1 --json
echo '{"dmPolicy":"allowlist","allowFrom":[1234567890],"groups":{}}' \
| sudo 5dive agent telegram-access set worker-1
sudo 5dive agent config worker-1 set telegram.allowed-users=1234567890,5551234 # shortcutA group chat the bot should reply in must be present in — without
it, replies into that group are dropped.
groups{}sudo 5dive agent telegram-getme --token="$BOT_TOKEN" --json
`telegram-discover`/`telegram-getme`是只读命令,无需绑定Agent。还有以下辅助命令:
```bash
sudo 5dive agent telegram-info worker-1 [--refresh] --json # 缓存的getMe信息,自动补全@handle
sudo 5dive agent telegram-pending-ignore worker-1 <code> --json # 忽略待处理的配对请求
sudo 5dive agent telegram-resolve-handle worker-1 @someuser --json # 通过@handle获取聊天信息请在创建Agent之后再绑定机器人,并且优先通过标准输入传递令牌(避免令牌出现在或日志中):
/proc/<pid>/cmdlinebash
echo "$BOT_TOKEN" | sudo 5dive agent config worker-1 set telegram.token=-
sudo 5dive agent config worker-1 set channels=telegram
sudo 5dive agent config worker-1 set telegram.home-channel=<chat-id> # 仅hermes支持每次调用只能读取一个格式的密钥,如果后没有输入,会阻塞等待输入直到超时。对于非频道密钥,可使用仅root用户可用的写入命令:
=-=-bash
echo -n "$TOKEN" | sudo 5dive secret write OPENAI_API_KEY --connector=openai谁可以与机器人对话由控制(无需重启——插件会在每次接收消息时重新读取):
access.jsonbash
sudo 5dive agent telegram-access get worker-1 --json
echo '{"dmPolicy":"allowlist","allowFrom":[1234567890],"groups":{}}' \
| sudo 5dive agent telegram-access set worker-1
sudo 5dive agent config worker-1 set telegram.allowed-users=1234567890,5551234 # 快捷方式机器人需要回复的群聊必须在中配置——否则机器人会忽略该群聊的回复请求。
groups{}Shared team bot: one bot, every agent
共享团队机器人:一个机器人,所有Agent共用
Instead of one token per agent, every agent can post into one Telegram forum
group (its own topic per agent) on a single token, with a root listener as
the sole consumer (per-agent bridges go send-only):
getUpdatesbash
sudo 5dive agent team-bot status|provision|shared|intercom|discover|refresh-listener
sudo 5dive agent team-group discover|provision|shared|status [--group=<chat_id>]
sudo 5dive agent topic get|set <name> [--thread-id=N --chat-id=N] # per-agent forum topic无需为每个Agent配置单独令牌,所有Agent可通过单个令牌在同一个Telegram论坛群组中发送消息(每个Agent对应一个独立主题),由root监听器作为唯一的消费者(每个Agent的桥接器仅负责发送消息):
getUpdatesbash
sudo 5dive agent team-bot status|provision|shared|intercom|discover|refresh-listener
sudo 5dive agent team-group discover|provision|shared|status [--group=<chat_id>]
sudo 5dive agent topic get|set <name> [--thread-id=N --chat-id=N] # 每个Agent对应的论坛主题Delegating a request that came in over a channel — full walkthrough
转发通过渠道收到的请求——完整流程
When the user's request arrives via the channel plugin, it's wrapped:
<channel source="plugin:telegram:telegram" chat_id="1234567890" message_id="4671" user="..." ts="...">
redirect to marketing
</channel>Map → and →
(optional; threads the reply):
chat_id--reply-to-chat=<chat_id>message_id--reply-to-msg=<message_id>bash
sudo 5dive agent send marketing \
--reply-to-chat=1234567890 --reply-to-msg=4671 \
"User @alice asked your take on the Q3 launch copy. Reply in the chat
via your own bot — do not reply back to me."Receiver-side the envelope carries ; on
seeing it, post directly in that chat via your own Telegram/Discord tool
instead of replying back to the sender. If the target agent's bot is not
in the chat, relay the reply yourself and tell the user the bot needs adding.
reply-to-chat=<id> reply-to-msg=<id>当用户请求通过渠道插件到达时,会被包装为以下格式:
<channel source="plugin:telegram:telegram" chat_id="1234567890" message_id="4671" user="..." ts="...">
redirect to marketing
</channel>将映射为,映射为(可选;用于线程化回复):
chat_id--reply-to-chat=<chat_id>message_id--reply-to-msg=<message_id>bash
sudo 5dive agent send marketing \
--reply-to-chat=1234567890 --reply-to-msg=4671 \
"用户@alice询问你对Q3发布文案的看法。请直接在聊天中回复,不要回复我。"接收方会收到包含的消息;收到后,请通过自己的Telegram/Discord工具直接在该聊天中回复,而不是回复给发送方。如果目标Agent的机器人不在该聊天中,请代为转发回复,并告知用户需要添加机器人。
reply-to-chat=<id> reply-to-msg=<id>Declarative fleets: compose + team templates
声明式Agent集群:组合与团队模板
For more than a couple of agents, declare the fleet in :
5dive.yamlbash
sudo 5dive up # bring up everything declared (idempotent)
sudo 5dive ps # declared agents' state
sudo 5dive down # tear down declared agents
sudo 5dive export # dump the LIVE fleet to a v2 5dive.yaml
sudo 5dive team ls
sudo 5dive team import startup --json # bundled multi-agent company templateSpec keys per agent: . Strings expand from the process env and fail loudly
when missing.
type, channels, telegram_token, discord_token, workdir, skills, no_skills, defer_auth, isolation, auth_profile, provider, api_key${ENV_VAR}当Agent数量超过几个时,可在中声明集群配置:
5dive.yamlbash
sudo 5dive up # 启动所有已声明的Agent(幂等操作)
sudo 5dive ps # 查看已声明Agent的状态
sudo 5dive down # 停止所有已声明的Agent
sudo 5dive export # 将当前运行的集群导出为v2版本的5dive.yaml
sudo 5dive team ls
sudo 5dive team import startup --json # 导入预定义的多Agent公司模板每个Agent的配置项包括:。字符串中的会从进程环境变量中展开,若变量不存在会报错。
type, channels, telegram_token, discord_token, workdir, skills, no_skills, defer_auth, isolation, auth_profile, provider, api_key${ENV_VAR}Host a CrewAI crew: 5dive crew
5dive crew托管CrewAI团队:5dive crew
5dive crewThe box can run a CrewAI crew as a first-class workload: its own venv, BYO
LLM key stored owner-600, durable memory on disk (), and
a co-signed receipt per run.
CREWAI_STORAGE_DIRbash
sudo 5dive crew install <git-url> --as=<name> [--entry=<module:Crew>] [--branch=<b>]
sudo 5dive crew secret set <name> KEY=VALUE [KEY=VALUE ...]
sudo 5dive crew run <name> # also: show <name> | list | uninstall <name>主机可将CrewAI团队作为一等工作负载运行:拥有独立的虚拟环境,自定义LLM密钥存储权限为owner-600,磁盘持久化记忆(),每次运行都会生成带签名的回执。
CREWAI_STORAGE_DIRbash
sudo 5dive crew install <git-url> --as=<name> [--entry=<module:Crew>] [--branch=<b>]
sudo 5dive crew secret set <name> KEY=VALUE [KEY=VALUE ...]
sudo 5dive crew run <name> # 其他命令:show <name> | list | uninstall <name>Projects: group a multi-task effort under its own ident namespace
项目管理:将多任务工作分组到独立的命名空间
Open a project instead of filing a sprawl of loose tasks — a
named task workspace with its own ident prefix and an optional lead:
DIVE-Nbash
5dive project add frog --name="Frog migration" --goal="port the parser" \
--lead-agent=worker-1 --json # prefix defaults to the upper-cased key
5dive project ls --json # key, prefix, task count, lead, status
5dive project show frog --json
5dive task add "port the lexer" --project=frog --assignee=worker-1 --json
5dive task ls --project=frog --jsonEverything else — ///// — works
identically on a project's tasks.
startdoneneedblockloopheartbeat创建项目来管理一系列任务,而不是零散的任务——项目是一个命名的任务工作区,拥有独立的标识前缀,可指定负责人:
DIVE-Nbash
5dive project add frog --name="Frog迁移项目" --goal="迁移解析器" \
--lead-agent=worker-1 --json # 前缀默认为大写的项目key
5dive project ls --json # 查看项目key、前缀、任务数量、负责人、状态
5dive project show frog --json
5dive task add "迁移词法分析器" --project=frog --assignee=worker-1 --json
5dive task ls --project=frog --json其他所有操作——/////——对项目中的任务同样适用。
startdoneneedblockloopheartbeatTask queue extras: park, escalate, bulk-clear, org writes
任务队列扩展:暂停、升级、批量清除、组织架构编辑
Quiet waits: . Sleep a task without putting it in the human
inbox:
task parkbash
5dive task park DIVE-12 --reason="revisit after launch" --wake=+3d --json
5dive task unpark DIVE-12 --json # wake it earlyBoth and are REQUIRED (no block-graveyard). If you're
actually waiting on a person, use instead; also refuses
over a task with a live gate.
--reason--waketask needparktask need--type=access--probe=<cmd>bash
5dive task need DIVE-9 --type=access --probe="aws s3 ls s3://prod-bucket" \
--ask="Need read access to prod-bucket" --recommend="grant s3:GetObject" --jsonPrecedent prefill. A gate filed with a blank looks for the
closest answered precedent (same need type + ask shape, equal-or-higher
tier, within 90 days) and prefills the recommendation, citing it on the
alert — never overrides an explicit .
--recommend--recommendFlag for attention: bumps priority a tier (capped
at urgent) and pings the owner + paired human, without filing a gate.
task escalate <id>Bulk-clear as the paired human: clears every eligible low-risk gate (tier<2, has a
) in one shot from a verified DM.
task clear-recs --channel-proof=<chat_id> [--only=<id>]--recommendWho fronts the inbox: prints the resolved
org coordinator — the sole agent a surface should pin a needs-you banner to.
task coordinator [--json]Org chart writes (reads live in core):
5dive-clibash
5dive org set worker-1 --manager=lead --title="Auth audit" --json
5dive org show worker-1 --json # manager + direct reports
5dive org ls --json # flat list of everyone placed
5dive org rm worker-1 --json # remove (reports re-parent to null)Writes are root-only — the chart is trusted input to gate routing.
静默等待:。让任务进入休眠状态,不进入人工收件箱:
task parkbash
5dive task park DIVE-12 --reason="发布后再处理" --wake=+3d --json
5dive task unpark DIVE-12 --json # 提前唤醒任务--reason--waketask needtask needpark--type=access--probe=<cmd>bash
5dive task need DIVE-9 --type=access --probe="aws s3 ls s3://prod-bucket" \
--ask="需要prod-bucket的读取权限" --recommend="授予s3:GetObject权限" --json先例自动填充。如果创建环节时未指定,系统会查找最近的已处理先例(相同需求类型+请求格式、等级相同或更高、90天内),自动填充推荐内容,并在提醒中引用该先例——不会覆盖显式指定的。
--recommend--recommend标记为重点关注:。将任务优先级提升一级(最高为紧急),并通知任务所有者和配对的人工用户,无需创建环节。
task escalate <id>批量清除(仅配对人工用户可用):。从已验证的私信中一次性清除所有符合条件的低风险环节(等级<2、带有)。
task clear-recs --channel-proof=<chat_id> [--only=<id>]--recommend谁负责收件箱:。输出当前组织的协调人——即收件箱应绑定的唯一Agent。
task coordinator [--json]组织架构编辑(读取操作在核心功能中):
5dive-clibash
5dive org set worker-1 --manager=lead --title="权限审计" --json
5dive org show worker-1 --json # 查看上级主管+直接下属
5dive org ls --json # 查看所有已配置的组织成员
5dive org rm worker-1 --json # 删除成员(下属会重新归为无主管)编辑操作仅root用户可用——组织架构是环节路由的可信输入。
Recurring work + waking workers: heartbeat
周期性任务与唤醒Agent:heartbeat
A recurring template materializes into a normal todo on schedule; the
heartbeat wakes an enrolled agent only when it actually has queued work.
bash
5dive task add "rotate the weekly metrics digest" \
--recurring="0 9 * * 1" --assignee=worker-1 --json
5dive task ls --recurring --json # list templates
sudo 5dive heartbeat on worker-1 --every=30m # default every=30m; fresh sends /clear per task
sudo 5dive heartbeat ls # enrolled agents + next wake + queued count
sudo 5dive heartbeat off worker-1Enrolment uses the agent's short name, the same name
expects. No catch-up for missed ticks — keep schedules coarse.
task --assignee周期性模板会按计划生成普通任务;heartbeat仅在Agent有排队任务时才唤醒已注册的Agent。
bash
5dive task add "生成每周指标摘要" \
--recurring="0 9 * * 1" --assignee=worker-1 --json
5dive task ls --recurring --json # 查看所有周期性模板
sudo 5dive heartbeat on worker-1 --every=30m # 默认每30分钟唤醒一次;每次唤醒会清除任务状态
sudo 5dive heartbeat ls # 查看已注册Agent、下次唤醒时间、排队任务数量
sudo 5dive heartbeat off worker-1注册时使用Agent的短名称,与要求的名称一致。错过的周期不会补执行——建议设置较粗的时间粒度。
task --assigneeLoops: relay work across agents (+ human gates)
循环:跨Agent任务中继(+人工审核环节)
A loop chains agents into an auto-relay: each step hands off the moment its
lands, and a human gate pauses the chain for a tap. You can
build, edit, and inspect it conversationally.
task donebash
5dive task loop start --title="Content pipeline" --steps='[
{"agent":"olivia","label":"Pick the topic and brief the writer","handoff":"briefs"},
{"agent":"theo","label":"Draft the post","handoff":"sends to review"},
{"gate":"approval","label":"You approve before it publishes"},
{"agent":"theo","label":"Publish and close"}
]' --json
5dive task loop ls --json # board of loop runs: per-run step progress + statusThe relay creates one subtask per step, chained N+1-blocked-by-N under a run
parent. To edit a running loop, act on its subtasks (, , , , or slip in a gate); to
stop it, the run parent (cascades).
task lstask assigntask block/unblocktask rmtask needtask rm循环可将Agent链成自动中继:每个步骤在完成后立即移交任务,人工审核环节会暂停链条等待人工确认。你可以通过对话方式构建、编辑和查看循环。
task donebash
5dive task loop start --title="内容流水线" --steps='[
{"agent":"olivia","label":"选择主题并给作者提供brief","handoff":"briefs"},
{"agent":"theo","label":"撰写文章草稿","handoff":"提交审核"},
{"gate":"approval","label":"你需要在发布前审核"},
{"agent":"theo","label":"发布并关闭任务"}
]' --json
5dive task loop ls --json # 查看所有循环运行状态:每个循环的步骤进度+状态中继会为每个步骤创建一个子任务,在父任务下按N+1依赖于N的方式链式关联。要编辑运行中的循环,可操作其子任务(、、、,或插入环节);要停止循环,删除父任务即可(会级联删除所有子任务)。
task lstask assigntask block/unblocktask rmtask needMaker→verifier loops: the writer never grades itself
创作者→审核者循环:作者不自评
Verification is on by default for non-trivial tasks (a grader distinct from
the maker); opts out. To pin a specific grader:
--no-verifybash
5dive task add "migrate the auth module to the new SDK" \
--assignee=dario --verifier=marcus --max-iters=3 \
--accept="builds clean, tests pass, no public API change" --json
5dive task reject DIVE-7 --feedback="tests pass but the public signature changed" --json对于非 trivial 的任务,默认启用审核机制(审核者与创作者不同);参数可关闭审核。要指定特定审核者:
--no-verifybash
5dive task add "将权限模块迁移到新SDK" \
--assignee=dario --verifier=marcus --max-iters=3 \
--accept="编译通过、测试通过、无公共API变更" --json
5dive task reject DIVE-7 --feedback="测试通过但公共签名变更" --json-> bounces back to the maker; escalates to a human at --max-iters.
-> 将任务退回给创作者;达到--max-iters次数时升级给人工处理。
5dive task loops --json # board of maker→verifier loops (--stuck / --escalate-stuck)
5dive task loops --runs --json # loop_runs control window: topology/stage/iteration/ceiling
`5dive task verifier <id> <agent> [--accept=<criteria>] [--max-iters=<n>]`
attaches the rail to an already-filed task. Once delivered, `task done` is
refused from anyone but the verifier — send corrections there instead. If
the work ships as a PR, `5dive task deliver <id> --pr=<url> [--result=<text>]`
hands off to the verifier without closing; `task done` then refuses to close
until that PR is merged and green (`--force-merge-gate` overrides false
positives).5dive task loops --json # 查看创作者→审核者循环列表(--stuck / --escalate-stuck可筛选)
5dive task loops --runs --json # 循环运行控制窗口:拓扑/阶段/迭代次数/上限
`5dive task verifier <id> <agent> [--accept=<criteria>] [--max-iters=<n>]`可给已创建的任务添加审核环节。任务交付后,只有审核者可以执行`task done`——请将修正内容发送给审核者。如果工作成果是PR,`5dive task deliver <id> --pr=<url> [--result=<text>]`会将任务移交给审核者但不关闭;`task done`会拒绝关闭,直到PR合并且状态为绿色(`--force-merge-gate`可覆盖误判)。LOOP-7: agent-native orchestration verbs
LOOP-7:Agent原生编排指令
Lower-level than the relay above — JSON in/out, each verb spawns/grades
agents directly and honors (self-halts + escalates at the
limit). Humans watch/kill via ; they never
author a loop.
--ceilingtask loops --kill <loopId>bash
5dive loop spawn --role=maker|verifier|worker --agent=<type|name> \
--prompt="…" [--schema=<json>] [--ceiling=<tok>] [--wait[=<sec>]]
5dive loop verify --target=<id> --verifier=<agent> [--accept="…"]
5dive loop grade --target=<id> --verifier=<agent> [--accept="…"] [--threshold=0-100] [--wait]
5dive loop panel --n=<k> --lens="correctness,security" --claim="…" --quorum=<m> # jury
5dive loop map --over=<json-array> --do=<spawn-spec> [--max-concurrency=<n>] # fan-out
5dive loop until-dry --round=<spawn-spec> --stop-after=<K> --dedup-key="…" # drain a queue
5dive loop collect --handles=<id,id,…> # gather results from spawned handles
5dive loop status --handle=<loopId> # read-only single-loop drilldown
5dive loop install <slug> --onto=<agent> [--cron="…"] [--ceiling=<tok>] [--dry-run]比上述中继更底层——JSON输入输出,每个指令直接生成/评分Agent,并遵守限制(达到限制时自动停止并升级给人工)。人工可通过查看/终止循环;人工无法创建循环。
--ceilingtask loops --kill <loopId>bash
5dive loop spawn --role=maker|verifier|worker --agent=<type|name> \
--prompt="…" [--schema=<json>] [--ceiling=<tok>] [--wait[=<sec>]]
5dive loop verify --target=<id> --verifier=<agent> [--accept="…"]
5dive loop grade --target=<id> --verifier=<agent> [--accept="…"] [--threshold=0-100] [--wait]
5dive loop panel --n=<k> --lens="correctness,security" --claim="…" --quorum=<m> # 评审团
5dive loop map --over=<json-array> --do=<spawn-spec> [--max-concurrency=<n>] # 扇出
5dive loop until-dry --round=<spawn-spec> --stop-after=<K> --dedup-key="…" # 清空队列
5dive loop collect --handles=<id,id,…> # 收集已生成Agent的结果
5dive loop status --handle=<loopId> # 只读:查看单个循环的详细状态
5dive loop install <slug> --onto=<agent> [--cron="…"] [--ceiling=<tok>] [--dry-run]Goals: decompose an outcome into a task graph
目标管理:将结果分解为任务图
5dive goal addbash
5dive goal add "ship a public status page" --dry-run --json # plan + render, create NOTHING
5dive goal add "ship a public status page" --json \
[--project=<key>] [--planner=<agent>] [--max-tasks=12] [--depth-cap=5] \
[--checkpoint=6] [--ceiling=40000] [--yes]
5dive goal add --from-gate=<id> --json # materialize a plan a HUMAN answered 'approve'goal addbash
5dive goal status <job> # queued | running | done (plan/gated/materialized) | failedPass for the legacy bounded-block behavior in scripts, or
to skip the planner entirely. Always first to
eyeball the plan.
--wait--plan=<json>--dry-run5dive goal addbash
5dive goal add "上线公共状态页面" --dry-run --json # 生成并展示计划,不实际创建
5dive goal add "上线公共状态页面" --json \
[--project=<key>] [--planner=<agent>] [--max-tasks=12] [--depth-cap=5] \
[--checkpoint=6] [--ceiling=40000] [--yes]
5dive goal add --from-gate=<id> --json # 基于人工批准的环节生成计划goal addbash
5dive goal status <job> # 状态:queued | running | done (plan/gated/materialized) | failed在脚本中可使用参数实现传统的阻塞行为,或使用参数跳过规划环节。建议先执行查看计划。
--wait--plan=<json>--dry-runObjectives: a standing goal bound to a live metric
目标监控:绑定实时指标的长期目标
5dive objectivegoaltickbash
5dive objective add "warm pool >= 1" --metric-cmd="5dive ps --warm --json | jq length" \
--target=1 --direction=up [--unit=count] [--public]
5dive objective ls | show <name> | tick [<name>] | pause <name> | rm <name>
5dive objective resume <name> [--force] # --force bypasses a preflight refusalSelf-steer it: drives one cycle — a planner
proposes a diff (new/reprioritized/cancelled tasks) toward the target,
validated like a plan:
objective replan <name>goal addbash
5dive objective replan warm-pool --dry-run --json # see the proposed diff, create nothing
5dive objective replan warm-pool --json \
[--max-new-per-cycle=3] [--no-progress-limit=3] [--yes] [--from-gate=<id>]--yes--dry-run5dive objectivegoaltickbash
5dive objective add "热池数量 >= 1" --metric-cmd="5dive ps --warm --json | jq length" \
--target=1 --direction=up [--unit=count] [--public]
5dive objective ls | show <name> | tick [<name>] | pause <name> | rm <name>
5dive objective resume <name> [--force] # --force参数可绕过预检查拒绝自驱调整:。执行一轮调整——规划Agent会提出一个朝向目标的变更方案(新增/重新排序/取消任务),并像计划一样进行验证:
objective replan <name>goal addbash
5dive objective replan warm-pool --dry-run --json # 查看变更方案,不实际创建
5dive objective replan warm-pool --json \
[--max-new-per-cycle=3] [--no-progress-limit=3] [--yes] [--from-gate=<id>]--yes--dry-runGovernance votes: 5dive council
5dive council治理投票:5dive council
5dive councilFor decisions that should be a recorded vote rather than one agent's call —
membership motions, constitutional amendments, or routing an open gate to a
deliberation:
bash
5dive council convene "<question>" [--seats=a,b,c] [--mode=quick|deliberate|adversarial]
[--bench=<name>] [--class=<decisionClass>] [--timeout=120]
5dive council gate-clear <task|DIVE-N> [--mode=deliberate] [--seats=a,b,c] [--dry-run]
5dive council schedule add <name> --question="<template>" --cron="<m h dom mon dow>"
5dive council schedule ls | show <name> | rm <name> | run <name> [--dry]
5dive council roster --json # current seats, threshold + quorum, veto holder
5dive council log --limit=20 --json # sealed verdict history
5dive council verify [<receipt-digest>] # re-seal + hash-chain check, fails closed on tamperconvenegate-clearinitpromotedemoteexpelbench add/rmschedule add/rmrosterlogverifyrecordtask need对于需要记录投票而非单个Agent决策的场景——成员变动、章程修改、将开放环节路由到审议:
bash
5dive council convene "<问题>" [--seats=a,b,c] [--mode=quick|deliberate|adversarial]
[--bench=<name>] [--class=<decisionClass>] [--timeout=120]
5dive council gate-clear <task|DIVE-N> [--mode=deliberate] [--seats=a,b,c] [--dry-run]
5dive council schedule add <name> --question="<模板>" --cron="<m h dom mon dow>"
5dive council schedule ls | show <name> | rm <name> | run <name> [--dry]
5dive council roster --json # 当前成员、阈值+法定人数、否决权持有者
5dive council log --limit=20 --json # 密封的投票历史
5dive council verify [<receipt-digest>] # 重新密封+哈希链检查,篡改时会失败convenegate-clearinitpromotedemoteexpelbench add/rmschedule add/rmrosterlogverifyrecordtask needDelegated push: 5dive push
5dive push委托推送:5dive push
5dive pushAn agent created with (needs , the
default) can push ONE named feature branch for PR review once its task's
gate is cleared and bound to that branch:
--can-push--isolation=standardbash
5dive push DIVE-42 [--branch=<b>] [--dry-run]
sudo 5dive push setup # once per box: scaffold the GitHub App configThe agent's own process never touches a GitHub token; a root-only helper
mints one scoped to just that repo, pushes, and discards it.
使用参数创建的Agent(需要,默认配置),在任务环节清除并绑定到指定分支后,可推送一个命名的功能分支用于PR评审:
--can-push--isolation=standardbash
5dive push DIVE-42 [--branch=<b>] [--dry-run]
sudo 5dive push setup # 每台主机执行一次:初始化GitHub App配置Agent自身进程永远不会接触GitHub令牌;仅root用户可用的辅助工具会生成仅针对该仓库的令牌,推送后立即丢弃。
Company wizard: 5dive company
5dive company公司入门向导:5dive company
5dive companybash
5dive company --yes --name=<n> --objective="<outcome>" --metric-cmd="<cmd>" \
--target=<n> --direction=up|downSugar over + (+ optional ) — stands
up a whole self-steering project namespace in one call. Bare (TTY) walks an
interactive wizard.
project addobjective addgoal addbash
5dive company --yes --name=<n> --objective="<结果>" --metric-cmd="<命令>" \
--target=<n> --direction=up|down是 + (可选)的简化操作——一次调用即可创建完整的自驱项目命名空间。不带参数时(交互式终端)会启动交互式向导。
project addobjective addgoal addCompile durable knowledge: memory add
+ hygiene
memory add编译持久化知识:memory add
+ 维护
memory addThe read-path (core) has a write twin — the CLI behind
"compile before you close." Body on stdin:
memory searchbash
echo "$BODY" | 5dive memory add --name=hetzner-cpx-drought \
--description="cpx line delisted post price-hike; cx dry-run false-positive" \
--type=reference --store=wiki --tags=hetzner,capacity \
[--valid-to=2026-12-31] [--supersedes=<slug>] [--confidence=high] [--provenance="<src>"]
5dive memory doctor --json # hygiene: index drift, dangling [[links]], stale refs, near-dupesWrites into your own store (or the shared team wiki with ,
the path teammates can search), stamps provenance, and appends the store's
index line. A token/key tripwire refuses secret-shaped bodies (
does NOT bypass it). More read-path flags: (another agent's store,
root-only).
--store=wiki--force--limit=N --max-tokens=T --roots=a,b --store=all|mine|wiki --agent=<name>memory searchbash
echo "$BODY" | 5dive memory add --name=hetzner-cpx-drought \
--description="cpx系列因涨价下架;客户预演出现误报" \
--type=reference --store=wiki --tags=hetzner,capacity \
[--valid-to=2026-12-31] [--supersedes=<slug>] [--confidence=high] [--provenance="<来源>"]
5dive memory doctor --json # 维护:索引漂移、无效[[链接]]、过期引用、近似重复内容写入到你自己的存储(或使用写入共享团队Wiki,可供团队成员搜索),标记来源,并添加到存储的索引中。系统会拒绝包含密钥/令牌格式的内容(参数无法绕过)。更多读取参数:(查看其他Agent的存储,仅root用户可用)。
--store=wiki--force--limit=N --max-tokens=T --roots=a,b --store=all|mine|wiki --agent=<name>Read the fleet: digest, usage, supervisor
查看集群状态:摘要、使用情况、监控
Read-only surfaces, no agent reasoning, no tokens burned. //
require an admin (sudo) agent even for reads:
usagecostactivitybash
5dive digest --json # standup: shipped/in-progress/gates/token burn (--7d widens)
sudo 5dive digest --send # deliver to the paired Telegram chat
sudo 5dive digest on --at=7 # opt in to daily auto-delivery (default OFF); off | status
sudo 5dive usage --json # board: top agents + top tasks, 24h (--7d)
sudo 5dive usage worker-1 --json # one agent: per-model + per-task breakdown
sudo 5dive cost --json # per-agent 24h burn vs soft/ceiling + state
sudo 5dive activity worker-1 --json # files touched, commands run, cost (--task=DIVE-N, --7d)
sudo 5dive usage loops --json # spend rolled up per loop / topology
sudo 5dive usage budget set worker-1 --daily=2000000 [--ceiling=<tok>] [--hard-stop]
sudo 5dive usage budget ls # all budgets; `budget clear worker-1` removes one
sudo 5dive supervisor # per-agent state, classification, cause, last activity
sudo 5dive supervisor --watch # live repaint (default 5s)Check / before blaming quota for a failure; check
before restarting an agent on a hunch.
usageaccount usagesupervisor只读界面,无需Agent推理,不会消耗Token。//命令需要管理员(sudo)权限的Agent,即使是读取操作:
usagecostactivitybash
5dive digest --json # 每日站会:已完成/进行中/环节/Token消耗(--7d可查看7天数据)
sudo 5dive digest --send # 发送到配对的Telegram聊天
sudo 5dive digest on --at=7 # 开启每日自动发送(默认关闭);off | status可关闭/查看状态
sudo 5dive usage --json # 看板:Top Agent + Top任务,24小时数据(--7d可查看7天)
sudo 5dive usage worker-1 --json # 单个Agent:按模型+任务的消耗明细
sudo 5dive cost --json # 单个Agent24小时消耗 vs 软限制/上限 + 状态
sudo 5dive activity worker-1 --json # 操作的文件、执行的命令、消耗(--task=DIVE-N可查看指定任务,--7d可查看7天)
sudo 5dive usage loops --json # 按循环/拓扑汇总的消耗
sudo 5dive usage budget set worker-1 --daily=2000000 [--ceiling=<tok>] [--hard-stop]
sudo 5dive usage budget ls # 查看所有预算;`budget clear worker-1`可删除单个预算
sudo 5dive supervisor # 单个Agent状态、分类、原因、最后活动时间
sudo 5dive supervisor --watch # 实时刷新(默认5秒)在因配额问题排查故障前,请先检查/;在凭直觉重启Agent前,请先检查。
usageaccount usagesupervisorControl other boxes: 5dive fleet
5dive fleet控制其他主机:5dive fleet
5dive fleetA fleet registry maps box names to SSH targets (references only — never key
material):
bash
sudo 5dive fleet add prod-2 --host=1.2.3.4 --key=/home/claude/.ssh/id_ed25519
5dive fleet ls
5dive fleet status --json # per-box reachability + agent counts (parallel SSH)
5dive fleet agents --json # every agent across the fleet, one view
5dive fleet send scout@prod-2 "status report please"
5dive fleet restart scout@prod-2One unreachable box never fails the whole view. / need root; the
read surfaces don't.
addrm集群注册表将主机名称映射到SSH目标(仅引用——不存储密钥):
bash
sudo 5dive fleet add prod-2 --host=1.2.3.4 --key=/home/claude/.ssh/id_ed25519
5dive fleet ls
5dive fleet status --json # 查看每台主机的可达性+Agent数量(并行SSH)
5dive fleet agents --json # 查看集群中所有Agent的统一视图
5dive fleet send scout@prod-2 "请发送状态报告"
5dive fleet restart scout@prod-2单台主机不可达不会影响整个视图。/命令需要root权限;读取界面不需要。
addrmDiagnose a sick host
诊断主机故障
bash
sudo 5dive doctor --jsonEnvelope is always with exit 0.
Branch on . Add (alias ) to
attempt reversible fixes; previews them. Narrow with
.
{ ok: true, data: { summary, checks } }data.summary.errors > 0--fix--repair--dry-run--category=deps|types|auth|creds|registry|shelld|channels|host|memorybash
5dive selfcheck --json # proves gate delivery, audit log, bundle integrity,
# scorecard FOR REAL in an isolated sandbox
sudo 5dive agent stats --all --json # whole fleet: unit state, restarts, health
5dive update --check --json # is the CLI behind/stale? read-only, no root
5dive trace <id|DIVE-N> # causal timeline: goal/parent/objective/loop -> ship -> verdict
5dive models --json # live model id per alias (opus/sonnet/fable/haiku)
sudo 5dive watch # htop-style live view (interactive TTY only)Treat any "not-reached" probe as "unmeasured here", not "fine".
upgrades the CLI + plugins and restarts every agent on
the host — never run it casually from an agent session.
selfcheck5dive self-updatebash
sudo 5dive doctor --json输出格式始终为,退出码为0。可根据判断是否有错误。添加(别名)参数可尝试可逆修复;参数可预览修复操作。可使用参数缩小诊断范围。
{ ok: true, data: { summary, checks } }data.summary.errors > 0--fix--repair--dry-run--category=deps|types|auth|creds|registry|shelld|channels|host|memorybash
5dive selfcheck --json # 在隔离沙箱中验证环节交付、审计日志、包完整性、评分卡
# 真实结果
sudo 5dive agent stats --all --json # 整个集群:单元状态、重启次数、健康状况
5dive update --check --json # 检查CLI是否过时?只读操作,无需root权限
5dive trace <id|DIVE-N> # 因果时间线:目标/父任务/监控目标/循环 -> 交付 -> 结果
5dive models --json # 每个别名对应的实时模型ID(opus/sonnet/fable/haiku)
sudo 5dive watch # htop风格的实时视图(仅交互式终端支持)将中"not-reached"的探针视为"未在此处测量",而非"正常"。会升级CLI+插件,并重启主机上的所有Agent——请勿在Agent会话中随意执行该命令。
selfcheck5dive self-updateReference
参考
See 's , , and
for full flag detail, and /
as the ultimate authority if a flag here is rejected.
5dive-clireferences/commands.mdexit-codes.mdpaths.mdsudo 5dive --helpsudo 5dive <noun> --helpSynced to 5dive CLI 0.17.2 (2026-07-29).
请查看的、和获取完整的参数说明,如果此处的参数被拒绝,请以 / 的输出为准。
5dive-clireferences/commands.mdexit-codes.mdpaths.mdsudo 5dive --helpsudo 5dive <noun> --help同步至5dive CLI 0.17.2(2026-07-29)。