run

strong-opx run

Execute local script on remote machine

usage: strong-opx run [-h] [--project PROJECT] [--env ENVIRONMENT] [--session SESSION] [--attach] [--no-screen] [--sync-only] [--host HOST] [--context CONTEXT] [-v {0,1,2,3}] [--traceback] [script]

positional arguments

script

Script to execute

options

-h, --help

show this help message and exit

--project <project>

Select project by its name. If missing, strong-opx will attempt to auto-select project based on current working directory and its parents and looking for presence of configured project

--env <environment>

Environment name. If project has only one environment that will be auto selected

--session <session>

An arbitrary name for this session. Session name should be unique

--attach

Restore existing session

--no-screen

Do not run inside screen session

--sync-only

Just sync files with remote

--host <host>

Hostname or IP on which to execute. If not specified, defaults to first hosts in environment

--context <context>

Path to directory use as context. If not specified, defaults to script parent directory

-v {0,1,2,3}, --verbosity {0,1,2,3}

Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output.

--traceback

Raise instead of handling known exceptions

Note

The run command is used to run a command on a remote server. The command is executed in a new shell on the remote server and the output is streamed back to the local terminal. The command is executed as the user that the SSH connection is made with. The command is executed in the directory that the SSH connection is made to.

All the arguments after -- are passed as arguments to the command.