Skip to Content
FleetKiteFleetKite

CLI and MCP

Every subcommand, the exit codes, the output artifacts and the read-only MCP service.

Every subcommand

CommandTypical useArguments and behaviour
runfleetkite run --config playbook.yml [options]--config (defaults to config.yml; - reads stdin, up to 16 MiB), --base-dir, --format text|json, --limit, --tags, --skip-tags, -e / --extra-vars (repeatable; accepts k=v, JSON or @file), --var-file (repeatable; loads a YAML or JSON mapping), --concurrency, --timeout (default 30s), --task-timeout (defaults to --timeout), --log (a file or stdout; in JSON mode the console log goes to stderr), --level, --check (dry run), --diff (show file change diffs), --strict, --json-summary ("-" is the same as --format json), --history (append a JSONL history entry), --report-html (write a standalone HTML report)
validatefleetkite validate --config playbook.yml [--strict] [--inline]Validates offline, without opening an SSH connection; --inline validates only the given text (no local directories or inventory are resolved); --strict turns unknown plugin arguments from warnings into errors; --format json is supported
inspectfleetkite inspect --config playbook.yml [--limit ...] [--tags ...]Parses offline: the hosts each play matches (with their effective port and user), the order of the steps, the dry-run behaviour markers (supported / skipped) and static warnings
pluginsfleetkite plugins <action> [args]list / show NAME / verify SRC / install SRC / keygen --out KEY [--pub-out PUB] / sign SRC --key KEY [--output OUT.zip] / lock ID [--project DIR] / trust ID [--roots F | --scopes F] [--yes] / revoke ID. Accepts --version, --sha256 and --format json
schemafleetkite schema [--format json|text]Returns machine-readable metadata (schema_version: 1): every command and subcommand, the defaults of all execution options, the exit code semantics and the complete set of task fields
diagnosefleetkite diagnose --input summary.json [--format json|text]Reads a run JSON summary or the last record of a --history JSONL file and classifies the failure (ssh_host_key, ssh_auth, ssh_connection, check_mode_dependency, assertion, permission, missing_path, timeout, task_failed, no_targets and others), with a suggested fix
templatesfleetkite templates list | show NAME | render NAME --host IP --user USERPrints the built-in read-only draft templates offline (facts and file-stat, no credentials); file-stat needs --path; --port defaults to 22
mcpfleetkite mcpServes the read-only MCP tool set over standard input and output (stdio, 4 MiB per line)
convertfleetkite convert playbook.ymlParses a local playbook and prints it as canonical JSON (note: the output may contain the resolved plaintext connection settings)
vaultFLEETKITE_VAULT_PASS=... fleetkite vault encrypt|decrypt VALUE|-Reads the passphrase from the environment and encrypts or decrypts a $FLEETKITEVAULT$... value with PBKDF2-HMAC-SHA256 + AES-256-GCM
versionfleetkite version [--format text|json]Prints the build version and the Git revision
helpfleetkite help [command]The global help, or the help of one command

Path conflict detection

--config, --var-file, --json-summary, --history, --report-html and --log are checked against each other for path conflicts (including the real path after symlinks are resolved): two outputs or an input and an output may never write to the same physical path.

Exit codes and artifacts

The CLI keeps a stable exit code contract across all commands (fleetkite schema prints it):

Exit codeMeaningUsual cause
0SuccessThe validation passed, or every target host finished
1Execution failedA host was unreachable, or a task failed without being ignored or caught
2Invalid usage or inputA bad argument, invalid YAML or structure, or a failed config / plugin lock check
3No matching targetsAfter play.hosts and --limit filtering, no host needs to run
4Artifact write failedThe tasks succeeded but --json-summary, --history or --report-html could not be written or encoded
130CancelledA SIGINT / SIGTERM (Ctrl+C) interrupted the run

The structured report

The report written by --format json and --json-summary (schema_version: 2):

  • Top-level status: status (success / failed / stopped / no_targets), check_mode, total_servers, success_servers, failed_servers, unreachable_servers, stopped_servers;
  • Counters: statistics (total_plays, total_tasks, start_time, end_time, duration_ms) and tasks (ok, changed, failed, skipped, compensation_ok, compensation_failed, compensation_skipped);
  • Per-host detail: servers[] holds ip / port / user / status / unreachable / plays[] / errors[].

Common artifact combinations

# dry run, then write a structured summary
fleetkite run --config playbook.yml --check --diff --json-summary summary.json

# append a JSONL history entry for diagnose to read
fleetkite run --config playbook.yml --format json --history history.jsonl

# produce a standalone HTML report
fleetkite run --config playbook.yml --report-html report.html

# attribute the failure
fleetkite diagnose --input summary.json

The read-only AI / MCP service

Running fleetkite mcp registers FleetKite as a standard stdio MCP tool backend. It exposes 7 strictly read-only (ReadOnlyHint: true) offline tools and never opens an SSH connection or changes a remote host on its own. This is the recommended way to lower the cost of learning the syntax: let an AI assistant look up the real plugin parameters, write a playbook and validate it offline, and only then hand it to the desktop app or the CLI for a dry run.

  1. list_plugins — every built-in plugin, the three include directives and the installed external plugins, with their --check support;
  2. describe_plugin — a plugin's full argument schema, defaults, descriptions, manifest permissions and example YAML;
  3. describe_cli — the CLI's commands, options, exit codes and the structure of the common task fields;
  4. validate_playbook — offline static syntax and argument validation of the given text (the equivalent of validate --inline);
  5. diagnose_execution — takes the summary object from run --format json and returns the root-cause classification and the actions to take;
  6. list_templates — the built-in read-only draft templates and the arguments they accept;
  7. prepare_template — generates a YAML draft offline from the given arguments, for a human to review.

Registering it with an MCP client

(Claude Desktop, Cursor, Claude Code and any other stdio MCP client)

{
  "mcpServers": {
    "fleetkite": {
      "command": "/absolute/path/to/fleetkite",
      "args": ["mcp"]
    }
  }
}

Prompts that work well

  • Writing a playbook: "Call the FleetKite MCP tools list_plugins and describe_plugin to check the arguments, then write me a playbook that installs Nginx on Ubuntu and Rocky hosts, renders the site configuration and reloads the service. Validate it offline with validate_playbook until it reports no errors."
  • Attributing a failure: "Pass this fleetkite run --format json output to diagnose_execution and tell me what went wrong and how to fix it."

The desktop app and the Go SDK

  • The desktop client (macOS / Linux / Windows) is built on Wails v2 and React, and provides the asset library and group tree, encrypted SSH credentials, the visual playbook, multi-file task and four-directory role editors, the live execution audit, non-blocking SFTP and ZMODEM channels, and the multi-tab, split-pane SSH terminal. See the desktop workbench.
  • The Go SDK and the team web console: an integrator can import the sdk/ module into their own Go service to drive the executor, or run fleetkite-web to give a team read-only review and controlled execution.

Next steps

On this page