Skip to content

CLI 命令

全局参数

参数说明
--help, -h显示帮助
--version, -v显示版本
--print-logs将日志输出到 stderr
--log-level DEBUG|INFO|WARN|ERROR设置日志级别
--pure禁用外部插件

基本命令

命令说明
swust-code启动交互式 TUI
swust-code run [message]运行单次命令
swust-code run --goal "目标" "消息"自治模式
swust-code dream启动记忆整合命令流
swust-code distill启动工作流打包命令流
swust-code serve启动 headless API server
swust-code web启动 server 并打开 Web UI
swust-code attach <url>连接已有 server
swust-code --help显示帮助
swust-code --version显示版本

run 命令

bash
swust-code run [message..]

选项:
  -c, --continue          继续上一个会话
  -s, --session           指定会话 ID
  -m, --model             指定模型 (provider/model)
  --goal                  设定自治目标
  --agent                 指定智能体
  --fork                  分叉会话后再继续
  --share                 分享会话
  --format default|json   输出格式
  -f, --file              附加文件
  --title                 指定会话标题
  --attach                连接远端 server
  --dir                   指定运行目录
  --interactive, -i       启动直接交互模式
  --thinking              显示 thinking block
  --variant               指定模型变体
  --dangerously-skip-permissions  自动批准未显式拒绝的权限

管理命令

命令说明
swust-code providers list列出 Provider 凭证
swust-code providers login [url]登录 Provider
swust-code providers logout [provider]删除 Provider 凭证
swust-code providers import从 MiMo-Code、Claude Code 或环境变量导入凭证
swust-code agent管理智能体
swust-code mcp list列出 MCP 服务器
swust-code mcp add添加 MCP 服务器
swust-code mcp auth [name]为远程 MCP 执行 OAuth
swust-code mcp logout [name]删除 MCP OAuth 凭证
swust-code models [provider]列出模型
swust-code plugin <module>安装插件
swust-code session管理会话
swust-code db数据库工具
swust-code stats查看 token 与费用统计
swust-code export [sessionID]导出会话 JSON
swust-code import <file>导入会话 JSON 或分享 URL
swust-code github管理 GitHub agent
swust-code pr <number>拉取并 checkout PR 后运行 SWUST Code
swust-code acp启动 Agent Client Protocol server
swust-code upgrade升级
swust-code uninstall卸载