

基于 shadowbot.shell-cli.exe 编写,整理全部命令、使用场景、实操示例、故障排查与环境要求,适用于 Windows 平台下通过 PowerShell 对 ShadowBot 进行命令行管理、自动化运维、应用开发与任务调度。CLI 支持单条指令执行、批量操作以及脚本自动化运行,摆脱图形界面限制,大幅提升运维与开发效率。
所有指令统一遵循以下书写规则:
powershell
shadowbot.shell-cli.exe <命令> [子命令] [参数]
所有命令均可搭配以下全局参数使用:
--timeout <时长>:设置 HTTP 超时时间,例如 10s,默认超时时间为 15s
-h / --help:查看当前命令的帮助文档
CLI 执行后统一返回 JSON 格式数据,固定字段如下:
ok:布尔值,标记操作是否执行成功
command:当前执行的命令内容
timestamp:操作执行时间戳
data:命令返回的业务数据
message:操作状态描述、提示或报错信息
操作系统:Windows 10 / Windows 11
前置软件:已安装 ShadowBot 客户端
运行终端:PowerShell 5.1 及以上版本
基础条件:设备网络连接正常
账号登录是所有操作的前置步骤,CLI 支持账号密码登录、免密登录以及账号信息查询。
powershell
# 完整账号密码登录
shadowbot.shell-cli.exe auth login --username <用户名> --password <密码>
# 免密登录(使用本地已记忆的账号密码)
shadowbot.shell-cli.exe auth login --username <用户名>
powershell
# 查看当前已登录账号
shadowbot.shell-cli.exe auth current
# 列出本地所有已记忆的账号
shadowbot.shell-cli.exe auth account list
涵盖应用查询、详情查看、版本管理、发布、回收、分组、协作者等全套操作。
powershell
# 列出个人已开发应用(默认类型)
shadowbot.shell-cli.exe console app
# 列出已订阅的应用
shadowbot.shell-cli.exe console app --app-type subscribed
# 根据关键词搜索应用
shadowbot.shell-cli.exe console app --search <关键词>
# 分页查询应用(页码+单页条数)
shadowbot.shell-cli.exe console app --page 1 --page-size 20
powershell
# 查看指定应用详情
shadowbot.shell-cli.exe console app detail --app-id <应用ID>
# 查看应用版本历史记录
shadowbot.shell-cli.exe console app versions --app-id <应用ID>
powershell
# 发布指定应用
shadowbot.shell-cli.exe console app publish --app-id <应用ID>
# 将应用移入回收站
shadowbot.shell-cli.exe console app recycle --app-id <应用ID>
# 查看回收站中的应用列表
shadowbot.shell-cli.exe console app recycle list
powershell
# 查看全部应用分组
shadowbot.shell-cli.exe console app group list
# 新建应用分组
shadowbot.shell-cli.exe console app group create --name <分组名称>
# 将应用移动至指定分组
shadowbot.shell-cli.exe console app group move --app-id <应用ID> --group-id <分组ID>
# 将应用从当前分组中移除
shadowbot.shell-cli.exe console app group remove --app-id <应用ID>
powershell
# 应用协作者配置与管理
shadowbot.shell-cli.exe console app collaborator
负责应用任务启动、停止、状态查询、日志查看以及历史记录追溯。
powershell
# 运行指定应用,启动任务
shadowbot.shell-cli.exe console task run --app-id <应用ID>
powershell
# 停止正在运行的任务
shadowbot.shell-cli.exe console task stop --task-id <任务ID>
# 查询任务当前运行状态
shadowbot.shell-cli.exe console task status --task-id <任务ID>
# 查看任务执行日志(用于故障排查)
shadowbot.shell-cli.exe console task logs --task-id <任务ID>
powershell
# 分页查看所有任务执行历史
shadowbot.shell-cli.exe console task history --page 1 --page-size 20
触发器是实现自动化触发的核心,包含通用操作、文件、热键、邮件、计划五大类触发器。
适用于所有类型触发器,统一管理启停、查询、删除。
powershell
# 列出系统内全部触发器
shadowbot.shell-cli.exe console trigger list
# 查看单个触发器详情
shadowbot.shell-cli.exe console trigger get --id <触发器ID>
# 启用指定触发器
shadowbot.shell-cli.exe console trigger enable --id <触发器ID>
# 禁用指定触发器
shadowbot.shell-cli.exe console trigger disable --id <触发器ID>
# 删除指定触发器
shadowbot.shell-cli.exe console trigger delete --id <触发器ID>
powershell
# 新增文件触发器
shadowbot.shell-cli.exe console trigger file add
# 更新文件触发器配置
shadowbot.shell-cli.exe console trigger file update
# 列出所有文件触发器
shadowbot.shell-cli.exe console trigger file list
powershell
# 新增热键触发器
shadowbot.shell-cli.exe console trigger hotkey add
# 更新热键触发器配置
shadowbot.shell-cli.exe console trigger hotkey update
# 列出所有热键触发器
shadowbot.shell-cli.exe console trigger hotkey list
powershell
# 新增邮件触发器
shadowbot.shell-cli.exe console trigger email add
# 更新邮件触发器配置
shadowbot.shell-cli.exe console trigger email update
# 列出所有邮件触发器
shadowbot.shell-cli.exe console trigger email list
powershell
# 新增定时计划触发器
shadowbot.shell-cli.exe console trigger schedule add
# 更新定时计划触发器配置
shadowbot.shell-cli.exe console trigger schedule update
# 列出所有计划触发器
shadowbot.shell-cli.exe console trigger schedule list
用于查看消息、区分已读 / 未读状态,支持单条或批量标记已读。
powershell
# 查看全部消息(含已读、未读)
shadowbot.shell-cli.exe console message list --status all
# 仅查看未读消息
shadowbot.shell-cli.exe console message list --status unread
# 仅查看已读消息
shadowbot.shell-cli.exe console message list --status read
powershell
# 将单条消息标记为已读
shadowbot.shell-cli.exe console message read --id <消息UUID>
# 批量将所有消息标记为已读
shadowbot.shell-cli.exe console message read-all
支持主题切换、功能页面跳转、外部链接快速打开,适配个性化使用需求。
powershell
# 切换为亮色主题
shadowbot.shell-cli.exe console theme switch --target light
# 切换为暗色主题
shadowbot.shell-cli.exe console theme switch --target dark
# 恢复默认主题
shadowbot.shell-cli.exe console theme switch --target default
powershell
# 跳转至应用页面
shadowbot.shell-cli.exe console page switch --target app
# 跳转至触发器页面
shadowbot.shell-cli.exe console page switch --target trigger
# 跳转至市场页面
shadowbot.shell-cli.exe console page switch --target market
# 跳转至教程页面
shadowbot.shell-cli.exe console page switch --target tutorial
# 跳转至优秀案例页面
shadowbot.shell-cli.exe console page switch --target excellence
powershell
# 打开社区页面
shadowbot.shell-cli.exe console link open --target community
# 打开漫画页面
shadowbot.shell-cli.exe console link open --target comic
# 打开网页控制台
shadowbot.shell-cli.exe console link open --target web-console
# 打开成就页面
shadowbot.shell-cli.exe console link open --target achievement
# 打开开发者反馈页面
shadowbot.shell-cli.exe console link open --target dev-feedback
管理客户端各类插件扩展,支持状态查询、安装操作。
支持扩展类型:chrome、edge、device、screen-unlock、background-wakeup
powershell
# 查看所有扩展运行状态
shadowbot.shell-cli.exe console extension list
# 查看指定类型扩展状态
shadowbot.shell-cli.exe console extension get --type <类型>
powershell
# 安装指定类型扩展
shadowbot.shell-cli.exe console extension install --type <类型>
# 安装扩展并等待安装流程完成
shadowbot.shell-cli.exe console extension install --type <类型> --wait
面向开发者,实现应用创建、打开、保存、同步等开发流程。
powershell
# 创建新应用,创建完成后关闭 Studio
shadowbot.shell-cli.exe studio create --name <应用名称>
# 创建新应用并保持 Studio 窗口打开
shadowbot.shell-cli.exe studio open --name <应用名称>
# 在 Studio 中打开已有应用
shadowbot.shell-cli.exe studio open-app --app-id <应用ID>
powershell
# 获取 Studio 中当前打开的应用信息
shadowbot.shell-cli.exe studio current get
# 更新当前应用基础信息
shadowbot.shell-cli.exe studio current update-info
# 手动保存当前应用
shadowbot.shell-cli.exe studio current save
# 同步数据并关闭当前应用
shadowbot.shell-cli.exe studio current sync
包含运行模式切换、服务健康检测、版本查看等底层运维功能。
powershell
# 切换至控制台模式
shadowbot.shell-cli.exe mode switch --to console
# 切换至助手模式
shadowbot.shell-cli.exe mode switch --to assistant
# 强制切换模式(存在运行任务时也可切换)
shadowbot.shell-cli.exe mode switch --to console --force
powershell
# 检测 API 服务健康状态
shadowbot.shell-cli.exe system health
# 获取客户端完整运行时状态
shadowbot.shell-cli.exe system state
# 查看 CLI 工具版本号
shadowbot.shell-cli.exe system version
适用于日常使用:登录 → 查询应用 → 运行任务 → 查看状态 → 界面设置
powershell
# 1. 免密登录账号
shadowbot.shell-cli.exe auth login --username user@example.com
# 2. 确认当前登录账号
shadowbot.shell-cli.exe auth current
# 3. 搜索指定名称应用
shadowbot.shell-cli.exe console app --search "发票"
# 4. 运行目标应用
shadowbot.shell-cli.exe console task run --app-id 01234567-89ab-cdef-0123-456789abcdef
# 5. 查看任务运行状态
shadowbot.shell-cli.exe console task status --task-id 98765432-10fe-dcba-9876-543210fedcba
# 6. 切换为暗色主题
shadowbot.shell-cli.exe console theme switch --target dark
适用于定时执行的批量运维操作
powershell
# 检查系统健康状态
shadowbot.shell-cli.exe system health
# 获取系统运行状态
shadowbot.shell-cli.exe system state
# 查看所有未读消息
shadowbot.shell-cli.exe console message list --status unread
# 一键标记所有消息为已读
shadowbot.shell-cli.exe console message read-all
开发者标准流程:创建 → 打开 → 保存 → 发布
powershell
# 1. 创建新应用
shadowbot.shell-cli.exe studio create --name "自动发票处理"
# 2. 在 Studio 中打开应用
shadowbot.shell-cli.exe studio open-app --app-id <应用ID>
# 3. 保存编辑后的应用
shadowbot.shell-cli.exe studio current save
# 4. 正式发布应用
shadowbot.shell-cli.exe console app publish --app-id <应用ID>
找不到命令:检查命令拼写,使用 -h 查看对应命令帮助
登录失败:核对用户名与密码,优先使用免密登录重试
连接超时:检查 ShadowBot 客户端是否正常启动、网络是否通畅
权限不足:以管理员身份启动 PowerShell 后重新执行命令
出现异常时,按以下顺序逐项排查:
powershell
# 1. 查看 CLI 版本,确认工具完整性
shadowbot.shell-cli.exe system version
# 2. 检测后端 API 服务健康状态
shadowbot.shell-cli.exe system health
# 3. 查看客户端整体运行状态
shadowbot.shell-cli.exe system state
# 4. 验证账号登录状态与权限
shadowbot.shell-cli.exe auth current
应用 ID:应用唯一标识,格式为 UUID
任务 ID:运行任务的唯一标识,格式为 UUID
触发器 ID:触发器唯一标识,格式为 UUID
消息 UUID:单条消息的唯一标识,格式为 UUID
注意事项:
Beta版现已在企业版开启试用,个人版预计将在 V6.3 版本上线,敬请期待。
参考地址