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.
Commands
Section titled “Commands”aos exec capture
Section titled “aos exec capture”Run a command and print stdout, stderr, and exit code as JSON
aos exec capture <command> [args...]| flag | values | meaning |
|---|---|---|
<command> |
Required positional argument |
aos exec capture git statusaos exec capture -- ls -laaos exec run
Section titled “aos exec run”Run a command with its output streamed to this terminal
aos exec run <command> [args...]| flag | values | meaning |
|---|---|---|
<command> |
Required positional argument |
aos exec run git statusaos exec shell
Section titled “aos exec shell”Run a command line through the platform shell
aos exec shell <script>| flag | values | meaning |
|---|---|---|
<script> |
Required positional argument |
aos exec shell "git log --oneline | head -5"