CLI Reference

All Rocannon subcommands. For per-module help: rocannon <fqcn> --help.

rocannon quickstart

Scaffold a localhost profile and print MCP client wiring.

rocannon quickstart [--dir DIR] [--force]
FlagDefaultDescription
--dir.rocannonDirectory to write the profile and inventory
--forcefalseOverwrite existing files

Writes quickstart.yml (profile) and inventory.ini (localhost), then prints the exact claude mcp add and .mcp.json snippets for your client.

rocannon mcp serve

Start the MCP server. This is the command your MCP client runs.

rocannon mcp serve [--profile PROF] [--inventory INV] [--modules MOD]
                  [--transport stdio|http] [--log-level LEVEL]
FlagDefaultDescription
--profile / -pauto-discoverProfile path or name from .rocannon/profiles/
--inventory / -inoneInventory file (repeatable). Alternative to --profile.
--modules / -mnoneModule/collection/namespace spec (repeatable)
--transportstdiostdio for MCP clients; http for HTTP/SSE transport
--log-levelINFODEBUG / INFO / WARNING / ERROR

Environment variables that tune the server:

VariableDefaultDescription
ROCANNON_TIMEOUT300Global execution timeout per tool call (seconds)
ROCANNON_IDLE_TIMEOUT60Idle timeout within a run
ROCANNON_MAX_CONCURRENT_TOOLS10Global concurrent tool call cap
ROCANNON_MAX_CONCURRENT_PER_HOST3Per-host concurrent cap
ROCANNON_MAX_RESPONSE_BYTES1 000 000Max response size before truncation
ROCANNON_LOG_FORMATtextSet to json for structured JSON logs
ROCANNON_DATA_DIRCWDRoot for .rocannon/playbooks/ writes

rocannon mcp doctor

Construct the MCP server in-process and report what registered.

rocannon mcp doctor [--profile PROF] [--inventory INV] [--modules MOD]

Prints tool count, resource count, resource template count, and prompt count. Use this to verify your profile before pointing an LLM at it.

rocannon doctor

System health check: binaries, inventory parsing, optional connectivity ping.

rocannon doctor [--profile PROF] [--inventory INV] [--ping]
FlagDescription
--pingSmoke-test SSH connectivity to each inventory host

Checks: rocannon/fastmcp/ansible-core/ansible-runner versions, binary locations, env vars, configured timeouts, inventory host counts, Ansible config resolution.

rocannon repl

Interactive operator shell. Drives the same MCP server in-process with tab completion, call history, and .save to write playbooks.

rocannon repl [--profile PROF] [--inventory INV] [--modules MOD]

REPL dot commands:

CommandDescription
.helpShow all commands
.target [HOST]Show or set the default target for module calls
.inventoryList loaded hosts and groups
.modulesList registered module tools
.doc <module>Show parsed schema for a module
.historyRecent calls this session
.resourcesList MCP resources
.promptsList saved playbook prompts
.save <name> ["desc"]Commit this session as a playbook
.ai <prompt>LLM-driven mode (requires rocannon[ai] + ROCANNON_AI_MODEL)
.exitQuit

Module call syntax: <module> target=<host> key=value ...

rocannon> ping target=webservers
rocannon> ansible.builtin.command target=db01 cmd="systemctl status postgresql"
rocannon> .save check-db "verify postgresql is running"

rocannon run

Execute a single module ad-hoc, routing through the same executor the server uses.

rocannon run <module> --target HOST -i INV [--arg key=val] [--args-file FILE]
            [--timeout SECS] [--check] [--diff] [--pretty]
rocannon run ansible.builtin.copy --target webservers -i hosts \
  --arg src=/etc/nginx/nginx.conf --arg dest=/etc/nginx/nginx.conf.bak \
  --check --diff --pretty

rocannon <fqcn>

Invoke a module directly as a top-level subcommand. Flags are generated from ansible-doc at call time.

rocannon ansible.builtin.copy --target h1 -i hosts --src /etc/app.conf --dest /etc/app.conf
rocannon ansible.builtin.command --target db01 -i hosts --cmd "pg_dump mydb" --record session.yml
Reserved flagDescription
--target / -tHost or group from inventory (required)
--inventory / -iInventory file (overrides profile)
--profile / -pProfile to resolve inventory from
--record FILEAppend this call to FILE as an Ansible play
--checkDry-run (if the module supports it)
--diffShow what would change
--prettyPretty-print JSON output
--timeout SECSOverride execution timeout

rocannon doc

Print the parsed schema for a module, in the same representation the MCP server builds.

rocannon doc ansible.builtin.copy
rocannon doc community.docker.docker_container --json

rocannon search

Find modules by name or description substring, case-insensitive.

rocannon search postgres --limit 20
rocannon search "manage users"

rocannon ls

List hosts, groups, or modules from a profile or inventory.

rocannon ls hosts   --profile prod
rocannon ls groups  --inventory hosts.yml
rocannon ls modules --profile staging

rocannon playbook

Manage saved playbooks under .rocannon/playbooks/.

rocannon playbook list
rocannon playbook show  <name>
rocannon playbook run   <name> -i hosts [--check] [--diff] [--pretty]

playbook run bypasses the LLM and executes the saved steps directly through the executor. Fails fast on the first step that returns a non-successful status.