跳到主要内容

CLI 命令

本页是 anyy 二进制的命令参考。它反映当前顶层 --help 输出和已实现的 command dispatch。 全局 flags 放在 command 前;command-specific flags 放在 command 后。

anyy [--profile NAME] [--profile-root PATH] [--role ROLE] COMMAND
anyy --version
anyy --resume SESSION_ID

常用工作流

目标命令
打开 TUIanyy
完成首次 setupanyy setup
配置 model/provideranyy setup model
启动 resident runtimeanyy gateway start
通过 gateway 发送一次 promptanyy chat "prompt"
检查本地健康状态anyy status,然后 anyy doctor
配置一个 channelanyy setup channels CHANNEL --write-config
验证一个 channelanyy channels doctor CHANNEL
预览 AutoDream 记忆整理anyy memory dream --dry-run
创建备份anyy backup create

本页列出已实现的 CLI command families。/sessions/branch/compress 等 runtime slash commands 见 Slash Commands

全局 Flags

Flag含义
--profile NAME按名称选择 profile。
--profile-root PATH选择包含 profiles 的 base directory。
--role ROLE为新 sessions 选择初始 Role。
--resume ID恢复一个现有 TUI session。
--home PATH默认 TUI entrypoint 使用的 Anyy home。
--socket PATH默认 TUI entrypoint 使用的 gateway socket。
--no-color禁用彩色输出。
备注

--home--socket--resume 只作为默认 TUI entrypoint 的 global flags 使用。对子命令, 请把它们放在 command 后,例如 anyy status --home PATH

顶层命令

命令用途
anyy启动交互式 TUI。需要时,TUI 会启动 embedded gateway。
anyy chat PROMPT通过 resident gateway 发送一次 prompt。
anyy status显示本地和 live gateway 状态。
anyy doctor运行本地诊断。
anyy dashboard启动或管理 dashboard sidecar。
anyy config渲染 resolved config summary。
anyy --version打印版本信息。

一次性 chat:

anyy chat [--home PATH] [--socket PATH] [--role ROLE] [--session ID] [--json] [--yes] PROMPT

chat 需要正在运行的 resident gateway;默认 TUI 可以为自己启动 embedded gateway。

Gateway 命令

anyy gateway start [--home PATH]
anyy gateway restart [--home PATH]
anyy gateway status [--home PATH]
anyy gateway stop [--home PATH]

Gateway 命令管理某个 home/profile 的 resident background service。start 会在支持且缺失时 安装 host service,然后等待 gateway 可达。restart 必要时也会安装。status 报告 service state、process version、command version、home 和 socket。

Setup 命令

anyy setup [--home PATH]
anyy setup model [--home PATH]
anyy setup model fallback [--home PATH]
anyy setup aux [--home PATH]
anyy setup aux CAP [--home PATH] [--probe]
anyy setup channels [--home PATH]
anyy setup channels CHANNEL [--home PATH] [--account-id ID] [--secret NAME=VALUE] [--set NAME=VALUE] [--write-config]
anyy setup channels weixin login [--home PATH] [--base-url URL] [--secret NAME]
anyy setup weixin [--home PATH] [--account-id ID] [--secret NAME=VALUE] [--set NAME=VALUE] [--write-config]
anyy setup weixin login [--home PATH] [--base-url URL] [--secret NAME]

使用 setup 运行完整交互向导,setup model 配置 providers 和 default model,setup aux 配置可选能力,setup channels 配置 messaging adapters。Channel setup 会写入 secrets,并在 带 --write-config 时写入匹配的 channels.<name> 配置块。

Profile 命令

anyy profile list [--json]
anyy profile get NAME [--json]
anyy profile create NAME [--display-name NAME] [--json]
anyy profile use NAME [--json]
anyy profile delete NAME --force [--purge-secrets] [--json]

Profiles 隔离 home directories。delete 需要 --force,会拒绝 active/default profile,并且 当 profile secrets 存在时需要 --purge-secrets

Role 命令

anyy role list [--home PATH] [--include-archived] [--json]
anyy role get [--home PATH] ROLE_ID [--json]
anyy role create [--home PATH] ROLE_ID [--display-name NAME] [--json]
anyy role update [--home PATH] ROLE_ID [--display-name NAME] [--soul-file PATH] [--json]
anyy role use [--home PATH] ROLE_ID [--json]
anyy role delete [--home PATH] ROLE_ID [--json]

Roles 是同一 profile 内的人设层。它们本身不会授予 tools、secrets 或 profile access。

Cron 命令

anyy cron list [--home PATH] [--include-disabled] [--role ROLE] [--workspace WORKSPACE] [--all-scopes] [--json]
anyy cron create [--home PATH] --name NAME --schedule SCHEDULE [--json]
anyy cron update [--home PATH] --id ID [--enable|--disable] [--schedule SCHEDULE] [--prompt TEXT] [--role ROLE] [--workspace WORKSPACE] [--all-scopes] [--json]
anyy cron delete [--home PATH] --id ID [--role ROLE] [--workspace WORKSPACE] [--all-scopes] [--json]

Cron 命令管理所选 profile 中的 scheduled prompts。

Channel 命令

anyy channels doctor CHANNEL [--home PATH] [--config PATH] [--json]
anyy channels reload [--home PATH] [--socket PATH] [--json]

