Skip to content

Command Selection and CLI

NeedRecommended commandNotes
Execute one command immediatelyrauto execBest for fast checks and troubleshooting
Render and execute a stored templaterauto templateBest for reusable command logic
Drive interactive prompt/response flowsrauto flowBest for wizard-like CLI operations
Upload a local file over SFTPrauto uploadRequires the target to expose an sftp subsystem
Run a rollback-aware transaction blockrauto txBest for a single target and one compact transaction unit
Execute a transaction workflow JSONrauto tx-workflowBest for multi-block change workflows
Execute a multi-device planrauto orchestrateBest for staged serial or parallel delivery
Open the local consolerauto webBest for self-managed visual operations
Start a managed execution noderauto agentBest when connecting to rauto-manager

Most execution commands share the same global connection parameters:

ParameterDescription
--hostDevice hostname or IP
--usernameSSH username
--passwordSSH password
--enable-passwordPrivileged mode password
--ssh-portSSH port
--ssh-securityCompatibility profile: secure, balanced, or legacy-compatible
--linux-shell-flavorLinux shell exit-code parsing mode: posix or fish
--device-profileTarget device profile, default is linux
--connectionReference a saved connection by name
--save-connectionSave the effective connection after success
--save-passwordSave password fields together with --save-connection
Terminal window
rauto exec "show ip int br" \
--host 192.168.1.1 \
--username admin \
--password secret \
--device-profile cisco

If you need a specific execution mode:

Terminal window
rauto exec "show bgp neighbor" --connection core-sw-01 --mode Enable
Terminal window
rauto template configure_vlan.j2 \
--vars ./vars.json \
--connection core-sw-01

To render without executing:

Terminal window
rauto template configure_vlan.j2 --vars ./vars.json --dry-run
Terminal window
rauto flow \
--template cisco_like_copy \
--vars-json '{"command":"copy scp: flash:/new.bin","server_addr":"192.168.1.50","remote_path":"/images/new.bin","transfer_username":"backup","transfer_password":"secret"}' \
--connection core-01
Terminal window
rauto upload \
--local-path ./daemon.conf \
--remote-path /tmp/daemon.conf \
--connection linux-jump-01

Execution commands generally support recording:

Terminal window
rauto exec "show version" \
--connection core-sw-01 \
--record-file ./recording.jsonl \
--record-level key-events-only

To inspect a recording, you can first list entries:

Terminal window
rauto replay ./recording.jsonl --list

You can also replay a specific command:

Terminal window
rauto replay ./recording.jsonl --command "show version" --mode Enable

Start by passing --host, --username, and --password directly.

Move to saved connections:

Terminal window
rauto connection add edge-01 \
--host 192.168.1.11 \
--username admin \
--device-profile huawei

Then reuse it consistently:

Terminal window
rauto exec "display version" --connection edge-01

Using saved connections together with inventory group, tx-workflow, and orchestrate is more stable than hand-writing connection flags everywhere.

The current CLI source defines a broader management surface than the quick selection table alone suggests.

Current subcommands from source:

  • list
  • show <name>
  • delete-custom <name>
  • copy-builtin <source> <name> [--overwrite]
  • diagnose <name> [--json]

Current subcommands from source:

  • test
  • list
  • show <name>
  • delete <name>
  • add <name>
  • import <file> [--json]

Current inventory operations:

  • group list [--json]
  • group show <name> [--json]
  • group upsert <name> [--file <path> | --content <json>]
  • group delete <name>
  • resolve-vars [--host <saved-connection>] [--group <name>] [--vars-file <path>] [--vars-json <json>] [--json]

Current subcommands:

  • list <connection-name> [--limit <n>] [--json]
  • show <connection-name> <id> [--json]
  • delete <connection-name> <id>

Current subcommands:

  • list
  • add <pattern>
  • delete <pattern>
  • check <command>

Current subcommands:

  • list
  • show <name>
  • create <name> [--file <path> | --content <template>]
  • update <name> [--file <path> | --content <template>]
  • delete <name>

Current subcommands:

  • list
  • show <name>
  • create <name> [--file <path> | --content <toml>]
  • update <name> [--file <path> | --content <toml>]
  • delete <name>

Current subcommands:

  • create [--output <archive>]
  • restore <archive> [--replace]
  • list
  • rauto device list
  • rauto device show <name>
  • rauto templates list
  • rauto flow-template list
  • rauto connection list
  • rauto history list <connection-name>
  • rauto blacklist list
  • rauto backup list

The source code and README together make it clear that recording is a first-class capability rather than a secondary debugging feature.

Recording-related options currently include:

  • exec/template/flow/upload/tx/tx-workflow --record-file <path>
  • exec/template/flow/upload/tx/tx-workflow --record-level <key-events-only|full>
  • replay <record_file> --list
  • replay <record_file> --command <cmd> [--mode <mode>]

Operational notes from the current README:

  • replayed SessionEvent::CommandOutput entries may include exit_code for Linux shell flows
  • key-events-only is the minimum audit-friendly level
  • full captures richer prompt and state-transition detail

Use command families, not isolated commands

Section titled “Use command families, not isolated commands”

In enterprise usage, rauto is best treated as a command family rather than a single execution command.

A typical operator path often looks like:

  1. connection add to normalize targets
  2. device show or device diagnose to validate profile behavior
  3. template or flow for repeatable task execution
  4. tx / tx-workflow / orchestrate for governed change delivery
  5. history, replay, and backups for audit and recovery

If you already know you need reusable execution logic, continue with Templates and Command Flows.