CLI

SeaWork CLI 让你从终端管理智能体。它与守护进程 API 暴露的接口相同,因此应用中能做的一切都可以从命令行完成。

智能体编排:你可以告诉编程智能体使用 SeaWork CLI 来生成和管理其他智能体。这使一个智能体能够将子任务委托给其他智能体并等待结果的多智能体工作流成为可能。

快速参考

seawork run "fix the tests"
seawork ls
seawork attach <id>
seawork send <id> "also fix linting"
seawork logs <id>
seawork stop <id>

运行智能体

使用 seawork run 以任务启动新智能体:

seawork run "implement user authentication"
seawork run --provider codex "refactor the API layer"
seawork run --detach "run the full test suite"
seawork run --worktree feature-x "implement feature X"

--worktree 参数在隔离的 git worktree 中创建智能体,适用于并行功能开发。

默认情况下,seawork run 等待完成。使用 --detach 在后台运行。

列出智能体

seawork ls
seawork ls -a
seawork ls -g
seawork ls -a -g --json

流式输出

使用 seawork attach 实时流式传输智能体的输出:

seawork attach abc123

发送消息

向运行中或空闲的智能体发送后续任务:

seawork send <id> "now run the tests"
seawork send <id> --image screenshot.png "what's wrong here?"
seawork send <id> --no-wait "queue this task"

查看日志

seawork logs <id>
seawork logs <id> -f
seawork logs <id> --tail 10
seawork logs <id> --filter tools

多智能体工作流

CLI 设计为可被智能体自身使用。你可以指示智能体生成子智能体进行并行工作:

seawork run --detach "implement the API" --name api-agent
seawork wait api-agent
seawork logs api-agent --tail 5