使用 doctor 校验某个 channel 的 config、secret references、live-smoke readiness 和 webhook mode。运行中的 gateway 修改 channel config 后,使用 reload

Skills 命令

anyy skills list [--home PATH] [--json]
anyy skills view [--home PATH] [--json] NAME [FILE_PATH]
anyy skills install [--home PATH] [--name NAME] [--force] [--all] [--rewrite-profile PROFILE] [--now] [--json] SOURCE
anyy skills uninstall [--home PATH] [--now] [--json] NAME
anyy skills reload [--home PATH] [--socket PATH] [--json]

Skills 命令安装、检查、移除和 reload profile-local skills。--now 会请求正在运行的 gateway 立即 reload。

Memory 命令

anyy memory dream --dry-run [--home PATH] [--socket PATH] [--json]
anyy memory dream --execute --yes [--home PATH] [--socket PATH] [--json]

memory dream 通过 resident gateway 运行 AutoDream。--dry-run 只预览拟议的记忆整理结果, 不写入文件。--execute --yes 会先预览,再应用通过验证的变化;这些变化可能写入 USER.mdMEMORY.md

该命令需要正在运行的 gateway。gateway 使用非默认 socket 时传 --socket。需要原始 RPC 响应时使用 --json。CLI 当前只暴露 memory dreammemory.view 和 suggestions 管理 属于本地或 Dashboard RPC surface,不是 shell 子命令。

MCP 命令

anyy mcp add SERVER_ID [--home PATH] --transport stdio --command CMD [--env KEY=VALUE] [--no-discover] [--args ARG...]
anyy mcp add SERVER_ID [--home PATH] --url URL [--transport http] [--auth oauth|header|none] [--header KEY=VALUE] [--enable --include a,b]
anyy mcp configure SERVER_ID [--home PATH] [--socket PATH] [--include a,b] [--enable] [--activate-toolset]
anyy mcp login SERVER_ID [--home PATH] [--json]
anyy mcp remove SERVER_ID [--home PATH] [--force]
anyy mcp enable SERVER_ID [--home PATH]
anyy mcp disable SERVER_ID [--home PATH]
anyy mcp set SERVER_ID KEY VALUE [--home PATH]
anyy mcp unset SERVER_ID KEY [--home PATH]
anyy mcp status [--home PATH] [--socket PATH] [--json]
anyy mcp list [--home PATH] [--socket PATH] [--json]
anyy mcp show SERVER_ID [--home PATH] [--socket PATH] [--json]
anyy mcp probe SERVER_ID [--home PATH] [--socket PATH] [--json]
anyy mcp test SERVER_ID [--home PATH] [--socket PATH]
anyy mcp reload [SERVER_ID] [--home PATH] [--socket PATH] [--json]
anyy mcp logs [SERVER_ID] [--home PATH] [--socket PATH] [--json]
anyy mcp serve [--home PATH] [--socket PATH]

对于 mcp add,把 Anyy flags 放在 --args-- 之前;后续值会被当成 server arguments。

Browser 命令

anyy browser status [--home PATH] [--socket PATH] [--json]
anyy browser doctor [--home PATH] [--socket PATH] [--json]
anyy browser connect [--url URL] [--home PATH] [--socket PATH]
anyy browser disconnect [--home PATH] [--socket PATH]
anyy browser enable --url URL [--home PATH] [--socket PATH]
anyy browser disable [--home PATH] [--socket PATH]

Browser 命令配置和检查可选 browser tooling connection。

Computer Use 命令

anyy computer-use status [--home PATH] [--socket PATH] [--json]
anyy computer-use doctor [--home PATH] [--socket PATH] [--json]
anyy computer-use enable [--home PATH] [--socket PATH] [--command PATH] [--force]
anyy computer-use disable [--home PATH] [--socket PATH]

Computer-use 支持是可选的,并且限定在本地主机。只在能运行所配置 driver 的机器上启用。

Heartbeat 命令

anyy heartbeat status [--home PATH] [--json]

heartbeat status 读取 profile-local heartbeat record。当 statusdoctor 报告 heartbeat 缺失、过旧、disabled 或 degraded 时使用它。

Maintenance 命令

anyy backup create [--home PATH] [--output PATH] [--include-secrets] [--json]
anyy backup list [--home PATH] [--json]
anyy update [--home PATH] [--version VERSION] [--base-url URL]
anyy update --compact [--home PATH] [--version VERSION] [--base-url URL]
anyy update --check [--home PATH] [--version VERSION] [--base-url URL]
anyy maintenance compact-state [--home PATH] (--output PATH | --replace) [--temp-dir PATH] [--json]
anyy maintenance checkpoint-state [--home PATH] [--journal-size-limit-bytes BYTES] [--json]
anyy maintenance prune-inactive-sessions [--home PATH] [--raw-days DAYS] [--limit N] [--now RFC3339] [--execute] [--json]
anyy maintenance cache-token-estimates [--home PATH] [--limit N] [--execute] [--json]
anyy maintenance migrate-lifecycle [--home PATH] [--raw-days DAYS] [--now RFC3339] [--temp-dir PATH] --execute [--json]
anyy uninstall --keep-data --yes [--home PATH]
anyy uninstall --full --yes [--home PATH]

执行破坏性维护前先使用 backup 命令。uninstall --keep-data 移除代码和命令入口但保留数据; uninstall --full 同时移除目标数据。