CLI Reference

merlin [OPTIONS] [TASK]
merlin [SUBCOMMAND]

Positional

ArgumentDescription
<task>Task to execute. Omit to drop into the interactive REPL

Options

FlagDescription
-p, --provider <name>Provider to use (overrides default_provider)
--no-verifyDisable the verify gate for this run
-y, --yesAuto-approve dangerous tool calls (advisory)
--listenListen for AlgoChat messages and auto-respond
--resume [ID]Resume the most recent session, or a specific session by ID
--sessionsList past sessions
--no-sessionDon’t create or save a session
-h, --helpPrint help
-V, --versionPrint version

Subcommands

init

Initialize Merlin in the current project:

  1. Build all plugins under plugins/ in release mode.
  2. Copy each plugin’s plugin.toml to the fledge data directory.
  3. Symlink plugin binaries into the fledge bin shim directory.
  4. Append new plugins to plugins.toml registry.
  5. Best-effort start localnet and generate AlgoChat keys.

health

Run health checks on all configured providers — creates each provider, sends a test prompt, and reports latency and tool support.

bench

Run benchmarks across providers. Options:

FlagDescription
--suite <name>Run only this suite (default: all)
-p, --provider <name>Run against a specific provider (default: all)
--historyShow accumulated historical results

keys

Manage API keys in the OS keychain. Without a subcommand, lists all known keys and their source (env, keychain, or not set).

SubcommandDescription
keys set <NAME>Store an API key in the OS keychain (hidden input)
keys remove <NAME>Remove an API key from the OS keychain

Examples

# One-shot task
merlin "add error handling to the parser"

# Use a specific provider for one run
merlin --provider local "explain this function"

# Skip verification (prototyping)
merlin --no-verify "experiment with a new approach"

# Interactive REPL
merlin

# Auto-respond on AlgoChat
merlin --listen

Exit Codes

CodeMeaning
0Task completed successfully (or cancelled)
1Task errored — provider failure, exhausted retries, missing config

Output

Merlin writes all human-readable output to stderr. This means piping merlin "<task>" to a file captures only what the task explicitly produces (currently nothing — Merlin is purely side-effecting). The streaming progress lives on stderr to keep machine-readable output clean for future use cases.