Skip to content

aos exec

Run commands, with output streamed or captured

3 commands. Run aos exec --help for the same list from the binary, or see every group.

Run programs. run streams the output to the terminal, capture returns stdout, stderr and the exit code as one JSON object an agent can parse, and shell runs a line through the platform shell so pipes and globs work. run and capture execute the program directly, not a shell, so use shell when you need | or $VAR. There is no sandbox.

Run a command and print stdout, stderr, and exit code as JSON

Terminal window
aos exec capture <command> [args...]
flag values meaning
<command> Required positional argument
Terminal window
aos exec capture git status
aos exec capture -- ls -la

Run a command with its output streamed to this terminal

Terminal window
aos exec run <command> [args...]
flag values meaning
<command> Required positional argument
Terminal window
aos exec run git status

Run a command line through the platform shell

Terminal window
aos exec shell <script>
flag values meaning
<script> Required positional argument
Terminal window
aos exec shell "git log --oneline | head -5"