Skip to main content
A foreground command can deliver output as it is produced. Pass a callback, or iterate the events. The call finishes when the command exits.
Each event is one JSON object. stdout and stderr carry data. end carries exit_code and timed_out. ping is a keepalive. A stream always finishes with end or error. Closing this stream stops the command. A non-zero exit is the command’s result, not an API error.