* feat: streamline self-hosting experience with one-click setup - Add `make selfhost` / `make selfhost-stop` for one-command Docker deployment - Add `multica setup` CLI command (auto-detect local server, configure, login, start daemon) - Add `multica config local` CLI command (configure for localhost defaults) - Restructure SELF_HOSTING.md: simplified 4-step guide, moved advanced config to SELF_HOSTING_ADVANCED.md - Add SELF_HOSTING_AI.md for AI agents to follow - Document 888888 master verification code for non-production environments - Document how to stop services - Fix brew install typo: `multica-cli` → `multica` in SELF_HOSTING.md and self-hosting.mdx - Update README.md and README.zh-CN.md with simplified self-host instructions - Update CLI_AND_DAEMON.md with new setup/config local commands * feat: add one-command installer script (curl | bash) Add scripts/install.sh that handles the full setup in one command: Self-host (default): curl -fsSL .../install.sh | bash → Checks Docker, clones repo, starts services, installs CLI, configures Cloud (CLI only): curl -fsSL .../install.sh | bash -s -- --cloud → Installs CLI via Homebrew or binary download Features: - OS detection (macOS/Linux) with architecture support (amd64/arm64) - Homebrew install with binary download fallback - Idempotent: re-running updates existing installation - Colored output with non-TTY fallback - Docker availability check with helpful error messages Updated docs (README, SELF_HOSTING, self-hosting.mdx, SELF_HOSTING_AI) to show curl | bash as the primary install method. * refactor: default install to cloud mode, add --local for self-host - install.sh default is now cloud (CLI only, connects to multica.ai) - Self-host uses --local flag: curl ... | bash -s -- --local - Restructured README following Hermes Agent style: - Quick Install section front and center with curl | bash - CLI command reference table - Self-host as a callout under Quick Install - Removed redundant "Multica Cloud" / "CLI" sections - Updated all docs (SELF_HOSTING, self-hosting.mdx, SELF_HOSTING_AI, README.zh-CN) to use --local flag for self-host curl command * docs: remove redundant AI agent install snippet from README CLI section * docs: add daemon stop command to README quick install sections * feat: add --stop flag to install.sh for easy self-host shutdown Users who installed via `curl ... | bash -s -- --local` can now stop all services with `curl ... | bash -s -- --stop`. The stop command shuts down Docker Compose services and the daemon. Also updated SELF_HOSTING.md stopping section to show both methods.
9.3 KiB
CLI and Agent Daemon Guide
The multica CLI connects your local machine to Multica. It handles authentication, workspace management, issue tracking, and runs the agent daemon that executes AI tasks locally.
Installation
Homebrew (macOS/Linux)
brew tap multica-ai/tap
brew install multica
Build from Source
git clone https://github.com/multica-ai/multica.git
cd multica
make build
cp server/bin/multica /usr/local/bin/multica
Update
multica update
This auto-detects your installation method (Homebrew or manual) and upgrades accordingly.
Quick Start
# One-command setup: configure, authenticate, and start the daemon
multica setup
# For self-hosted (local) deployments:
multica setup --local
Or step by step:
# 1. Authenticate (opens browser for login)
multica login
# 2. Start the agent daemon
multica daemon start
# 3. Done — agents in your watched workspaces can now execute tasks on your machine
multica login automatically discovers all workspaces you belong to and adds them to the daemon watch list.
Authentication
Browser Login
multica login
Opens your browser for OAuth authentication, creates a 90-day personal access token, and auto-configures your workspaces.
Token Login
multica login --token
Authenticate by pasting a personal access token directly. Useful for headless environments.
Check Status
multica auth status
Shows your current server, user, and token validity.
Logout
multica auth logout
Removes 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 Multica server, and executes tasks when agents are assigned work.
Start
multica daemon start
By default, the daemon runs in the background and logs to ~/.multica/daemon.log.
To run in the foreground (useful for debugging):
multica daemon start --foreground
Stop
multica daemon stop
Status
multica daemon status
multica daemon status --output json
Shows PID, uptime, detected agents, and watched workspaces.
Logs
multica daemon logs # Last 50 lines
multica daemon logs -f # Follow (tail -f)
multica daemon logs -n 100 # Last 100 lines
Supported Agents
The daemon auto-detects these AI CLIs on your PATH:
| CLI | Command | Description |
|---|---|---|
| Claude Code | claude |
Anthropic's coding agent |
| Codex | codex |
OpenAI's 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 |
2h |
| 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 |
Self-Hosted Server
When connecting to a self-hosted Multica instance, the easiest approach is:
# One command — auto-detects local server, configures, authenticates, starts daemon
multica setup --local
Or configure manually:
# Configure for local Docker Compose (default ports)
multica config local
# Or set URLs individually:
# multica config set app_url http://localhost:3000
# multica config set server_url http://localhost:8080
# For production with TLS:
# multica config set app_url https://app.example.com
# multica config set server_url https://api.example.com
multica login
multica daemon start
Profiles
Profiles let you run multiple daemons on the same machine — for example, one for production and one for a staging server.
# Start a daemon for the staging server
multica --profile staging login
multica --profile staging daemon start
# Default profile runs separately
multica daemon start
Each profile gets its own config directory (~/.multica/profiles/<name>/), daemon state, health port, and workspace root.
Workspaces
List Workspaces
multica workspace list
Watched workspaces are marked with *. The daemon only processes tasks for watched workspaces.
Watch / Unwatch
multica workspace watch <workspace-id>
multica workspace unwatch <workspace-id>
Get Details
multica workspace get <workspace-id>
multica workspace get <workspace-id> --output json
List Members
multica workspace members <workspace-id>
Issues
List Issues
multica issue list
multica issue list --status in_progress
multica issue list --priority urgent --assignee "Agent Name"
multica issue list --limit 20 --output json
Available filters: --status, --priority, --assignee, --limit.
Get Issue
multica issue get <id>
multica issue get <id> --output json
Create Issue
multica issue create --title "Fix login bug" --description "..." --priority high --assignee "Lambda"
Flags: --title (required), --description, --status, --priority, --assignee, --parent, --due-date.
Update Issue
multica issue update <id> --title "New title" --priority urgent
Assign Issue
multica issue assign <id> --to "Lambda"
multica issue assign <id> --unassign
Change Status
multica issue status <id> in_progress
Valid statuses: backlog, todo, in_progress, in_review, done, blocked, cancelled.
Comments
# List comments
multica issue comment list <issue-id>
# Add a comment
multica issue comment add <issue-id> --content "Looks good, merging now"
# Reply to a specific comment
multica issue comment add <issue-id> --parent <comment-id> --content "Thanks!"
# Delete a comment
multica issue comment delete <comment-id>
Execution History
# List all execution runs for an issue
multica issue runs <issue-id>
multica issue runs <issue-id> --output json
# View messages for a specific execution run
multica issue run-messages <task-id>
multica issue run-messages <task-id> --output json
# Incremental fetch (only messages after a given sequence number)
multica issue run-messages <task-id> --since 42 --output json
The runs command shows all past and current executions for an issue, including running tasks. The run-messages command shows the detailed message log (tool calls, thinking, text, errors) for a single run. Use --since for efficient polling of in-progress runs.
Setup
# One-command setup: configure, authenticate, and start the daemon
multica setup
# For local self-hosted deployments (auto-detects or forces local mode)
multica setup --local
# Custom ports
multica setup --local --port 9090 --frontend-port 4000
multica setup detects whether a local Multica server is running, configures the CLI, opens your browser for authentication, and starts the daemon — all in one step.
Configuration
View Config
multica config show
Shows config file path, server URL, app URL, and default workspace.
Configure for Local Self-Hosted
multica config local # Uses default ports (8080/3000)
multica config local --port 9090 --frontend-port 4000 # Custom ports
Sets server_url and app_url for a local Docker Compose deployment in one command.
Set Values
multica config set server_url https://api.example.com
multica config set app_url https://app.example.com
multica config set workspace_id <workspace-id>
Other Commands
multica version # Show CLI version and commit hash
multica update # Update to latest version
multica agent list # List agents in the current workspace
Output Formats
Most commands support --output with two formats:
table— human-readable table (default for list commands)json— structured JSON (useful for scripting and automation)
multica issue list --output json
multica daemon status --output json