Devbox
Devbox-ShellTools

(Deprecated, please use /execute_async) Synchronously execute a shell command on a Devbox

Execute a bash command in the Devbox shell, await the command completion and return the output.

post/v1/devboxes/{id}/execute_sync

Path parameters

idstring required

The Devbox ID.

Request body

commandstring required

The command to execute via the Devbox shell. By default, commands are run from the user home directory unless shell_name is specified. If shell_name is specified the command is run from the directory based on the recent state of the persistent shell.

shell_namestring nullable

The name of the persistent shell to create or use if already created. When using a persistent shell, the command will run from the directory at the end of the previous command and environment variables will be preserved.

Response

OK

devbox_idstring required

Devbox id where command was executed.

stdoutstring required

Standard out generated by command.

stderrstring required

Standard error generated by command.

exit_statusinteger required

Exit status of command execution.

shell_namestring nullable

Shell name.

Changes