Skip to content

CLI Reference

Running glidesh with no subcommand opens the interactive console against ./inventory.kdl if one exists in the current directory. Equivalent to glidesh console.

Terminal window
cd my-fleet/
glidesh # opens the console TUI

If no inventory is present in the working directory, glidesh exits with an error suggesting --inventory <path>.

Connection console: opens the interactive TUI when invoked with no --target and no --command; otherwise behaves like a shell — interactive PTY for a single host, broadcast TUI for multiple hosts, or one-shot exec when --command is set. See the dedicated Console page for full details on the TUI.

glidesh console [OPTIONS]
FlagShortDescriptionDefault
--inventory <PATH>-iPath to the inventory file./inventory.kdl
--target <NAME>-tTarget filter: group name, host name, or group:hostname
--command <CMD>-cCommand to run (skips the TUI; runs on resolved targets)
--key <PATH>-kSSH private key path~/.ssh/id_ed25519
--concurrency <N>Max concurrent hosts when running a command (minimum 1)10
--no-host-key-checkSkip SSH host key verificationfalse
--accept-new-host-keyAccept and save unknown host keysfalse
--target--commandBehavior
Console TUI (requires a TTY)
single host resolvedInteractive PTY shell
multiple hosts resolvedBroadcast group shell TUI
anysetRun command, stream [hostname]-prefixed output

Interactive PTY on a single host:

Terminal window
glidesh console -i inventory.kdl -t web-1

Run a command across a group, stream prefixed output:

Terminal window
glidesh console -i inventory.kdl -t web -c "df -h /"
[web-1] /dev/sda1 50G 40G 10G 80% /
[web-2] /dev/sda1 50G 25G 25G 50% /
[web-3] /dev/sda1 50G 45G 5G 90% /

Broadcast TUI across a group (no -c):

Terminal window
glidesh console -i inventory.kdl -t web

The console resolves SSH keys using the same resolution order as run.

Execute a plan against target hosts.

glidesh run [OPTIONS]
FlagShortDescriptionDefault
--plan <PATH>-pPath to the plan file
--inventory <PATH>-iPath to the inventory file
--target <NAME>-tTarget filter: group name, host name, group:hostname, or a comma-separated list of any of these
--host <ADDR>Single host for ad-hoc mode
--user <USER>-uSSH user (ad-hoc mode only)root
--port <PORT>-PSSH port22
--key <PATH>-kSSH private key path~/.ssh/id_ed25519
--command <CMD>-cAd-hoc command to run
--mode <MODE>-mExecution mode: sync or asyncsync
--concurrency <N>Max concurrent hosts10
--dry-runCheck only, no changes appliedfalse
--no-tui-TDisable TUI, use plain text outputfalse
--no-host-key-checkSkip SSH host key verificationfalse
--accept-new-host-keyAccept and save unknown host keys to known_hostsfalse
--secrets <PATH>Path to the secrets filesecrets.kdl next to the inventory
--ask-secret-passPrompt for the secrets passphrase (else GLIDESH_SECRET_PASS)false
--secret-pass-file <PATH>Read the secrets passphrase from the first line of a file
--secret-identity <PATH>SSH private key that unlocks an age-wrapped secrets file--key, else ~/.ssh/id_ed25519

The SSH private key is resolved in this order (first match wins):

  1. --key CLI flag
  2. ssh-key variable from the inventory (global, group, or host vars)
  3. ~/.ssh/id_ed25519 (default)

Run a single command on a host without a plan or inventory:

Terminal window
glidesh run --host 192.168.1.10 -u deploy -c "uptime"

Run a plan against an inventory:

Terminal window
glidesh run -i inventory.kdl -p plan.kdl

Filter to a specific group or host:

Terminal window
glidesh run -i inventory.kdl -p plan.kdl -t web
glidesh run -i inventory.kdl -p plan.kdl -t web-1

Run on an arbitrary subset by passing a comma-separated list of targets — each token can be a group name, a host name, or group:host:

Terminal window
glidesh run -i inventory.kdl -p plan.kdl -t web-1,web-3,db-1

When --plan is omitted, each resolved target uses its own plan= (host-level wins over group-level); targets without an associated plan are skipped.

Combine --host with --plan to run a plan against a single host without an inventory file:

