CLI Reference
Complete command reference for the Multiflow CLI and agent daemon.
The multiflow CLI connects your local machine to Multiflow. It handles authentication, workspace management, issue tracking, and runs the agent daemon that executes AI tasks locally.
Authentication
Browser Login
multiflow loginOpens your browser for OAuth authentication, creates a 90-day personal access token, and auto-configures your workspaces.
Token Login
multiflow login --token <mul_...>Authenticate using a personal access token directly. Useful for headless environments. Pass --token= with an empty value to be prompted interactively (so the token never lands in shell history).
Check Status
multiflow auth statusShows your current server, user, and token validity.
Logout
multiflow auth logoutRemoves the stored authentication token.
Agent Daemon
The daemon is the local agent runtime. It detects available AI CLIs on your machine, registers them with the Multiflow server, and executes tasks when agents are assigned work.
Start
multiflow daemon startBy default, the daemon runs in the background and logs to ~/.multica/daemon.log.
To run in the foreground (useful for debugging):
multiflow daemon start --foregroundStop
multiflow daemon stopStatus
multiflow daemon status
multiflow daemon status --output jsonShows PID, uptime, detected agents, and watched workspaces.
Logs
multiflow daemon logs # Last 50 lines
multiflow daemon logs -f # Follow (tail -f)
multiflow daemon logs -n 100 # Last 100 linesSupported Agents
The daemon auto-detects these AI CLIs on your PATH:
| CLI | Command | Description |
|---|---|---|
| Claude Code | claude | Anthropic's coding agent |
| Antigravity | agy | Google's coding agent |
| CodeBuddy | codebuddy | Tencent's Claude Code-compatible coding agent |
| Codex | codex | OpenAI's coding agent |
| Copilot | copilot | GitHub's coding agent |
| Cursor Agent | cursor-agent | Cursor coding agent |
| OpenCode | opencode | Open-source coding agent |
| OpenClaw | openclaw | Open-source coding agent |
| Hermes | hermes | Nous Research coding agent |
| Kimi | kimi | Moonshot coding agent |
| Kiro CLI | kiro-cli | Kiro ACP coding agent |
| Pi | pi | Inflection coding agent |
| Qoder | qodercli | Alibaba coding agent |
| Trae CLI | traecli | ByteDance coding agent |
You need at least one installed. The daemon registers each detected CLI as an available runtime.
How It Works
- On start, the daemon detects installed agent CLIs and registers a runtime for each agent in each watched workspace
- It polls the server at a configurable interval (default: 3s) for claimed tasks
- When a task arrives, it creates an isolated workspace directory, spawns the agent CLI, and streams results back
- Heartbeats are sent periodically (default: 15s) so the server knows the daemon is alive
- On shutdown, all runtimes are deregistered
Configuration
Daemon behavior is configured via flags or environment variables:
| Setting | Flag | Env Variable | Default |
|---|---|---|---|
| Poll interval | --poll-interval | MULTICA_DAEMON_POLL_INTERVAL | 3s |
| Heartbeat interval | --heartbeat-interval | MULTICA_DAEMON_HEARTBEAT_INTERVAL | 15s |
| Agent timeout | --agent-timeout | MULTICA_AGENT_TIMEOUT | 0(不限制,由看门狗兜底) |
| Codex app-server handshake timeout | --codex-handshake-timeout | MULTICA_CODEX_HANDSHAKE_TIMEOUT | 30s |
| Max concurrent tasks | --max-concurrent-tasks | MULTICA_DAEMON_MAX_CONCURRENT_TASKS | 20 |
| Daemon ID | --daemon-id | MULTICA_DAEMON_ID | hostname |
| Device name | --device-name | MULTICA_DAEMON_DEVICE_NAME | hostname |
| Runtime name | --runtime-name | MULTICA_AGENT_RUNTIME_NAME | Local Agent |
| Workspaces root | — | MULTICA_WORKSPACES_ROOT | ~/multica_workspaces |
Agent-specific overrides:
| Variable | Description |
|---|---|
MULTICA_CLAUDE_PATH | Custom path to the claude binary |
MULTICA_CLAUDE_MODEL | Override the Claude model used |
MULTICA_CODEX_PATH | Custom path to the codex binary |
MULTICA_CODEX_MODEL | Override the Codex model used |
MULTICA_CODEBUDDY_PATH | Custom path to the codebuddy binary |
MULTICA_CODEBUDDY_MODEL | Override the CodeBuddy model used |
MULTICA_ANTIGRAVITY_PATH | Custom path to the agy binary |
MULTICA_ANTIGRAVITY_MODEL | Override the Antigravity model used |
MULTICA_OPENCODE_PATH | Custom path to the opencode binary |
MULTICA_OPENCODE_MODEL | Override the OpenCode model used |
MULTICA_OPENCLAW_PATH | Custom path to the openclaw binary |
MULTICA_OPENCLAW_MODEL | Override the OpenClaw model used |
MULTICA_HERMES_PATH | Custom path to the hermes binary |
MULTICA_HERMES_MODEL | Override the Hermes model used |
MULTICA_GEMINI_PATH | Custom path to the gemini binary |
MULTICA_GEMINI_MODEL | Override the Gemini model used |
MULTICA_PI_PATH | Custom path to the pi binary |
MULTICA_PI_MODEL | Override the Pi model used |
MULTICA_CURSOR_PATH | Custom path to the cursor-agent binary |
MULTICA_CURSOR_MODEL | Override the Cursor model used |
MULTICA_KIMI_PATH | Custom path to the kimi binary |
MULTICA_KIMI_MODEL | Override the Kimi model used |
MULTICA_KIRO_PATH | Custom path to the kiro-cli binary |
MULTICA_KIRO_MODEL | Override the Kiro model used |
MULTICA_QODER_PATH | Custom path to the qodercli binary |
MULTICA_QODER_MODEL | Override the Qoder model used |
MULTICA_TRAECLI_PATH | Custom path to the traecli binary |
MULTICA_TRAECLI_MODEL | Override the Trae CLI model used |
Self-Hosted Server
When connecting to a self-hosted Multiflow instance, point the CLI to your server before logging in:
export MULTICA_APP_URL=https://app.example.com
export MULTICA_SERVER_URL=wss://api.example.com/ws
multiflow login
multiflow daemon startOr set them persistently:
multiflow config set app_url https://app.example.com
multiflow config set server_url wss://api.example.com/wsProfiles
Profiles let you run multiple daemons on the same machine — for example, one for production and one for a staging server.
# Set up a staging profile
multiflow setup self-host --profile staging --server-url https://api-staging.example.com --app-url https://staging.example.com
# Start its daemon
multiflow daemon start --profile staging
# Default profile runs separately
multiflow daemon startEach profile gets its own config directory (~/.multica/profiles/<name>/), daemon state, health port, and workspace root.
Workspaces
List Workspaces
multiflow workspace listWatched workspaces are marked with *. The daemon only processes tasks for watched workspaces.
Watch / Unwatch
multiflow workspace watch <workspace-id>
multiflow workspace unwatch <workspace-id>Get Details
multiflow workspace get <workspace-id>
multiflow workspace get <workspace-id> --output jsonList Members
multiflow workspace member list <workspace-id>Invite Member
按邮箱邀请成员加入 workspace。被邀请人会收到一条待接受(pending)的邀请,接受后才真正加入——不是即时添加。workspace 参数可选,接受完整 UUID、slug 或短 UUID 前缀(≥4 位十六进制),省略时用当前默认 workspace(--workspace-id / MULTICA_WORKSPACE_ID / profile 默认)。
multiflow workspace member invite alice@example.com
multiflow workspace member invite alice@example.com <workspace-id> --role admin
multiflow workspace member invite alice@example.com --output json--role 默认 member,可传 admin;不允许邀请 owner。目前只支持邮箱标识(不做用户名/工号解析)。若该邮箱已是成员或已有待接受邀请,服务端返回 409 并给出对应提示。
Update Workspace
需要 admin 或 owner 权限。所有字段都是部分更新(PATCH 语义):未传的字段保持不变。
multiflow workspace update <workspace-id> --name "Acme Eng"
multiflow workspace update <workspace-id> \
--description "Engineering team workspace" \
--issue-prefix ENG长文本走 stdin(保留换行/反斜杠):
cat <<'CTX' | multiflow workspace update <workspace-id> --context-stdin
我们是一支 5 人 AI-native 团队。
工作语言:中文 + 英文混合。
CTX可编辑字段:--name、--description / --description-stdin、--context / --context-stdin、--issue-prefix。slug 创建后只读,不暴露在 CLI。--description 与 --description-stdin(以及 context 同名对)互斥。未传任何字段 flag 时命令拒绝执行,避免空 PATCH 触发无意义的 workspace 更新事件。--issue-prefix "" 也会被拒绝:当前后端在 prefix 为空时静默跳过该字段,CLI 在本地拦下避免“看似成功的 no-op”。
Issues
List Issues
multiflow issue list
multiflow issue list --status in_progress
multiflow issue list --priority urgent --assignee "Agent Name"
multiflow issue list --assignee-id 5fb87ac7-23b5-4a7a-81fa-ed295a54545d
multiflow issue list --full-id
multiflow issue list --limit 20 --output json表格输出默认显示可直接复制到后续命令的 issue KEY(例如 MUL-123);需要完整 UUID 时使用 --full-id。Available filters: --status, --priority, --assignee / --assignee-id, --project, --limit. 在重名 workspace 下用 --assignee-id <uuid> 可以精确锁定一个成员或 agent。
Get Issue
multiflow issue get MUL-123
multiflow issue get <uuid>
multiflow issue get <id> --output json<id> 同时接受 issue key(multiflow issue list 表格里直接显示,例如 MUL-123)和完整 UUID(给 list 加 --full-id 可显示)。同样的规则适用于下面 update / assign / status / comment / subscriber / runs 等接受 <id> 的命令。
Create Issue
multiflow issue create --title "Fix login bug" --description "..." --priority high --assignee "Lambda"
multiflow issue create --title "Fix login bug" --assignee-id 5fb87ac7-23b5-4a7a-81fa-ed295a54545dFlags: --title (required), --description, --status, --priority, --assignee / --assignee-id, --parent, --project, --due-date. 脚本里如果已经拿到了 UUID(例如来自 multiflow workspace member list --output json),传 --assignee-id <uuid>(与 --assignee 互斥)以精确锁定。
Update Issue
multiflow issue update <id> --title "New title" --priority urgentAssign Issue
multiflow issue assign <id> --to "Lambda"
multiflow issue assign <id> --to-id 5fb87ac7-23b5-4a7a-81fa-ed295a54545d
multiflow issue assign <id> --unassign--to-id <uuid>(与 --to 互斥)按 UUID 精确分配;适合重名 workspace 下脚本化场景。
Change Status
multiflow issue status <id> in_progressValid statuses: backlog, todo, in_progress, in_review, done, blocked, cancelled.
Comments
# List comments
multiflow issue comment list <issue-id>
# Add a comment
multiflow issue comment add <issue-id> --content "Looks good, merging now"
# Reply to a specific comment
multiflow issue comment add <issue-id> --parent <comment-id> --content "Thanks!"
# Delete a comment
multiflow issue comment delete <comment-id>Execution History
# List all execution runs for an issue
multiflow issue runs <issue-id>
multiflow issue runs <issue-id> --full-id
multiflow issue runs <issue-id> --output json
# View messages for a specific execution run
multiflow issue run-messages <task-id>
multiflow issue run-messages <short-task-id> --issue <issue-id>
multiflow issue run-messages <task-id> --output json
# Incremental fetch (only messages after a given sequence number)
multiflow issue run-messages <task-id> --since 42 --output jsonruns 的表格输出默认显示 task UUID 短前缀;需要完整 task UUID 时使用 --full-id。run-messages 可直接接受完整 task UUID;从 runs 表格复制短前缀时需要同时传 --issue <issue-id>,CLI 只会在该 issue 的 runs 内解析。
Projects
Projects group related issues (e.g. a sprint, an epic, a workstream). Every project belongs to a workspace and can optionally have a lead (member or agent).
List Projects
multiflow project list
multiflow project list --status in_progress
multiflow project list --output jsonAvailable filters: --status.
Get Project
multiflow project get <id>
multiflow project get <id> --output jsonCreate Project
multiflow project create --title "2026 Week 16 Sprint" --icon "🏃" --lead "Lambda"Flags: --title (required), --description, --status, --icon, --lead, --start-date, --due-date。日期是日历日(YYYY-MM-DD)。
Update Project
multiflow project update <id> --title "New title" --status in_progress
multiflow project update <id> --lead "Lambda"
multiflow project update <id> --due-date 2026-04-15Flags: --title, --description, --status, --icon, --lead, --start-date, --due-date。日期传空字符串(如 --start-date "")可清除。
Change Status
multiflow project status <id> in_progressValid statuses: planned, in_progress, paused, completed, cancelled.
Delete Project
multiflow project delete <id>Associating Issues with Projects
Use the --project flag on issue create / issue update to attach an issue to a
project, or on issue list to filter issues by project:
multiflow issue create --title "Login bug" --project <project-id>
multiflow issue update <issue-id> --project <project-id>
multiflow issue list --project <project-id>Configuration
View Config
multiflow config showShows config file path, server URL, app URL, and default workspace.
Set Values
multiflow config set server_url wss://api.example.com/ws
multiflow config set app_url https://app.example.com
multiflow config set workspace_id <workspace-id>Other Commands
multiflow version # Show CLI version and commit hash
multiflow update # Update to latest version
multiflow agent list # List agents in the current workspaceOutput Formats
Most commands support --output with two formats:
table— human-readable table (default for list commands)json— structured JSON (useful for scripting and automation)
multiflow issue list --output json
multiflow daemon status --output json