Skip to main content
POST
Run a command and stream its output

Authorizations

Authorization
string
header
required

Your Styne API key: Authorization: Bearer $STYNE_API_KEY.

Path Parameters

id
string
required

Body

application/json

Run one command and wait for it to finish. Give cmd (run through a shell unless argv is set) or argv.

cmd
string

The command line.

args
string[]

Arguments appended to cmd.

argv
string[]

The command as an argument vector, run without a shell.

shell
string

Shell used for cmd; /bin/sh when left out.

envs
object

Environment variables for this command (also accepted as env or envVars).

cwd
string

Working directory.

user
string

User to run as.

timeoutMs
integer

Milliseconds before the command is stopped.

stdin
boolean

Keep standard input open for later input calls.

pty
any

Run on a pseudo-terminal of this size ({rows, cols}).

Response

Success. The answer is described on https://docs.styne.ai/exec.