Terminal window
glidesh run --host 192.168.1.10 -u deploy -p plan.kdl

The host uses the --user (default root) and --port (default 22) flags. Plan vars are applied as usual.

When --plan is omitted but --inventory is provided, glidesh runs the plan= attributes defined in the inventory (per-group or per-host). See Inline Plans.

Terminal window
glidesh run -i inventory.kdl

View logs from past runs. Logs are stored in ~/.glidesh/runs/.

glidesh logs [OPTIONS]
FlagDescription
--lastShow the last run
--node <NAME>Filter by node name
--run <DIR>Specific run directory
Terminal window
glidesh logs --last
glidesh logs --last --node web-1
glidesh logs --run 20250115_143022_setup

Validate configuration files without executing anything.

glidesh validate [OPTIONS]
FlagShortDescription
--plan <PATH>-pValidate a plan file
--inventory <PATH>-iValidate an inventory file
Terminal window
glidesh validate -p plan.kdl
glidesh validate -i inventory.kdl
glidesh validate -p plan.kdl -i inventory.kdl

A secrets.kdl discovered beside the inventory is parsed too, so a malformed provider block or an unknown provider is caught here rather than mid-run. Only the file is parsed — validation never asks for the passphrase and never decrypts a value.

Manage encrypted secrets. See Secrets for the full workflow and how values are decrypted and redacted at run time.

glidesh secret <COMMAND>
CommandDescription
initCreate a secrets file and generate + wrap a data key. --provider age --recipient <KEY_OR_PATH> wraps it to SSH public keys instead of a passphrase (repeatable)
listList the names in the file and whether each is encrypted (no passphrase needed)
set <KEY> [VALUE]Encrypt a value under a key (prompts for the value if omitted)
get <KEY>Decrypt and print a stored value. Pass a secret:v1:… token instead of a key to decrypt it directly
decrypt <KEY>Alias for get
rm <KEY>Delete a value from the file (alias: remove)
encryptRead plaintext on stdin, print a secret:v1:… token
rekeyRe-wrap the data key under a new passphrase (value tokens unchanged)
rekey --rotate-data-keyGenerate a new data key and re-encrypt every value in the file under it
recipients listShow who can unlock an age-wrapped file (no key needed)
recipients add <KEY_OR_PATH>Grant access to another SSH public key
recipients rm <NAME>Revoke a recipient, rotating the data key unless --keep-data-key
editOpen the secrets file in $VISUAL/$EDITOR with values transiently decrypted

Every subcommand accepts --file <PATH> (default secrets.kdl). The passphrase comes from GLIDESH_SECRET_PASS, then GLIDESH_SECRET_PASS_FILE, then an interactive prompt. list and rm need no passphrase at all. rekey takes the new passphrase from --new-pass-file <PATH> when given, since the ordinary sources already hold the current one. An age-wrapped file takes an SSH private key instead of a passphrase: --secret-identity <PATH> is accepted by every secret subcommand and may be given before or after it, falling back to GLIDESH_SECRET_IDENTITY and then ~/.ssh/id_ed25519.

Terminal window
glidesh secret get db-password --secret-identity ~/.ssh/work_ed25519
Terminal window
glidesh secret init
glidesh secret set db-password
GLIDESH_SECRET_PASS= glidesh secret get db-password
VariableDescription
RUST_LOGControl log verbosity. Default is glidesh=info. Set to glidesh=debug or glidesh=trace for troubleshooting.
GLIDESH_SECRET_PASSSecrets passphrase, for non-interactive run / secret commands (else --ask-secret-pass / prompt).
GLIDESH_SECRET_PASS_FILEPath to a file whose first line is the secrets passphrase. Honoured by every subcommand; outranked by --secret-pass-file and GLIDESH_SECRET_PASS.
GLIDESH_SECRETSPath to the secrets file, overriding auto-discovery.
GLIDESH_SECRET_IDENTITYSSH private key that unlocks an age-wrapped secrets file. Honoured by every subcommand; outranked by --secret-identity.
GLIDESH_RUNAS_PASSPrivilege-escalation password for run-as (else --ask-pass).
Terminal window
RUST_LOG=glidesh=debug glidesh run -i inventory.kdl -p plan.kdl