Command Selection and CLI

Command selection guide

NeedRecommended commandNotes
Execute one command immediatelyrauto execBest for fast checks and troubleshooting
Run a configured show object by profilerauto showMaps objects like interfaces or route to real commands
Run parsed checks across many saved targetsrauto show --target/--group/--labelBest for inventory-wide read-only queries
Fetch complete configurations and hashesrauto config fetchBest for backup and drift detection
Discover SSH devices on a networkrauto device discoverScans, identifies, filters, and saves connections
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

Shared connection parameters

Most execution commands share the same global connection parameters:

ParameterDescription
--hostDevice hostname or IP
--credentialReusable device credential name or stable ID
--ssh-portSSH port
--ssh-securityCompatibility profile: secure, balanced, or legacy-compatible
--linux-shell-flavorLinux shell exit-code parsing mode: posix or fish
--device-profile, -dTarget device profile, default is autodetect
--force-autodetectIgnore cached autodetect result and probe again
--connection, -cReference a saved connection by name
--save-connection, -SSave the effective connection after success
--session-retriesOpt-in transient failure retries; default 0
--retry-initial-backoff-ms / --retry-max-backoff-msBound exponential retry delays

Execution modes can be ordered candidates such as --mode 'Enable,Config' or --mode 'Root|User'. rauto validates the candidates against the selected Profile, then rneter uses the first reachable mode.

Common examples

exec

rauto exec "show ip int br" \
  --host 192.168.1.1 \
  --credential network-admin \
  --device-profile cisco_ios

If you need a specific execution mode:

rauto exec "show bgp neighbor" --connection core-sw-01 --mode Enable

exec, flow, show, and config fetch also accept repeatable --target, --group, and --label/--tag selectors with bounded --max-parallel concurrency.

Enable TextFSM parsing for raw command output:

rauto exec "show version" \
  --connection core-sw-01 \
  --parse-textfsm

Export parsed rows to Excel:

rauto exec "show version" \
  --connection core-sw-01 \
  --parse-textfsm \
  --textfsm-excel ./show-version.xlsx

--textfsm-excel also enables TextFSM parsing, so --parse-textfsm is optional in this example.

show

rauto show interfaces --connection core-sw-01

Useful inspection flags:

rauto show --list --device-profile cisco_ios
rauto show route --connection core-sw-01 --print-command
rauto show interfaces --connection core-sw-01 --no-parse
rauto show interfaces --connection core-sw-01 --textfsm-strict-errors

Batch show over saved targets:

rauto show interfaces \
  --target core-sw1 \
  --target core-sw2 \
  --group access \
  --label campus

rauto show route --group core --tag prod --textfsm-excel ./routes.xlsx

show parses with TextFSM by default. Continue with Show Objects and TextFSM for catalog, parsing, Excel export, and custom mapping details.

template

rauto template configure_vlan.j2 \
  --vars ./vars.json \
  --connection core-sw-01

To render without executing:

rauto template configure_vlan.j2 --vars ./vars.json --dry-run

flow

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

The same flow can run across a deduplicated target set:

rauto flow --template cisco_like_copy --group access --max-parallel 4

config fetch

rauto config fetch --group core --kind running --output-dir ./configs

See Configuration Fetch and Drift Hashes for catalog overrides, normalization, and output rules.

device discover

rauto device discover 192.168.60.0/24 --credential network-admin

See Automatic Device Discovery for filters, TUI controls, and safe connection import.

upload

rauto upload \
  --local-path ./daemon.conf \
  --remote-path /tmp/daemon.conf \
  --connection linux-jump-01

Recording and replay

Execution commands generally support recording:

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:

rauto session replay ./recording.jsonl --list

You can also replay a specific command:

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

Ad-hoc phase

Create a credential once, then pass --host and --credential for direct targets.

rauto credential add network-admin

Repetitive execution phase

Move to saved connections:

rauto connection add edge-01 \
  --host 192.168.1.11 \
  --credential network-admin \
  --device-profile huawei

Then reuse it consistently:

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

Multi-device phase

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

Full management command families

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

rauto profile

Current subcommands from source:

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

rauto device / rauto connection

Current subcommands from source:

  • test
  • list
  • show <name>
  • delete <name>
  • add <name>
  • import <file> [--json]
  • discover <targets...> [--port ...] [--probe-credential ...] [--auto-save]
  • discover list [--status ...] [--profile ...] [--port ...] [--search ...] [--json]
  • discover save [host[:port] ...] [--profile ...] [--overwrite]

rauto credential

Current credential operations:

  • list [--json]
  • show <name-or-id> [--json]
  • add <name> [--login-username ...] [--enable] [--json]
  • update <name-or-id> [--name ...] [--enable|--disable-enable] [--json]
  • import <file> [--json]
  • delete <name-or-id>

Credential secrets are encrypted separately from connection metadata. Continue with Device Credentials for the full lifecycle.

rauto inventory

Current inventory operations:

  • group list [--json]
  • group show <name> [--json]
  • group upsert <name> [--file <path> | --content <json>]
  • group delete <name>

Groups contain a name, optional description, and saved connection host names. Variables remain execution inputs rather than inventory-group state.

rauto session

Current subcommands:

  • list [connection-name] [--limit <n>] [--json]
  • show [id] [--json|--raw]
  • delete <id>
  • replay [record-file] [--id <id>] [--list] [--command <cmd>] [--mode <mode>]

rauto blacklist

Current subcommands:

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

rauto templates

Current subcommands:

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

rauto flow-template

Current subcommands:

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

rauto textfsm

Current subcommands from source:

  • template list
  • template show <name>
  • template create <name> [--file <path> | --content <textfsm>]
  • template update <name> [--file <path> | --content <textfsm>]
  • template delete <name>
  • mapping list [--profile <profile>]
  • mapping set --profile <profile> --command <command> --template <name>
  • mapping delete --profile <profile> --command <command>

rauto show-object

Current subcommands from source:

  • list [--profile <profile>]
  • set --profile <profile> --object <object> --command <command> [--mode <mode>] [--textfsm-template <name>] [--textfsm-mapping-command <command>] [--disabled]
  • delete --profile <profile> --object <object>

rauto tx-workflow template

Current saved workflow template operations:

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

rauto orchestrate template

Current saved orchestration template operations:

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

rauto backup

Current subcommands:

  • create [--output <archive>]
  • restore <archive> [--replace]
  • list

Other useful management commands

  • rauto profile list
  • rauto profile autodetect -v
  • rauto profile show <name>
  • rauto templates list
  • rauto flow-template list
  • rauto textfsm template list
  • rauto show-object list --profile <name>
  • rauto connection list
  • rauto session list <connection-name>
  • rauto blacklist list
  • rauto backup list

Recording and replay details

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>
  • session replay <record_file> --list
  • session replay <record_file> --command <cmd> [--mode <mode>]
  • session replay --id <record-id> --list

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

Operational guidance

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. profile autodetect, profile show, or profile diagnose to validate profile behavior
  3. show for read-only operational checks and TextFSM parsing
  4. template or flow for repeatable task execution
  5. tx / tx-workflow / orchestrate for governed change delivery
  6. session list/show/replay and backups for audit and recovery

If you need parsed read-only operational data, continue with Show Objects and TextFSM.