The Archon CLI (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/Archon/llms.txt
Use this file to discover all available pages before exploring further.
archon) is your primary interface for running AI-powered workflows, managing isolated worktrees, and controlling the Archon server from a terminal. This page covers every command and subcommand available, including all flags, defaults, and real terminal examples.
Most workflow and isolation commands require a git repository. Running from a subdirectory (e.g.,
/repo/packages/cli) automatically resolves to the repo root. Commands like version, help, chat, setup, serve, and doctor work from any directory.Prerequisites
Link the CLI globally (recommended)
archon command available system-wide. Without this step, use bun run cli from the repo directory instead.Quick start
Workflow commands
workflow list
List all workflows discoverable from the target directory. Searches .archon/workflows/ (project), ~/.archon/workflows/ (global), and bundled defaults.
{ "workflows": [...], "errors": [...] }. Optional workflow fields (provider, model, modelReasoningEffort, webSearchMode) are omitted when unset.
| Flag | Effect |
|---|---|
--cwd <path> | Target directory to discover project workflows |
--json | Emit machine-readable JSON instead of formatted text |
workflow run <name> [message]
Run a workflow with an optional user message. Progress events (node start/complete/fail/skip, approval gates) are written to stderr.
| Flag | Effect |
|---|---|
--cwd <path> | Target directory |
--branch <name> | Explicit branch name for the worktree |
--from <branch>, --from-branch <branch> | Override base branch (start-point for the worktree) |
--no-worktree | Run directly in the live checkout — mutually exclusive with --branch and --from |
--resume | Resume from the last failed run at the working path, skipping completed nodes |
--quiet, -q | Suppress all progress output to stderr |
--verbose, -v | Show tool-level events (tool name and duration) |
archon/task-<workflow>-<timestamp>) and auto-registers the codebase if inside a git repo.
Name matching (4-tier fallback):
- Exact —
archon-assistmatchesarchon-assist - Case-insensitive —
Archon-Assistmatchesarchon-assist - Suffix —
assistmatchesarchon-assist - Substring —
smartmatchesarchon-smart-pr-review
workflow status
Show all running workflow runs across all worktrees.
workflow resume <run-id>
Resume a failed workflow run, re-executing from the first incomplete node and skipping nodes that already completed.
workflow abandon <run-id>
Discard a non-terminal workflow run (marks it as cancelled). Releases the path lock immediately so a new workflow can start.
workflow approve <run-id> [comment]
Approve a paused workflow run at an interactive approval gate. The optional comment is available inside the workflow via $LOOP_USER_INPUT.
workflow reject <run-id> [--reason <text>]
Reject a paused workflow run at an approval gate. The optional reason is available inside the workflow via $REJECTION_REASON.
workflow cleanup [days]
Delete old terminal workflow run records from the database.
workflow event emit
Emit a workflow event directly to the database. Used inside workflow loop prompts to record story-level lifecycle events.
| Flag | Required | Description |
|---|---|---|
--run-id | Yes | UUID of the workflow run |
--type | Yes | Event type (e.g., node_completed) |
--data | No | JSON string attached to the event. Invalid JSON prints a warning and is ignored. |
0 on success, 1 when --run-id or --type is missing or invalid. Event persistence is best-effort — check server logs if events appear missing.
workflow search [query]
Search the Archon workflow marketplace for community-contributed workflows.
workflow install <slug>
Install a workflow from the marketplace into .archon/workflows/ of the current directory.
Isolation commands
isolation list
Show all active worktree environments grouped by codebase, with branch name, workflow type, platform, and days since last activity.
isolation cleanup [days]
Remove stale environments. Merge detection uses three signals: git branch ancestry, patch equivalence (git cherry), and GitHub PR state (via gh CLI).
Branches with an open PR are always skipped. Branches with a closed PR are skipped by default — pass
--include-closed to clean those up too. The gh CLI is optional; if absent, only git signals are used.Validate commands
validate workflows [name]
Validate workflow YAML definitions and their referenced resources (command files, MCP configs, skill directories).
0 = all valid, 1 = errors found.
validate commands [name]
Validate command files (.md) in .archon/commands/.
0 = all valid, 1 = errors found.
Other commands
chat <message>
Send a one-off message to the orchestrator for a quick AI interaction.
setup
Interactive setup wizard for credentials and configuration.
| Flag | Effect |
|---|---|
--scope home | Write to ~/.archon/.env (default) — applies to every project |
--scope project | Write to <cwd>/.archon/.env — overrides user scope for this repo |
--force | Overwrite the target file wholesale instead of merging. A timestamped backup is still written. |
--spawn | Open the setup wizard in a new terminal window |
doctor
Verify your Archon setup. Checks: Claude binary spawn, gh CLI auth, Pi auth (when configured), database reachability, workspace writability, bundled defaults, and adapter token pings (Slack/Telegram, best-effort).
0 if all checks pass or are skipped; 1 if any critical check fails. Adapter pings degrade to skip on network errors.
serve
Start the web UI server. Downloads the pre-built web UI tarball from the matching GitHub release on first run, verifies the SHA-256 checksum, and extracts it. Subsequent runs use the cached copy.
| Flag | Effect |
|---|---|
--port <port> | Override server port (default: 3090, range: 1–65535) |
--download-only | Download and cache the web UI, then exit without starting the server |
~/.archon/web-dist/<version>/. Each version is cached independently.
skill install [path]
Install the bundled Archon skill files into a project’s .claude/skills/archon/ directory. Always overwrites to ensure the latest version is installed.
archon setup.
continue <branch> [message]
Continue work on an existing worktree, auto-injecting prior run context (git diff, recent commits, artifact summaries) into the next workflow run.
| Flag | Effect |
|---|---|
--workflow <name> | Workflow to run (default: archon-assist) |
--no-context | Skip context injection — run the workflow without prior state |
complete <branch> [branch2 ...]
Remove a branch’s worktree, local branch, and remote branch, and mark its isolation environment as destroyed. Use this after a PR is merged.
| Flag | Effect |
|---|---|
--force | Skip uncommitted-changes guard |
version
Show version, build type, and database info.
Global options
| Option | Effect |
|---|---|
--cwd <path> | Override working directory (default: current directory) |
--quiet, -q | Reduce log verbosity to warnings and errors only |
--verbose, -v | Show debug-level output |
--json | Output machine-readable JSON (for workflow list, workflow status) |
--help, -h | Show help message |
Working directory
The CLI determines where to run based on:--cwdflag (if provided)- Current directory (default)
--branch, workflows run inside the worktree directory.
Commands and workflows are loaded from the working directory at runtime. The CLI reads directly from disk and picks up uncommitted changes immediately. The server (Telegram/Slack/GitHub) reads from the workspace clone at
~/.archon/workspaces/ — that clone only syncs from the remote before worktree creation, so changes must be pushed to take effect.Database
| Scenario | Storage |
|---|---|
No DATABASE_URL set (default) | SQLite at ~/.archon/archon.db — zero setup, auto-initialized |
DATABASE_URL set | PostgreSQL — for cloud or advanced deployments |
Full examples
Configuration Reference
Learn how to configure Archon via YAML config and environment variables.
Variable Reference
All substitution variables available in workflow prompts and bash scripts.
Workflow Schema
Complete YAML schema reference for authoring workflows.
Troubleshooting
Common issues and fixes when running Archon locally or in Docker.