Desktop CLI

The Desktop build of DR-Terminal ships a command-line interface. Useful for IDE integrations, scripting and automation.

Usage

DR-Terminal connect <target> [flags]

Flags

FlagDescription
-u, --userUser name (for host:port targets).
-p, --passwordPassword on the command line (insecure — may hit shell history).
--password-stdinRead password from stdin (safe: pass show server | DR-Terminal ...).
-i, --identityPrivate key file (PEM).
-j, --jumpChain of jump hosts by name, e.g. bastion1,bastion2.
-c, --commandShell snippet: injected after login (default) or executed headlessly with --exec.
--new-tabForce opening a new tab in the running instance.
--execHeadless: run command, stream stdout/stderr, exit with the remote exit code.
-h, --helpShow this help.

Examples

# Open a new tab in the running instance and log into saved "lager"
DR-Terminal connect lager --new-tab

# Ad-hoc host with user and key
DR-Terminal connect 10.0.0.1:22 -u pi -i ~/.ssh/id_ed25519 --new-tab

# Jump chain: bastion1 → bastion2 → target
DR-Terminal connect production -j bastion1,bastion2 --new-tab

# Headless exec — prints uptime and exits
DR-Terminal connect lager --exec -c 'uptime'

# CLI start script: run commands after login
DR-Terminal connect dev --new-tab -c 'cd /srv/app && tmux attach -t main'

Symlink into PATH

After installing (or after ./gradlew :composeApp:createDistributable) create a symlink so the command works globally:

sudo ln -s /path/to/DR-Terminal/bin/DR-Terminal /usr/local/bin/dr-terminal
dr-terminal connect lager --exec -c 'df -h'

Single-instance

DR-Terminal keeps one instance per user (Unix domain socket or named pipe on Windows). A second DR-Terminal connect ... forwards its args to the running instance and exits — the running instance then opens a new tab.

Previous
SFTP
Next
Security & data