InitRunner

CLI Reference

Five commands you'll actually use

Most days, this is the whole CLI. Everything below exists for when you need it.

  • initrunner new: create a new agent role via conversational builder
  • initrunner run: run an agent from a YAML file, starter name, or ephemeral mode
  • initrunner setup: guided setup wizard for first-time configuration
  • initrunner doctor: check provider configuration, API keys, and connectivity
  • initrunner install: install a role from InitHub or an OCI registry

Path Resolution

All commands that accept a role path also accept a directory or an installed role name. Resolution order:

  1. If the path is a file, use it.
  2. If the path is a directory: a. If <dir>/role.yaml exists, use it. b. Otherwise scan top-level *.yaml/*.yml for files with apiVersion: initrunner/v1. c. Exactly one match is used; zero or multiple matches produce an error.
  3. Otherwise, look up the name in the installed role registry (exact key, owner/name, or display name).

This means initrunner run . works from inside an agent directory, and initrunner run code-reviewer works after initrunner install alice/code-reviewer.

Full command reference

The full surface area, when you need it.

CommandDescription
initrunnerInteractive menu (provider setup, quick chat, create agent) or --help for commands
initrunner run [PATH]Run an agent, daemon, server, or bot (auto-detects kind). No PATH starts ephemeral REPL.
initrunner validate <PATH>Validate a role, team, or flow definition
initrunner new [description]Create a new agent via conversational builder
initrunner configure <PATH>Switch the LLM provider/model for a role without editing YAML
initrunner setupGuided setup wizard (provider selection + test)
initrunner ingest <PATH>Ingest documents into vector store
initrunner test <PATH> -s <suite>Run a test suite against an agent
initrunner dashboardLaunch web dashboard (requires [dashboard] extra)
initrunner desktopLaunch dashboard in native window (requires [desktop] extra)
initrunner examples listList bundled examples
initrunner examples show <name>Preview an example with syntax highlighting
initrunner examples copy <name>Copy example files to current directory
initrunner examples downloadDownload the full example catalog
initrunner install <source>Install a role from InitHub or OCI registry
initrunner uninstall <name>Remove an installed role
initrunner search <query>Search InitHub for agent packs
initrunner info <source>Inspect a role's metadata without installing
initrunner listList installed roles (with run commands)
initrunner update [name]Update installed role(s) to latest version
initrunner doctorCheck provider configuration, API keys, and connectivity
initrunner pluginsList discovered tool plugins
initrunner audit prunePrune old audit records
initrunner audit exportExport audit records as JSON or CSV
initrunner audit verify-chainVerify the HMAC-signed audit chain (since v2026.4.15)
initrunner audit security-eventsQuery the security-events audit table by type, agent, or limit (since v2026.4.16)
initrunner pendingList tool-call approvals awaiting a decision (since v2026.4.17). See Approvals.
initrunner approve RUN_IDResume a paused run by approving or denying its pending tool calls (since v2026.4.17)
initrunner export agent-spec PATHExport a role as a PydanticAI Agent Spec (since v2026.4.17). See Agent Spec Import & Export.
initrunner vault initCreate a new encrypted credential vault (since v2026.4.15)
initrunner vault set <NAME> [VALUE]Store a credential (prompts for value when omitted)
initrunner vault get <NAME>Print a stored credential value
initrunner vault listList credential names (values are never printed)
initrunner vault rm <NAME>Remove a credential
initrunner vault import [FILE]Import credentials from .env or JSON (defaults to ~/.initrunner/.env)
initrunner vault export --env|--jsonExport the vault as dotenv or JSON
initrunner vault rotateRe-encrypt the vault under a new passphrase
initrunner vault verifyCheck that a passphrase decrypts the vault
initrunner vault cacheCache the passphrase in the OS keyring (requires [vault-keyring])
initrunner vault lockClear the cached passphrase from the keyring
initrunner vault statusShow vault location, entry count, last modified, cache state
initrunner cost reportCost breakdown by agent with filters
initrunner cost summaryHigh-level spend overview with time breakdowns
initrunner cost by-modelCost grouped by model and provider
initrunner cost estimate <role.yaml>Predict per-run cost from a role YAML
initrunner memory clear <PATH>Clear agent memory store
initrunner memory export <PATH>Export memories to JSON
initrunner memory import <PATH> <file>Import memories from JSON
initrunner memory list <PATH>List stored memories
initrunner memory consolidate <PATH>Run memory consolidation manually
initrunner skill new [name]Scaffold a new skill directory
initrunner skill validate <path>Validate a skill definition
initrunner skill listList available skills
initrunner flow new <name>Scaffold a new flow project from a pattern
initrunner flow up <flow.yaml>Run flow orchestration (foreground)
initrunner flow validate <flow.yaml>Validate a flow definition
initrunner flow install <flow.yaml>Install systemd user unit
initrunner flow uninstall <name>Remove systemd unit
initrunner flow start <name>Start systemd service
initrunner flow stop <name>Stop systemd service
initrunner flow restart <name>Restart systemd service
initrunner flow status <name>Show systemd service status
initrunner flow logs <name>Show journald logs
initrunner flow eventsQuery delegate routing events
initrunner mcp list-tools <PATH>List tools from MCP servers in a role
initrunner mcp serve <PATH>...Expose agents as an MCP server
initrunner a2a serve <PATH>Expose an agent as an A2A server
initrunner loginLog in to InitHub (browser auth) or OCI registry
initrunner logoutRemove stored InitHub credentials
initrunner whoamiShow current InitHub user
initrunner publish [PATH]Publish to InitHub (default) or OCI registry
initrunner hub login(deprecated) Authenticate with InitHub
initrunner hub logout(deprecated) Remove stored InitHub credentials
initrunner hub whoami(deprecated) Show current InitHub user
initrunner hub search <QUERY>(deprecated) Search InitHub for agent packs
initrunner hub publish [PATH](deprecated) Publish an agent pack to InitHub
initrunner hub info <PACKAGE>(deprecated) Show InitHub package details
initrunner --versionPrint version

PATH can be a role YAML file (role.yaml, pdf-agent.yaml) or a directory containing one. See Path Resolution.

Global Options

FlagDescription
--versionPrint version and exit
--verboseEnable debug logging

Environment Variables

VariableEffect
INITRUNNER_AUDIT_DBDefault audit database path (overridden by --audit-db)
INITRUNNER_AUDIT_HMAC_KEY64-char hex HMAC key used to sign and verify the audit chain. Falls back to ~/.initrunner/audit_hmac.key. Required by audit verify-chain if no key file exists.
INITRUNNER_VAULT_PASSPHRASEVault passphrase for non-interactive use (CI, scripts). Scrubbed from subprocess env.
INITRUNNER_SKILL_DIRExtra skill search directory (CLI --skill-dir takes precedence, but env dir is also searched)

Run Options

Synopsis: initrunner run [PATH] [OPTIONS]

The PATH argument is optional — running with no PATH starts an ephemeral REPL (see Quickstart). When --sense is used, PATH is also optional. The run command auto-detects the YAML kind (Agent, Team, Flow) and dispatches accordingly. Mode flags (--daemon, --autopilot, --serve, --bot, --telegram, --discord) are mutually exclusive.

Since v2026.4.10, run performs pre-flight YAML schema validation before any skill resolution, model resolution, or API call. Errors render as a Rich panel with per-field paths, 1-based line/column numbers, and inline fix suggestions. flow up, flow install, and flow validate additionally walk every role referenced by spec.agents and prefix nested issues with agents.<name>. so you can tell which referenced file is broken.

In interactive terminals, run also prompts for a missing provider API key inline on first use and persists it to ~/.initrunner/.env (mode 0600) — no initrunner setup round-trip required. Non-interactive sessions (CI, piped stdin, redirected stdout) keep the original API key not found error and exit code 1.

FlagDescription
-p, --prompt TEXTSingle prompt to send
--task TEXTAlias for --prompt
-i, --interactiveInteractive REPL mode
-a, --autonomousAutonomous agentic loop mode (requires -p)
--daemonRun in trigger-driven daemon mode
--autopilotDaemon mode with all triggers autonomous
--serveServe agent as an OpenAI-compatible API
--bot TEXTLaunch as a bot (telegram or discord)
--telegramLaunch as a Telegram bot (ephemeral mode).
--discordLaunch as a Discord bot (ephemeral mode).
--provider TEXTModel provider (overrides auto-detection). Used in ephemeral mode.
--tool-profile TEXTTool profile: none, minimal (default), all. Used in ephemeral mode.
--tools TEXTExtra tool types to enable (repeatable). See Extra Tools.
--ingest PATHPaths or globs to ingest for document Q&A (repeatable).
--memory / --no-memoryEnable or disable persistent memory (default: enabled in ephemeral mode).
--list-toolsList available extra tool types and exit.
--listList available starter agents and exit.
--save PATHSave a starter agent to a local directory.
--max-iterations NOverride max iterations for autonomous mode
--token-budget NCumulative token budget across the run, including inline-delegated sub-agents. Overrides guardrails.run_token_budget for this invocation. Since v2026.5.1. See Guardrails.
--resumeResume the previous REPL session
--dry-runSimulate with TestModel (no API calls)
--format TEXTOutput format: auto (default — stream on TTY, plain when piped), json (structured envelope with token counts and timing), text (stdout-only, stats to stderr), rich (buffered Markdown panel).
--no-streamDeprecated. Use --format rich instead.
--host TEXTHost to bind to (default: 127.0.0.1). Requires --serve.
--port INTPort to listen on (default: 8000). Requires --serve or --bot.
--api-key TEXTAPI key for Bearer token authentication. Requires --serve.
--cors-origin TEXTAllowed CORS origin (repeatable). Merged with security.server.cors_origins from role YAML. Requires --serve.
--allowed-users TEXTRestrict bot to these usernames (repeatable). Requires --bot, --telegram, or --discord.
--allowed-user-ids TEXTRestrict bot to these user IDs (repeatable). Requires --bot, --telegram, or --discord.
--audit-db PATHCustom audit database path
--no-auditDisable audit logging
--skill-dir PATHExtra skill search directory
-A, --attach PATH_OR_URLAttach file or URL (repeatable). Supports images, audio, video, and documents. Requires -p. See Multimodal Input.
--report PATHExport a markdown report to PATH after the run. See Report Export.
--report-template TEXTReport template: default, pr-review, changelog, ci-fix. Requires --report.
--senseSense the best role for the given prompt (replaces PATH argument).
--role-dir PATHDirectory to search for roles when using --sense.
--confirm-rolePrompt to confirm the auto-selected role before running (requires a TTY).
--budget-timezone TEXTIANA timezone for daily/weekly budget resets (default: UTC). Valid with --daemon, --autopilot, --bot.
--model TEXTModel alias or provider:model (overrides role config). Env: INITRUNNER_MODEL. See Model Aliases.
--explain-profilesDisplay effective tool, trigger, and sandbox configuration for the role's security preset and exit. See Security Presets.
--agent-spec PATHRun a PydanticAI Agent Spec (YAML or JSON) as a transient role. Since v2026.4.17. See Agent Spec Import.
--var KEY=VALUEValue for a {{var}} template variable declared in spec.deps_schema. Repeatable. Single-shot mode only. Since v2026.4.17. See Configuration: Spec Deps Schema.

Intent Sensing examples

# Let initrunner pick the best role for your task
initrunner run --sense -p "analyze this CSV and summarize"

# Search a specific directory for roles
initrunner run --sense --role-dir ./roles/ -p "search the web for AI news"

# Review the sensed role before running
initrunner run --sense --confirm-role -p "review my code for bugs"

# Dry-run: discover + score roles without any LLM calls
initrunner run --sense --dry-run -p "task description"

Intent Sensing uses a two-pass strategy:

  1. Keyword/tag scoring — zero API calls. Selects confidently when one role clearly matches.
  2. LLM tiebreaker — compact call used only when the top two candidates are too close. Skipped when --dry-run is set.

Set INITRUNNER_DEFAULT_MODEL to override the model used for the LLM tiebreaker (default: openai:gpt-4o-mini).

See Intent Sensing for the full algorithm reference, role tagging guide, and troubleshooting.

Combine flags: initrunner run role.yaml -p "Hello!" -i sends a prompt then continues interactively.

Note: Token budgets (max_tokens_per_run, autonomous_token_budget, etc.) are set in spec.guardrails in the role YAML. See Guardrails.

Team mode

When the role file has kind: Team, the run command executes in team mode — running each persona sequentially or in parallel. A prompt (--task or -p) is required. Interactive (-i) and autonomous (-a) modes are not supported for teams. See Team Mode.

Tool Profiles

Tool profiles control which tools are available in ephemeral and bot modes.

ProfileToolsNotes
none(none)Safest — pure text chat, no tool access.
minimaldatetime, web_readerDefault. Time awareness and web page reading.
allAll tools from Extra Tools tableIncludes shell, python, and slack — see Security. Requires env vars for slack.
# Chat with no tools
initrunner run --tool-profile none

# Chat with every available tool
SLACK_WEBHOOK_URL="https://hooks.slack.com/..." initrunner run --tool-profile all

Extra Tools

Use --tools to add individual tools on top of the selected profile, or use --tool-profile all to enable everything at once.

# Add slack to the default minimal profile
SLACK_WEBHOOK_URL="https://hooks.slack.com/..." initrunner run --telegram --tools slack

# Add multiple tools
initrunner run --tools git --tools shell

Duplicates are ignored — --tool-profile all --tools search won't add search twice.

ToolRequired env varsNotes
datetimeTime awareness (included in minimal).
web_readerFetch and read web pages (included in minimal).
searchWeb search (included in all).
pythonExecute Python code (included in all).
filesystemRead-only filesystem access (included in all).
slackSLACK_WEBHOOK_URLSend messages to a Slack channel.
gitRead-only git operations in current directory.
shellExecute shell commands.

Run initrunner run --list-tools to see this list from the CLI.

If a tool requires an environment variable that isn't set, the command exits immediately with an actionable error:

Error: Tool 'slack' requires SLACK_WEBHOOK_URL.
  Export it or add it to your .env file:
  export SLACK_WEBHOOK_URL=your-value

Document Search (--ingest)

The --ingest flag gives you CLI-driven RAG with no YAML file. Point it at a directory and InitRunner chunks, embeds, and indexes the files, then registers search_documents() as a tool.

# Search your docs folder
initrunner run --ingest ./docs/

# Combine with tools
initrunner run --ingest ./docs/ --tool-profile all

# Combine with a bot
initrunner run --telegram --ingest ./knowledge-base/

How it works:

  1. InitRunner resolves the path and globs for supported files.
  2. Files are chunked (paragraph strategy, 512 chars, 50 overlap).
  3. Chunks are embedded using the auto-detected provider.
  4. The search_documents() tool is registered for the session.

Supported file types: .txt, .md, .rst, .csv, .json, .html. Install initrunner[ingest] for .pdf, .docx, and .xlsx.

Each --ingest invocation re-indexes the directory. Vectors are stored in a session-scoped database under ~/.initrunner/stores/.

Memory in Ephemeral Mode

Ephemeral mode has memory enabled by default. The agent remembers facts across turns within a session and can persist them across sessions.

initrunner run                # memory on (default)
initrunner run --resume       # resume last session
initrunner run --no-memory    # disable memory entirely

When memory is enabled, ephemeral mode creates a lightweight memory store with semantic memory. The agent can use remember() and recall() to store and retrieve facts. --resume loads the most recent session for the auto-detected provider. --no-memory disables all memory — each conversation starts fresh.

Provider Auto-Detection

When --provider is not specified, InitRunner checks environment variables in this order:

PriorityProviderEnvironment VariableDefault Model
1anthropicANTHROPIC_API_KEYclaude-sonnet-4-6
2openaiOPENAI_API_KEYgpt-5-mini
3googleGOOGLE_API_KEYgemini-2.5-flash
4groqGROQ_API_KEYllama-4-scout-17b-16e
5mistralMISTRAL_API_KEYmistral-large-latest
6cohereCO_API_KEYcommand-a
7ollama(localhost:11434 reachable)First available model or llama3.2

The first key found wins. Ollama is used as a fallback only when no API keys are set and Ollama is running locally.

# Force a specific provider
initrunner run --provider google

# Force both provider and model
initrunner run --provider openai --model gpt-5-mini

Environment variables can also be set in ~/.initrunner/.env or a .env file in the current directory. Running initrunner setup writes the provider key there automatically.

Ephemeral Mode Security

  • Tool profiles control agent capabilities. The none profile is safest for untrusted environments. The minimal default gives time and web reading. The all profile enables every tool including python, shell, and slack.
  • all profile includes python and shell = full host access. Both tools can execute arbitrary code on the host. Never use all in public-facing bots without access control.
  • --tools shell grants shell access. Like python, the shell tool allows arbitrary command execution. Only use it in trusted, local contexts.
  • --tools slack sends messages to a real channel. The Slack webhook URL is a secret — treat it like a token.
  • Bot tokens are secrets. Store them in environment variables or .env files. Never commit tokens to version control.
  • Ephemeral bots respond to everyone. Bot mode does not set allowed_users or allowed_roles by default.
  • Daily token budget is a cost firewall. Bot mode defaults to 200,000 tokens/day. For production, tune daemon_daily_token_budget in your role's spec.guardrails.
  • Use role.yaml for production bots. Ephemeral run shortcuts are for prototyping and personal use. Production bots should use a role file with explicit access control, token budgets, and tool configuration.

New Options

Synopsis: initrunner new [DESCRIPTION] [OPTIONS]

Create a new agent role via conversational builder. Seed modes are mutually exclusive.

FlagDescription
DESCRIPTIONNatural language description (generates via LLM)
--from SOURCESource: local file path, bundled example name, or hub:ref
--template TEXTStart from a named template (basic, rag, daemon, memory, ollama, api, telegram, discord)
--blankStart from a minimal blank template
--langchain PATHPath to a LangChain Python file to import and convert
--provider TEXTModel provider (auto-detected if omitted)
--model TEXTModel name (uses provider default if omitted)
--output PATHOutput file path (default: role.yaml)
--forceOverwrite existing file without prompting
--no-refineSkip the interactive refinement loop
--list-templatesList available role templates and exit

Without any seed, starts an interactive conversation where the LLM asks what to build.

Examples

# Generate from description with interactive refinement
initrunner new "a code review bot that reads git diffs"

# Start from a template, skip refinement
initrunner new --template rag --no-refine

# Load from an example
initrunner new --from hello-world

# Blank template with specific provider
initrunner new --blank --provider anthropic

# Import a LangChain agent
initrunner new --langchain my_agent.py

# Fully interactive (no seed)
initrunner new

Setup Options

FlagDescription
--provider TEXTProvider (skip interactive selection)
--name TEXTAgent name (default: my-agent)
--template TEXTTemplate: chatbot, rag, memory, daemon
--model TEXTModel name. Uses provider default if omitted.
--skip-testSkip connectivity test
--output PATHRole output path (default: role.yaml)
-y, --accept-risksAccept security disclaimer without prompting
--interfaces TEXTInstall interfaces: dashboard, desktop, both, skip

See Setup Wizard for templates, non-interactive usage, and troubleshooting.

Configure Options

Synopsis: initrunner configure <PATH> [OPTIONS]

Switch the LLM provider and model for a role without editing YAML. In interactive mode (no flags), shows available providers and a model picker. In non-interactive mode, pass --provider and/or --model directly. For installed roles, overrides are stored in registry.json and survive hub updates and reinstalls — the installed YAML stays pristine.

FlagDescription
PATHRole YAML file, directory, or installed role name
--provider TEXTTarget provider (e.g. openai, anthropic, groq, ollama)
--model TEXTTarget model name
--resetRemove provider override, revert to original

Examples

# Interactive — pick provider and model from menus
initrunner configure role.yaml

# Non-interactive — set provider and model directly
initrunner configure role.yaml --provider anthropic --model claude-sonnet-4-6

# Configure an installed role by name
initrunner configure code-reviewer --provider groq

# Revert to the original provider/model
initrunner configure code-reviewer --reset

Post-install adaptation: After initrunner install, if the role requires an API key you don't have, the CLI offers one-step adaptation to a configured provider. Pass --yes to auto-adapt non-interactively.

Serve Options

The serve subcommand was removed. Use initrunner run <PATH> --serve instead. See Run Options for the full flag list and API Server for endpoint details, streaming, multi-turn conversations, and usage examples.

Validate Options

Synopsis: initrunner validate <PATH> [OPTIONS]

FlagDescription
--explainPrint plain-language explanations of each config section (no LLM calls)

Since v2026.4.10, initrunner validate produces the same Rich panel as the run pre-flight — severity labels, per-field paths, 1-based line/column for syntax errors, and inline fix hints. The success-table path is unchanged. For flows, flow validate walks every role file referenced by spec.agents and prefixes nested issues with agents.<name>. so you can tell which referenced file broke.

Doctor Options

FlagDescription
--quickstartRun a smoke prompt to verify end-to-end connectivity
--role PATHRole file to test (loads its .env and uses it for --quickstart). Since v2026.4.12, also runs extended diagnostics (skills, custom tools, memory, triggers, MCP servers).
--deepRun active checks (MCP connectivity, full imports, DB open) instead of static-only analysis. Requires --role or --flow. Since v2026.4.12.
--flow PATHValidate a flow topology and run per-agent diagnostics on all referenced roles. Since v2026.4.12.
--fixAuto-repair detected issues (install missing extras, offer API key setup, repair config). Since v2026.4.12, also patches deprecated YAML fields in-place.
--fix --yesAuto-fix without confirmation prompts (CI-friendly)

See Doctor for details.

Daemon Options

The daemon subcommand was removed. Use initrunner run <PATH> --daemon instead. See Run Options for the full flag list and Triggers for trigger configuration.

Hub Options

Synopsis: initrunner hub <command> [OPTIONS]

Manage agent packs on InitHub. The top-level login, logout, whoami, and publish commands are preferred; hub subcommands are deprecated but still work.

hub login

initrunner hub login              # opens browser for device code authorization
initrunner hub login --token TEXT  # pass a token directly (CI/headless environments)
FlagDescription
--token TEXTAPI token with publish scope. Skips browser-based device code flow. Use in CI or headless environments.

Without --token, the CLI generates a one-time device code, opens the browser to approve it, and polls until authorization completes. The resulting token is stored locally for future commands.

hub publish

initrunner hub publish                                # publish from current directory
initrunner hub publish ./my-agent/                    # publish from a path
initrunner hub publish role.yaml --readme README.md   # attach a README
FlagDescription
PATHRole file or directory to publish (default: .)
--readme PATHREADME file to include with the package
--repo-url TEXTRepository URL for the package listing
--category TEXTCategory slug (repeatable)

Requires authentication (hub login) with a token that has publish scope.

initrunner hub search "code review"
initrunner hub search python --tag automation
FlagDescription
QUERYSearch query (matches name, description, tags)
--tag TEXTFilter by tag (repeatable)

hub info

initrunner hub info owner/package-name
FlagDescription
PACKAGEPackage identifier (owner/name)

Flow Subcommands

SubcommandDescription
flow new <name>Scaffold a new flow project from a pattern
flow up <file>Start orchestration in foreground
flow validate <file>Validate flow definition
flow install <file>Install systemd user unit
flow uninstall <name>Remove systemd unit
flow start <name>Start systemd service
flow stop <name>Stop systemd service
flow restart <name>Restart systemd service
flow status <name>Show service status
flow logs <name>Show journald logs (-f to follow, -n for line count)
flow eventsQuery delegate routing events

See Flow for full multi-agent orchestration documentation.

Flow New Options

Synopsis: initrunner flow new <name> [OPTIONS]

Scaffold a new flow project with role files and flow.yaml. Three patterns are available: chain (linear chain), fan-out (dispatcher + parallel workers), and route (intake with sense-based routing).

FlagDescription
--pattern TEXTComposition pattern: chain, fan-out, route (default: chain)
--agents INTNumber of agents to generate (default varies by pattern)
--shared-memoryEnable shared memory across agents
--provider TEXTModel provider for generated roles
--model TEXTModel name for generated roles
--list-patternsList available composition patterns and exit

Flow Events Options

FlagDescription
--source TEXTFilter by source agent
--target TEXTFilter by target agent
--status TEXTFilter by status (delivered, dropped, filtered, error)
--run-id TEXTFilter by source run ID
--since TEXTStart timestamp (ISO 8601)
--until TEXTEnd timestamp (ISO 8601)
--limit INTMax events to show (default: 100)
--audit-db PATHPath to audit database

MCP List-Tools Options

Synopsis: initrunner mcp list-tools PATH [OPTIONS]

FlagDescription
--index INTTarget a specific MCP tool entry by 0-based index

MCP Serve Options

Synopsis: initrunner mcp serve PATHS... [OPTIONS]

FlagDescription
--transport, -t TEXTTransport: stdio, sse, streamable-http (default: stdio)
--host TEXTHost to bind to (default: 127.0.0.1)
--port INTPort to listen on (default: 8080)
--server-name TEXTMCP server name (default: initrunner)
--pass-throughAlso expose agent MCP tools directly
--audit-db PATHCustom audit database path
--no-auditDisable audit logging
--skill-dir PATHExtra skill search directory

See MCP Gateway for transport details, client configuration, pass-through mode, and usage examples.

A2A Serve Options

Synopsis: initrunner a2a serve PATH [OPTIONS]

Expose an agent as an A2A (Agent-to-Agent) server using Google's open standard for cross-framework agent communication.

FlagDescription
PATHPath to the role YAML file
--host TEXTHost to bind to (default: 127.0.0.1)
--port INTPort to listen on (default: 8000)
--api-key TEXTAPI key for Bearer token auth. When set, all endpoints except the agent card require Authorization: Bearer <key>.
--cors-origin TEXTAllowed CORS origin (repeatable)
--audit-db PATHCustom audit database path
--no-auditDisable audit logging
--skill-dir PATHExtra skill search directory
--model TEXTModel alias or provider:model override

Requires the [a2a] install extra: uv pip install initrunner[a2a].

See A2A Server for agent cards, delegate configuration, and a comparison with --serve and mcp serve.

Vault Subcommands

Synopsis: initrunner vault <command> [OPTIONS]

Since v2026.4.15. Manages the local encrypted credential vault at ~/.initrunner/vault.enc (Fernet + scrypt). The credential resolver checks env vars first, then the vault, so existing api_key_env, token_env, and ${VAR} placeholders keep working without changes. Standard-provider keys resolved from the vault are injected into os.environ so SDK clients (OpenAI, Anthropic, Google) can find them.

Requires the [vault] install extra (or [vault-keyring] to cache the passphrase in your OS keyring): uv pip install initrunner[vault].

SubcommandDescription
initCreate a new vault. Prompts for a passphrase.
set <NAME> [VALUE]Store a credential. Prompts for the value (not echoed) when omitted.
get <NAME>Print a credential value to stdout.
listList credential names. Values are never printed.
rm <NAME>Remove a credential.
import [FILE]Import from a .env or JSON file. Defaults to ~/.initrunner/.env and offers to delete the source after a successful import.
export --env|--json [--out PATH]Export the vault as dotenv or JSON. Output files are written with mode 0600.
rotateRe-encrypt under a new passphrase. Updates the keyring cache when one was set.
verifyConfirm a passphrase decrypts the vault without caching it.
cacheCache the passphrase in the OS keyring (requires [vault-keyring]).
lockClear the keyring-cached passphrase.
statusShow vault path, entry count, last-modified, and cache state.

All commands accept --no-prompt to fail fast in non-interactive use. Pass the passphrase via INITRUNNER_VAULT_PASSPHRASE for CI. The variable is scrubbed from subprocess environments so it cannot leak to child processes.

# One-time setup
initrunner vault init
initrunner vault set OPENAI_API_KEY            # prompts for value
initrunner vault import                        # pull from ~/.initrunner/.env

# Daily use; your existing roles keep working
initrunner run role.yaml -p "hello"

# CI use
INITRUNNER_VAULT_PASSPHRASE=$VAULT_PASS initrunner vault list

Approvals Subcommands

Since v2026.4.17. See Approvals for the full walkthrough.

initrunner pending

Lists unresolved tool-call approvals across every run in the audit database.

initrunner pending

Shows run_id, tool_call_id, tool name, agent name, timestamp, and the first slice of the arguments. Exits 0 with an empty-state message when nothing is pending.

initrunner approve

Synopsis: initrunner approve RUN_ID [OPTIONS]

Resumes a paused run. Every pending call on the run must end up with a decision before the run resumes — anything unresolved by --tool-call-id defaults to denied.

FlagDescription
RUN_IDThe paused run identifier (from pending or from the CLI resume hint).
--allApprove every pending tool call for the run.
--tool-call-id IDDecide only the named call.
--denyInvert the decision. Combine with --all or --tool-call-id.
initrunner approve abc123 --all
initrunner approve abc123 --tool-call-id call_01HW9Q
initrunner approve abc123 --all --deny

Export Agent Spec

Synopsis: initrunner export agent-spec PATH

Since v2026.4.17. Exports a role as a PydanticAI Agent Spec, writing <name>.agent-spec.yaml plus a companion .schema.json in the same directory. Fields outside the Agent Spec overlap (triggers, ingest, memory, skills, sinks, autonomy, reasoning, guardrails, security) are dropped with a warning table — export is lossy by design.

initrunner export agent-spec ./greeter/role.yaml

See Agent Spec Import & Export for the field mapping and round-trip guidance.

Audit Verify-Chain Options

Synopsis: initrunner audit verify-chain [OPTIONS]

Since v2026.4.15. Walks the HMAC-signed audit chain and reports any breaks. Exits non-zero on a missing key or a chain break.

FlagDescription
--audit-db PATHCustom audit database path

See Audit Trail: Tamper-Evident Chain for output fields, exit codes, and key storage.

Audit Security-Events Options

Synopsis: initrunner audit security-events [OPTIONS]

Since v2026.4.16. Queries the security_events audit table and renders the result as a Rich table. Use it to inspect sandboxed tool calls (sandbox.exec) and other security events the runtime logs.

FlagDescription
--event-type TYPEFilter by event type (e.g. sandbox.exec)
--agent NAMEFilter by agent name
--limit NMaximum rows to return (default: 50)
--audit-db PATHCustom audit database path
# Every sandboxed tool call, most recent first
initrunner audit security-events --event-type sandbox.exec

# Just one agent's events
initrunner audit security-events --agent code-runner --limit 200

Every sandboxed call emits a sandbox.exec record with backend, argv0, rc, and duration_ms, attributed to the role's agent name. See Runtime Sandbox: Audit.

On this page