CLI reference
ry exec
Run a command in a running machine and exit with its exit code (the command goes after --).
ry exec [options] [app] -- <command> [args...]Arguments
Section titled “Arguments”[app]: The app (default: “app” from rytiv.json in this directory or above).
Options
Section titled “Options”-m, --machine <id>: Which machine (default: a running one of the app).-i, --interactive: Pass this terminal’s stdin to the command.-t, --tty: Allocate a terminal in the machine (with -i: an interactive shell).-e, --env <KEY=VALUE>: Env for this command only (repeatable).--dir <path>: Working directory in the machine (absolute).--timeout <seconds>: Stop the command after this many seconds (exit code 124).--no-wake: Fail instead of waking a sleeping machine.
Example
Section titled “Example”ry exec web -- ls -la /appry exec dev-1 --dir /data -- git statusFrom ry exec --help:
Examples: ry exec shop -- ls -la /app ry exec -m m-1234 -e DEBUG=1 --dir /srv -- ./migrate.sh ry exec shop -it -- sh
Exit code: the command's own; 128+n if a signal ended it; 124 on --timeout; 127/126 if itwas not found / not executable; 255 for everything of ry's own (with a `ry:` line on stderr).Ctrl-C sends SIGINT, a second one SIGTERM, a third SIGKILL.