CLI 完整参考(73 个末级命令)
版本基线:2026-12-01,核心源码提交 fa86a42292830d77277712ea30f7ecbd6d710c2d。具体部署版本及扩展能力以实例为准。
API · 59 项 · MCP · 1 个对外工具 · CLI · 73 个末级命令
统计口径:73 个末级命令(含 4 个隐藏命令)、14 个命令组和 1 个根入口,共 88 个注册节点。命令组不是独立末级命令;browser 透传入口另列。
1 执行模式与命令选择
flocks exec 适合脚本中的一次性 Agent 执行;flocks tui 用于交互界面;flocks start/stop/restart/status/logs 管理开放安装的本机服务。托管安装由其服务管理器管理:本地 exec、MCP serve、ACP、workflow run 及部分 session 执行命令会拒绝;服务管理命令同样不能接管另一套服务。托管安装可使用部署提供的服务入口;普通安装的 tui --host/--port 会启动本地服务,不代表通用远程连接模式。远程 ACP 可显式指定 --server URL。
flocks --version
flocks --help
flocks model list
flocks agent list
flocks exec "概括项目结构" -C /path/to/project --output-format json
flocks exec - --output-format stream-json < prompt.txt
flocks workflow list
flocks session list示例为 POSIX shell;Windows CMD/PowerShell 需调整引号、环境变量和 stdin 重定向语法。--help 可用于逐级查看参数,本文下表由当前实际命令注册树提取,隐藏命令也明确标识。
2 exec 输入输出与退出码
提示词为必填位置参数,- 表示从 stdin 读取。--session 与 --last 互斥。--model 使用 provider/model。--json-schema 读取本地 JSON Schema 并校验结构化结果,Schema 引用只允许本地 # 引用。--image 可重复指定;--output-last-message 只在成功时把最终文本写入文件。
| 输出方式 | stdout | stderr |
|---|---|---|
| text | 最终文本或会话 ID | 失败信息与诊断 |
| json | 单个结果对象 | 诊断 |
| stream-json | 逐行事件,最后输出结果对象(NDJSON) | 诊断 |
{
"type": "result",
"session_id": "ses_example",
"success": true,
"result": "示例文本",
"error": null,
"usage": {
"input_tokens": 100,
"output_tokens": 20,
"requests": 1,
"cost_by_currency": {}
}
}示例数值仅说明结构。启用并通过 JSON Schema 校验时,CLI 结果还包含 structured_output。正常 exec 成功退出 0;执行或最终文件写入失败退出 1;参数校验或托管限制通常退出 2。其他子命令可能另有退出语义,不能只凭“输出了 JSON”判断成功。
3 权限、沙箱与预算
权限模式:default、dontAsk、acceptEdits、plan、bypassPermissions。默认和 dontAsk 不会自动批准全部工具;allowlist 既批准匹配工具也缩小工具范围,denylist 优先。plan 用于只读行为。权限模式不能替代部署策略。沙箱选项为 off/on/read-only/workspace-write,其中 on 与 read-only 使用只读工作区挂载,workspace-write 允许写工作区。实际隔离依赖运行环境的 Docker 等条件。
--max-budget 是 USD 停止阈值,在调用之间检查;单次已发出的请求可能超过阈值,不是供应商侧硬扣费上限。--config dotted.key=value 只在本次执行生效;--strict-config 校验未知类型字段。MCP 每次调用独立累计预算,CLI 一次 exec 按本次执行累计。
4 完整命令索引
计数来自 Typer 注册树。flocks browser 还含一层透传解析器,未注册为 Typer 子命令,额外支持如下入口;它们不另外计入 88 个注册节点。
| 入口 | 参数 | 输出/作用 |
|---|---|---|
| flocks browser -c CODE | CODE:Python 字符串 | 预载 helpers 后执行;stdout 由代码中的 print 决定 |
| flocks browser --debug-clicks -c CODE | CODE | 开启点击调试后执行 |
| flocks browser --version | 无 | 输出版本 |
| flocks browser --doctor | 无 | 安装、daemon、浏览器状态诊断 |
| flocks browser --setup | 无 | 交互式连接现有浏览器 |
| flocks browser --reload | 无 | 停止 daemon,下一次调用重新启动 |
| flocks browser state save PATH | PATH;可选 --url URL | 保存状态,输出 JSON 结果 |
| flocks browser state load PATH | PATH;可选 --url URL、--no-reload | 加载状态,输出 JSON 结果 |
| flocks browser state show PATH | PATH | 输出状态摘要 JSON |
透传入口依据:browser/run.py。浏览器 Python helper 的全部方法属于浏览器运行时库,不是独立 Typer 命令。
| 命令/命令组 | 说明 | 可见性 |
|---|---|---|
| flocks | Flocks - AI-Native SecOps tool | 公开 |
| flocks exec | Run an agent to completion without entering a TUI or requesting input. | 公开 |
| flocks update | Check for and upgrade Flocks to the latest version. Downloads the latest Release source archive from GitHub, backs up the current version to ~/.flocks/version/, extracts and replaces source files, re-syncs dependencies, then restarts the service automatically. With --channel, an update channel an installed extension provides decides what gets installed. | 公开 |
| flocks doctor | 检查安装和升级有没有问题(服务没启动、依赖不全时也能用);修复按批确认后执行。 | 公开 |
| flocks browser | Direct browser control via the built-in CDP runtime | 公开 |
| flocks start | Start Flocks service in daemon mode. | 公开 |
| flocks stop | Stop Flocks service. | 公开 |
| flocks restart | Restart Flocks service. Agents must use flocks restart --server-only; bare restart stops the supervisor and terminates the running agent. | 公开 |
| flocks status | Show Flocks service status. | 公开 |
| flocks logs | Show Flocks service logs. | 公开 |
| flocks serve | Start the Flocks API server | 隐藏 |
| flocks service-daemon | Run the Flocks service supervisor daemon. | 隐藏 |
| flocks run | Run an interactive Flocks session in the terminal (no server required). | 隐藏 |
| flocks tui | Start Flocks with TUI interface This command starts the Flocks API server in the background and launches the TUI frontend to connect to it. | 公开 |
| flocks agent | Manage agents | 公开 |
| flocks agent list | List all available agents Shows agents with their mode and permission configuration. Use --all to include hidden agents (compaction, title, summary). | 公开 |
| flocks agent show | Show details of a specific agent | 公开 |
| flocks agent permissions | Check whether an agent declares a specific tool. | 公开 |
| flocks workflow | Discover and run workflows | 公开 |
| flocks workflow list | 公开 | |
| flocks workflow run | 公开 | |
| flocks device | Inspect devices | 公开 |
| flocks device list | 公开 | |
| flocks model | Inspect available models | 公开 |
| flocks model list | 公开 | |
| flocks plugin | List and install local Flocks plugins | 公开 |
| flocks plugin list | 公开 | |
| flocks plugin install | Copy local plugins without executing them or changing configuration. | 公开 |
| flocks session | Manage sessions | 公开 |
| flocks session list | List all sessions Shows sessions sorted by last updated time (newest first). Use --format json for machine-readable output. | 公开 |
| flocks session show | Show details of a specific session | 公开 |
| flocks session delete | Permanently delete a session and its persisted history. This operation cannot be restored. | 公开 |
| flocks session archive | Archive a session Archived sessions are hidden from normal listings but can be restored. | 公开 |
| flocks session restore | Restore an archived session | 公开 |
| flocks session new | Create a session; when a prompt is provided, run its first turn. | 公开 |
| flocks session resume | Run a turn in an existing session without entering a TUI. For full tool, schema, sandbox and budget controls use exec --session/--last. | 公开 |
| flocks mcp | Manage MCP (Model Context Protocol) servers | 公开 |
| flocks mcp list | List MCP servers and their status | 公开 |
| flocks mcp add | Add an MCP server Interactive mode if no options provided. | 公开 |
| flocks mcp auth | Authenticate with an OAuth-enabled MCP server | 公开 |
| flocks mcp logout | Remove OAuth credentials for an MCP server | 公开 |
| flocks mcp debug | Debug OAuth connection for an MCP server | 公开 |
| flocks mcp connect | Connect to an MCP server | 公开 |
| flocks mcp disconnect | Disconnect from an MCP server | 公开 |
| flocks mcp tools | List MCP tools | 公开 |
| flocks mcp refresh | Refresh MCP tools | 公开 |
| flocks mcp serve | Expose Flocks as an MCP server over stdin/stdout (no HTTP service needed). | 公开 |
| flocks export | Export session data | 公开 |
| flocks import | Import session data | 公开 |
| flocks stats | Show usage statistics | 公开 |
| flocks stats backfill | Backfill usage_records from historical assistant message metadata. | 公开 |
| flocks task | Task Center — manage queued and scheduled tasks | 公开 |
| flocks task dashboard | Show task center overview. | 公开 |
| flocks task list | List tasks. | 公开 |
| flocks task show | Show task details. | 公开 |
| flocks task create | Create a new task. | 公开 |
| flocks task queue | View or control the task queue. | 公开 |
| flocks task scheduled | List all scheduled tasks. | 公开 |
| flocks task cancel | Cancel a task. | 公开 |
| flocks task retry | Retry a failed task. | 公开 |
| flocks task rerun | Rerun a task (stop if running, requeue). | 公开 |
| flocks skills | Manage skills | 公开 |
| flocks skills list | List all discovered skills. | 公开 |
| flocks skills status | Check eligibility status for all skills (bin/env requirements). | 公开 |
| flocks skills find | Search installable skills from local, clawhub, skills.sh, SafeSkill, and GitHub. | 公开 |
| flocks skills install | Install a skill from an external source. | 公开 |
| flocks skills remove | Uninstall a user-managed skill. | 公开 |
| flocks skills install-deps | Install the tool dependencies declared by a skill. | 公开 |
| flocks admin | Admin account and security maintenance commands | 公开 |
| flocks admin list-users | List all local accounts. Useful for recovering a forgotten username. | 公开 |
| flocks admin generate-api-token | Generate and persist an API token for non-browser clients. | 公开 |
| flocks admin set-api-token | Write the provided API token to the local .secret.json store (used by remote CLI clients or server configuration). | 公开 |
| flocks admin reassign-orphan-sessions | Claim every session whose owner_user_id is empty for the given admin. CLI / background / inbound-channel workers create sessions without an auth context, so owner_user_id is left empty. While the system has only the bootstrap admin this is harmless, but as soon as a member account is added those sessions become invisible to it. Run this to backfill the owner. | 公开 |
| flocks admin generate-one-time-password | Generate a one-time admin password on this host (must be changed on first login). With no account yet, this creates the first administrator, for a machine nobody opens the setup page on. | 公开 |
| flocks admin migrate-workspace-to-user | 将历史单用户 workspace 目录迁移到 users/shared 双区布局。 | 公开 |
| flocks enterprise | 换装企业版(和网页「Flocks Pro」页走同一条路) | 公开 |
| flocks enterprise upgrade | 问 Console 要这台机器平台的企业版安装包(.run;Windows 上是 .exe,会弹管理员确认),下载、校验后运行:开源版停下,换成企业版。 | 公开 |
| flocks enterprise kept | 列出企业版每次降级回开源版时留下的数据(数据库、配置、密钥)和大小。只列,不删。 | 公开 |
| flocks acp | Start ACP (Agent Client Protocol) server | 隐藏 |
| flocks debug | Debug utilities for Flocks | 隐藏 |
| flocks debug info | Show debug information | 公开 |
| flocks debug config | Show current configuration | 公开 |
| flocks debug snapshot | Snapshot debugging utilities | 公开 |
| flocks debug snapshot track | Track current snapshot state Creates a Git tree object representing the current file state. | 公开 |
| flocks debug snapshot patch | Show changed files since a snapshot hash | 公开 |
| flocks debug snapshot diff | Show diff between snapshot and current state | 公开 |
| flocks debug snapshot restore | Restore files to a snapshot state WARNING: This will overwrite current files! | 公开 |
| flocks debug snapshot cleanup | Clean up old snapshots using git gc | 公开 |
5 逐命令参数
flocks
Flocks - AI-Native SecOps tool
可见性:公开。
实现:flocks/cli/main.py:262
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --version / -v | option | boolean | 否 | null | Show version and exit |
| --print-logs | option | boolean | 否 | false | Print logs to stderr |
| --log-level | option | text | 否 | "INFO" | Log level (DEBUG, INFO, WARN, ERROR) |
| --install-completion | option | boolean | 否 | null | Install completion for the current shell. |
| --show-completion | option | boolean | 否 | null | Show completion for the current shell, to copy it or customize the installation. |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks exec
Run an agent to completion without entering a TUI or requesting input.
可见性:公开。
实现:flocks/cli/commands/exec.py:75
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| prompt | argument | text | 是 | null | — |
| -C / --cd | option | directory | 否 | "." | — |
| -m / --model | option | text | 否 | null | provider/model |
| --agent | option | text | 否 | null | — |
| --session | option | text | 否 | null | Resume a session in this worktree |
| --last | option | boolean | 否 | false | Resume most recently updated session in this worktree |
| --output-format | option | choice ["text", "json", "stream-json"] | 否 | "text" | — |
| --json-schema | option | file | 否 | null | — |
| -o / --output-last-message | option | path | 否 | null | — |
| --permission-mode | option | choice ["default", "acceptEdits", "bypassPermissions", "plan", "dontAsk"] | 否 | "default" | default/dontAsk: reads only unless allowlisted; acceptEdits also allows edits; plan: reads only |
| --allowed-tools | option | text | 否 | [] | Tool-name globs, comma separated or repeated; narrows and approves tools 可重复。 |
| --disallowed-tools | option | text | 否 | [] | Tool-name globs; denial takes precedence 可重复。 |
| --sandbox | option | choice ["off", "on", "read-only", "workspace-write"] | 否 | null | Docker isolation; on/read-only mounts workspace read-only; workspace-write allows writes |
| -c / --config | option | text | 否 | [] | Runtime dotted.key=value override (JSON value or string) 可重复。 |
| --strict-config | option | boolean | 否 | false | Reject unknown typed configuration fields |
| -i / --image | option | file | 否 | [] | 可重复。 |
| --max-budget | option | float | 否 | null | USD stop threshold checked between calls; one in-flight request can exceed it |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks update
Check for and upgrade Flocks to the latest version.
Downloads the latest Release source archive from GitHub, backs up the current version to ~/.flocks/version/, extracts and replaces source files, re-syncs dependencies, then restarts the service automatically. With --channel, an update channel an installed extension provides decides what gets installed.
可见性:公开。
实现:flocks/cli/commands/update.py:17
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --check | option | boolean | 否 | false | 仅检查是否有新版本,不执行升级(与 --channel 连用时只显示该通道将安装什么,不安装) |
| --yes / -y | option | boolean | 否 | false | 跳过确认直接升级 |
| --force / -f | option | boolean | 否 | false | 即使已是最新版本也强制重新安装 |
| --region | option | text | 否 | null | 升级镜像区域。设置为 cn 时优先使用中国大陆镜像源。 |
| --channel | option | text | 否 | null | 改用已安装扩展提供的更新通道(不加就是本项目自己的发布) |
| --no-restart | option | boolean | 否 | false | 与 --channel 连用:只安装不替换源码的部分,不自动重启服务(之后自行执行 flocks restart --server-only) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks doctor
检查安装和升级有没有问题(服务没启动、依赖不全时也能用);修复按批确认后执行。
可见性:公开。
实现:flocks/cli/commands/doctor.py:15
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --check | option | boolean | 否 | false | 只检查并列出修复计划,不执行任何修复 |
| --yes / -y | option | boolean | 否 | false | 所有批次都同意,不再逐批确认(给脚本用) |
| --verbose / -v | option | boolean | 否 | false | 每一批要做的操作全部列出来 |
| --json | option | boolean | 否 | false | 用 JSON 输出检查结果和修复计划(只检查) |
| --ai | option | boolean | 否 | false | 规则查完后让模型接着查(用配好的默认模型),改动同样按批确认 |
| --problem | option | text | 否 | "" | 遇到的现象,给模型看(和 --ai 一起用) |
| --no-ai | option | boolean | 否 | false | 规则修不了时也不问要不要让模型接着查 |
| --only | option | text | 否 | "" | 隐藏兼容参数。 |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks browser
Direct browser control via the built-in CDP runtime
可见性:公开。
实现:flocks/cli/commands/browser.py:11
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks start
Start Flocks service in daemon mode.
可见性:公开。
实现:flocks/cli/main.py:418
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --no-browser | option | boolean | 否 | false | Do not open WebUI in a browser |
| --skip-webui-build | option | boolean | 否 | false | Skip WebUI static asset build before starting Flocks service |
| --host / -h | option | text | 否 | null | Public service host (default 0.0.0.0, all interfaces; 127.0.0.1 keeps it on this machine) |
| --port / -p | option | integer range | 否 | null | Public service port |
| --server-host | option | text | 否 | null | Backend server host |
| --server-port | option | integer range | 否 | null | Backend server port |
| --webui-host | option | text | 否 | null | WebUI host |
| --webui-port | option | integer range | 否 | null | WebUI port |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks stop
Stop Flocks service.
可见性:公开。
实现:flocks/cli/main.py:453
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks restart
Restart Flocks service. Agents must use flocks restart --server-only; bare restart stops the supervisor and terminates the running agent.
可见性:公开。
实现:flocks/cli/main.py:465
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --server-only | option | boolean | 否 | false | Restart only the backend server without stopping the supervisor daemon |
| --no-browser | option | boolean | 否 | false | Do not open WebUI in a browser |
| --skip-webui-build | option | boolean | 否 | false | Skip WebUI static asset build before starting Flocks service |
| --host / -h | option | text | 否 | null | Public service host (default: where the running service listens, else 0.0.0.0) |
| --port / -p | option | integer range | 否 | null | Public service port |
| --server-host | option | text | 否 | null | Backend server host |
| --server-port | option | integer range | 否 | null | Backend server port |
| --webui-host | option | text | 否 | null | WebUI host |
| --webui-port | option | integer range | 否 | null | WebUI port |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks status
Show Flocks service status.
可见性:公开。
实现:flocks/cli/main.py:511
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks logs
Show Flocks service logs.
可见性:公开。
实现:flocks/cli/main.py:523
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --backend | option | boolean | 否 | false | Only show service logs |
| --webui | option | boolean | 否 | false | Only show service logs |
| --follow / --no-follow | option | boolean | 否 | true | Follow logs in real time |
| --lines / -n | option | integer range | 否 | 50 | Number of recent lines to show |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks serve
Start the Flocks API server
可见性:隐藏;可调用不等于推荐外部集成。
实现:flocks/cli/main.py:557
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --host / -h | option | text | 否 | "127.0.0.1" | Server host |
| --port / -p | option | integer | 否 | 8000 | Server port |
| --reload | option | boolean | 否 | false | Auto-reload on code changes |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks service-daemon
Run the Flocks service supervisor daemon.
可见性:隐藏;可调用不等于推荐外部集成。
实现:flocks/cli/main.py:607
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --server-host | option | text | 否 | "0.0.0.0" | Backend server host |
| --server-port | option | integer | 否 | 5173 | Public service port |
| --webui-host | option | text | 否 | "0.0.0.0" | WebUI host |
| --webui-port | option | integer | 否 | 5173 | WebUI port |
| --legacy-server-host | option | text | 否 | null | Legacy backend host |
| --legacy-server-port | option | integer | 否 | 8000 | Legacy backend port |
| --server-port-migration-hint | option | boolean | 否 | false | Print server-port migration hint in parent CLI |
| --skip-webui-build | option | boolean | 否 | false | Skip WebUI static asset build |
| --runtime-root-id | option | text | 否 | null | Digest of the runtime root this daemon serves; only read back from the process list |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks run
Run an interactive Flocks session in the terminal (no server required).
可见性:隐藏;可调用不等于推荐外部集成。
实现:flocks/cli/main.py:692
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| message | argument | text | 否 | null | — |
| --directory / -d | option | path | 否 | null | Project directory |
| --model / -m | option | text | 否 | null | Model ID (provider/model) |
| --agent / -a | option | text | 否 | null | Agent name |
| --session / -s | option | text | 否 | null | Session ID to continue |
| --continue / -c | option | boolean | 否 | false | Continue the most recent session |
| --auto-confirm / -y | option | boolean | 否 | false | Auto-confirm permission requests |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks tui
Start Flocks with TUI interface
This command starts the Flocks API server in the background and launches the TUI frontend to connect to it.
可见性:公开。
实现:flocks/cli/main.py:723
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --directory / -d | option | path | 否 | null | Project directory |
| --host | option | text | 否 | "127.0.0.1" | Server host |
| --port / -p | option | integer | 否 | 8000 | Server port |
| --session / -s | option | text | 否 | null | Session ID to continue |
| --auto-approve / --no-auto-approve | option | boolean | 否 | true | Auto-approve all tool permissions without confirmation (default: True) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks agent
Manage agents
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks agent list
List all available agents
Shows agents with their mode and permission configuration. Use --all to include hidden agents (compaction, title, summary).
可见性:公开。
实现:flocks/cli/commands/agent.py:83
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --format | option | text | 否 | "table" | Output format: table, json, or tree |
| -a / --all | option | boolean | 否 | false | Include hidden agents |
| -m / --mode | option | text | 否 | null | Filter by mode: primary, subagent, or all |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks agent show
Show details of a specific agent
可见性:公开。
实现:flocks/cli/commands/agent.py:194
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks agent permissions
Check whether an agent declares a specific tool.
可见性:公开。
实现:flocks/cli/commands/agent.py:263
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| tool | argument | text | 是 | null | — |
| -p / --pattern | option | text | 否 | null | Optional pattern for path-based rules |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks workflow
Discover and run workflows
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks workflow list
可见性:公开。
实现:flocks/cli/commands/workflow.py:14
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| -C / --cd | option | directory | 否 | "." | — |
| --format | option | text | 否 | "table" | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks workflow run
可见性:公开。
实现:flocks/cli/commands/workflow.py:29
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| workflow | argument | text | 是 | null | — |
| --inputs | option | text | 否 | "{}" | JSON object of workflow inputs |
| -C / --cd | option | directory | 否 | "." | — |
| --timeout | option | float range | 否 | 300.0 | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks device
Inspect devices
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks device list
可见性:公开。
实现:flocks/cli/commands/device.py:9
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --group | option | text | 否 | null | — |
| --format | option | text | 否 | "table" | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks model
Inspect available models
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks model list
可见性:公开。
实现:flocks/cli/commands/model.py:9
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --provider | option | text | 否 | null | — |
| --format | option | text | 否 | "table" | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks plugin
List and install local Flocks plugins
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks plugin list
可见性:公开。
实现:flocks/cli/commands/plugin.py:37
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --root | option | path | 否 | null | Plugin root (default: user plugin directory) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks plugin install
Copy local plugins without executing them or changing configuration.
可见性:公开。
实现:flocks/cli/commands/plugin.py:97
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| source | argument | path | 是 | null | — |
| --kind | option | choice ["agents", "tools", "hooks", "tasks"] | 是 | null | Destination extension point |
| --root | option | path | 否 | null | Explicit plugin root; useful for isolated installations |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session
Manage sessions
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session list
List all sessions
Shows sessions sorted by last updated time (newest first). Use --format json for machine-readable output.
可见性:公开。
实现:flocks/cli/commands/session.py:55
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| -n / --max-count | option | integer range | 否 | null | Limit to N most recent sessions |
| --format | option | text | 否 | "table" | Output format: table or json |
| -p / --project | option | text | 否 | null | Filter by project ID (empty for current project) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session show
Show details of a specific session
可见性:公开。
实现:flocks/cli/commands/session.py:167
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| session_id | argument | text | 是 | null | — |
| -p / --project | option | text | 否 | null | Project ID (uses current project if not specified) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session delete
Permanently delete a session and its persisted history.
This operation cannot be restored.
可见性:公开。
实现:flocks/cli/commands/session.py:228
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| session_id | argument | text | 是 | null | — |
| -p / --project | option | text | 否 | null | Project ID (uses current project if not specified) |
| -f / --force | option | boolean | 否 | false | Skip permanent deletion confirmation |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session archive
Archive a session
Archived sessions are hidden from normal listings but can be restored.
可见性:公开。
实现:flocks/cli/commands/session.py:279
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| session_id | argument | text | 是 | null | — |
| -p / --project | option | text | 否 | null | Project ID (uses current project if not specified) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session restore
Restore an archived session
可见性:公开。
实现:flocks/cli/commands/session.py:315
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| session_id | argument | text | 是 | null | — |
| -p / --project | option | text | 否 | null | Project ID (uses current project if not specified) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session new
Create a session; when a prompt is provided, run its first turn.
可见性:公开。
实现:flocks/cli/commands/session.py:359
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| prompt | argument | text | 否 | null | — |
| -C / --cd | option | text | 否 | "." | — |
| -m / --model | option | text | 否 | null | — |
| --agent | option | text | 否 | null | — |
| --output-format | option | text | 否 | "text" | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks session resume
Run a turn in an existing session without entering a TUI.
For full tool, schema, sandbox and budget controls use exec --session/--last.
可见性:公开。
实现:flocks/cli/commands/session.py:371
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| session_id | argument | text | 否 | null | — |
| --last | option | boolean | 否 | false | — |
| -p / --prompt | option | text | 否 | null | New prompt, or - for stdin; omitted continues history |
| -C / --cd | option | text | 否 | "." | — |
| -m / --model | option | text | 否 | null | — |
| --agent | option | text | 否 | null | — |
| --output-format | option | text | 否 | "text" | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp
Manage MCP (Model Context Protocol) servers
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp list
List MCP servers and their status
可见性:公开。
实现:flocks/cli/commands/mcp.py:93
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --format | option | text | 否 | "table" | Output format: table or json |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp add
Add an MCP server
Interactive mode if no options provided.
可见性:公开。
实现:flocks/cli/commands/mcp.py:197
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| -n / --name | option | text | 否 | null | Server name |
| -t / --type | option | text | 否 | null | Server type: local or remote |
| --url | option | text | 否 | null | Server URL (for remote servers) |
| -c / --command | option | text | 否 | null | Command to run (for local servers); shell-style quoting is supported for paths with spaces |
| --oauth / --no-oauth | option | boolean | 否 | null | Remote servers: enable/disable OAuth without prompting (omit to be asked interactively) |
| -g / --global | option | boolean | 否 | false | Kept for compatibility: MCP servers are always stored in the user-level config 隐藏兼容参数。 |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp auth
Authenticate with an OAuth-enabled MCP server
可见性:公开。
实现:flocks/cli/commands/mcp.py:362
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 否 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp logout
Remove OAuth credentials for an MCP server
可见性:公开。
实现:flocks/cli/commands/mcp.py:467
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 否 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp debug
Debug OAuth connection for an MCP server
可见性:公开。
实现:flocks/cli/commands/mcp.py:528
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp connect
Connect to an MCP server
可见性:公开。
实现:flocks/cli/commands/mcp.py:604
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp disconnect
Disconnect from an MCP server
可见性:公开。
实现:flocks/cli/commands/mcp.py:647
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp tools
List MCP tools
可见性:公开。
实现:flocks/cli/commands/mcp.py:669
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| server | argument | text | 否 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp refresh
Refresh MCP tools
可见性:公开。
实现:flocks/cli/commands/mcp.py:724
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| server | argument | text | 否 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks mcp serve
Expose Flocks as an MCP server over stdin/stdout (no HTTP service needed).
可见性:公开。
实现:flocks/cli/commands/mcp.py:770
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| -C / --cd | option | text | 否 | "." | — |
| --permission-mode | option | text | 否 | "default" | — |
| --allowed-tools | option | text | 否 | [] | 可重复。 |
| --disallowed-tools | option | text | 否 | [] | 可重复。 |
| --sandbox | option | text | 否 | null | — |
| --max-budget | option | float | 否 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks export
Export session data
可见性:公开。
实现:flocks/cli/commands/export.py:33
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| session_id | argument | text | 否 | null | — |
| -o / --output | option | text | 否 | null | Output file path (defaults to stdout) |
| --pretty / --no-pretty | option | boolean | 否 | true | Pretty print JSON output |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks import
Import session data
可见性:公开。
实现:flocks/cli/commands/import_.py:192
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| file_or_url | argument | text | 是 | null | — |
| -p / --project | option | text | 否 | null | Project ID (uses current project if not specified) |
| -f / --force | option | boolean | 否 | false | Overwrite an existing session with the same ID instead of refusing |
| --new-id | option | boolean | 否 | false | Import as a new session with a freshly generated ID (never collides) |
| --keep-directory | option | boolean | 否 | false | Keep the exporting machine's session directory instead of relocating it to the current project directory |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks stats
Show usage statistics
可见性:公开。
实现:flocks/cli/commands/stats.py:377
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| -d / --days | option | integer range | 否 | null | Show stats for the last N days (default: all time). Use 0 for today. |
| -t / --tools | option | integer | 否 | 5 | Number of tools to show (default: top 5; use 0 for all) |
| -m / --models | option | integer | 否 | null | Show model statistics. Pass a number to limit, or 0 for all. |
| -p / --project | option | text | 否 | null | Filter by project (empty string for current project) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks stats backfill
Backfill usage_records from historical assistant message metadata.
可见性:公开。
实现:flocks/cli/commands/stats.py:426
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| -d / --days | option | integer range | 否 | null | Backfill usage for the last N days (default: all time). Use 0 for today. |
| -p / --project | option | text | 否 | null | Filter by project (empty string for current project) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task
Task Center — manage queued and scheduled tasks
可见性:公开。
实现:flocks/cli/commands/task.py:99
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task dashboard
Show task center overview.
可见性:公开。
实现:flocks/cli/commands/task.py:106
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task list
List tasks.
可见性:公开。
实现:flocks/cli/commands/task.py:144
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --status / -s | option | text | 否 | null | Filter by status |
| --type / -t | option | text | 否 | null | Filter by type (queued/scheduled/stream) |
| -n / --limit | option | integer range | 否 | 20 | Max results |
| --format | option | text | 否 | "table" | Output format: table |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task show
Show task details.
可见性:公开。
实现:flocks/cli/commands/task.py:222
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| task_id | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task create
Create a new task.
可见性:公开。
实现:flocks/cli/commands/task.py:303
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| title | argument | text | 是 | null | — |
| --desc / -d | option | text | 否 | "" | Task description |
| --type / -t | option | text | 否 | "queued" | queued |
| --priority / -p | option | text | 否 | "normal" | urgent |
| --mode / -m | option | text | 否 | "agent" | agent |
| --agent / -a | option | text | 否 | "rex" | Agent name (for agent mode) |
| --workflow / -w | option | text | 否 | null | Workflow ID (for workflow mode) |
| --skill | option | text | 否 | null | Skills to inject 可重复。 |
| --cron | option | text | 否 | null | Cron expression (for scheduled type) |
| --prompt | option | text | 否 | null | User prompt |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task queue
View or control the task queue.
可见性:公开。
实现:flocks/cli/commands/task.py:374
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --pause | option | boolean | 否 | false | Pause queue |
| --resume | option | boolean | 否 | false | Resume queue |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task scheduled
List all scheduled tasks.
可见性:公开。
实现:flocks/cli/commands/task.py:474
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task cancel
Cancel a task.
可见性:公开。
实现:flocks/cli/commands/task.py:516
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| task_id | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task retry
Retry a failed task.
可见性:公开。
实现:flocks/cli/commands/task.py:535
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| task_id | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks task rerun
Rerun a task (stop if running, requeue).
可见性:公开。
实现:flocks/cli/commands/task.py:562
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| task_id | argument | text | 是 | null | — |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills
Manage skills
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills list
List all discovered skills.
可见性:公开。
实现:flocks/cli/commands/skill.py:71
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --status / -s | option | boolean | 否 | false | Include eligibility status check |
| --json | option | boolean | 否 | false | Output as JSON |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills status
Check eligibility status for all skills (bin/env requirements).
可见性:公开。
实现:flocks/cli/commands/skill.py:124
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --json | option | boolean | 否 | false | Output as JSON |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills find
Search installable skills from local, clawhub, skills.sh, SafeSkill, and GitHub.
可见性:公开。
实现:flocks/cli/commands/skill.py:188
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| query | argument | text | 是 | null | — |
| --json | option | boolean | 否 | false | Output as JSON |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills install
Install a skill from an external source.
可见性:公开。
实现:flocks/cli/commands/skill.py:502
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| source | argument | text | 是 | null | — |
| --skill / -s | option | text | 否 | null | Skill subdirectory name within the source repo (e.g. --skill code-review) |
| --scope | option | text | 否 | "global" | 'global' (default) or 'project' |
| --yes / -y | option | boolean | 否 | false | Skip confirmation prompts from downstream CLIs (e.g. skills add) for non-interactive installs. |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills remove
Uninstall a user-managed skill.
可见性:公开。
实现:flocks/cli/commands/skill.py:578
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| --yes / -y | option | boolean | 否 | false | Skip confirmation prompt |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks skills install-deps
Install the tool dependencies declared by a skill.
可见性:公开。
实现:flocks/cli/commands/skill.py:604
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| name | argument | text | 是 | null | — |
| --id | option | text | 否 | null | Install only the spec with this id |
| --timeout | option | integer | 否 | 300 | Timeout in seconds (default 300) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin
Admin account and security maintenance commands
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin list-users
List all local accounts. Useful for recovering a forgotten username.
可见性:公开。
实现:flocks/cli/commands/admin.py:25
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin generate-api-token
Generate and persist an API token for non-browser clients.
可见性:公开。
实现:flocks/cli/commands/admin.py:63
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --bytes / -b | option | integer range | 否 | 32 | Random byte length (32 recommended) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin set-api-token
Write the provided API token to the local .secret.json store (used by remote CLI clients or server configuration).
可见性:公开。
实现:flocks/cli/commands/admin.py:81
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --token / -t | option | text | 是 | null | API token value to store |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin reassign-orphan-sessions
Claim every session whose owner_user_id is empty for the given admin.
CLI / background / inbound-channel workers create sessions without an auth context, so owner_user_id is left empty. While the system has only the bootstrap admin this is harmless, but as soon as a member account is added those sessions become invisible to it. Run this to backfill the owner.
可见性:公开。
实现:flocks/cli/commands/admin.py:109
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --username / -u | option | text | 否 | "admin" | Target admin username to claim orphan sessions |
| --dry-run | option | boolean | 否 | false | Only report counts; do not write changes |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin generate-one-time-password
Generate a one-time admin password on this host (must be changed on first login). With no account yet, this creates the first administrator, for a machine nobody opens the setup page on.
可见性:公开。
实现:flocks/cli/commands/admin.py:171
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --username / -u | option | text | 否 | "admin" | Admin username |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks admin migrate-workspace-to-user
将历史单用户 workspace 目录迁移到 users/shared 双区布局。
可见性:公开。
实现:flocks/cli/commands/admin.py:202
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --admin-user-id | option | text | 是 | null | 目标管理员 user_id |
| --dry-run | option | boolean | 否 | false | 仅预览,不实际迁移 |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks enterprise
换装企业版(和网页「Flocks Pro」页走同一条路)
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks enterprise upgrade
问 Console 要这台机器平台的企业版安装包(.run;Windows 上是 .exe,会弹管理员确认),下载、校验后运行:开源版停下,换成企业版。
可见性:公开。
实现:flocks/cli/commands/enterprise.py:31
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --check | option | boolean | 否 | false | 只看 Console 给这台机器的安装包,不下载 |
| --yes / -y | option | boolean | 否 | false | 不再确认 |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks enterprise kept
列出企业版每次降级回开源版时留下的数据(数据库、配置、密钥)和大小。只列,不删。
可见性:公开。
实现:flocks/cli/commands/enterprise.py:60
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks acp
Start ACP (Agent Client Protocol) server
可见性:隐藏;可调用不等于推荐外部集成。
实现:flocks/cli/commands/acp.py:317
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --cwd | option | text | 否 | null | Working directory |
| --host / -h | option | text | 否 | "127.0.0.1" | Server host |
| --port / -p | option | integer | 否 | 0 | Server port (0 for auto) |
| --server | option | text | 否 | null | URL of a running Flocks service to drive (e.g. http://127.0.0.1:8000); nothing is started here. Credentials: FLOCKS_SESSION (a login session), FLOCKS_USERNAME and FLOCKS_PASSWORD, or FLOCKS_API_TOKEN. |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug
Debug utilities for Flocks
可见性:隐藏;可调用不等于推荐外部集成。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug info
Show debug information
可见性:公开。
实现:flocks/cli/commands/debug.py:37
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug config
Show current configuration
可见性:公开。
实现:flocks/cli/commands/debug.py:50
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug snapshot
Snapshot debugging utilities
可见性:公开。
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug snapshot track
Track current snapshot state
Creates a Git tree object representing the current file state.
可见性:公开。
实现:flocks/cli/commands/debug.py:63
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --directory / -d | option | path | 否 | null | Project directory |
| --project-id / -p | option | text | 否 | null | Project ID (defaults to directory name) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug snapshot patch
Show changed files since a snapshot hash
可见性:公开。
实现:flocks/cli/commands/debug.py:101
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| hash | argument | text | 是 | null | — |
| --directory / -d | option | path | 否 | null | Project directory |
| --project-id / -p | option | text | 否 | null | Project ID (defaults to directory name) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug snapshot diff
Show diff between snapshot and current state
可见性:公开。
实现:flocks/cli/commands/debug.py:138
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| hash | argument | text | 是 | null | — |
| --directory / -d | option | path | 否 | null | Project directory |
| --project-id / -p | option | text | 否 | null | Project ID (defaults to directory name) |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug snapshot restore
Restore files to a snapshot state
WARNING: This will overwrite current files!
可见性:公开。
实现:flocks/cli/commands/debug.py:175
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| hash | argument | text | 是 | null | — |
| --directory / -d | option | path | 否 | null | Project directory |
| --project-id / -p | option | text | 否 | null | Project ID (defaults to directory name) |
| --force / -f | option | boolean | 否 | false | Force restore without confirmation |
| --help | option | boolean | 否 | false | Show this message and exit. |
flocks debug snapshot cleanup
Clean up old snapshots using git gc
可见性:公开。
实现:flocks/cli/commands/debug.py:226
| 参数/选项 | 位置 | 类型/可选值 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| --directory / -d | option | path | 否 | null | Project directory |
| --project-id / -p | option | text | 否 | null | Project ID (defaults to directory name) |
| --help | option | boolean | 否 | false | Show this message and exit. |