Commands

vakna shell: run a command in a box

Note
This page is generated from a mock CLI, and its numbers are placeholders.

Verified against vakna 0.0.0-mock on · generated from the CLI's own definitions

vakna shell: run a command in a box; its output and exit code pass through.

Synopsis

sh
vakna shell <box> -- <command>

Flags

Flag Default What it does
--format <format> text text, or json: one JSON object per line
--json off the same as --format json
-h, --help off this help

Examples

Example

sh
vakna shell api -- pnpm test
prints 212 passed, 0 failed ran pnpm test · exit 0 38.24s

Exit code 0.

Another example

sh
tar c . | vakna shell api -- tar x -C /src
prints ran tar x -C /src · exit 0 0.40s

Exit code 0.

When it fails

sh
vakna shell docs -- ls
prints vakna: box docs is suspended hint: vakna resume docs # suspended 2h 10m

Exit code 255.

Exit codes

Code Meaning
0 ok
2 usage: a missing argument, an unknown flag or command
255 vakna failed under shell, run, try or fork

JSON output

With --format json (or --json) every line is one JSON object. v is the format's version; mocked marks numbers from the mock.

sh
vakna shell api --json -- pnpm test
prints 212 passed, 0 failed {"v":1,"event":"ran","box":"api","id":"sbx_eu1a_01JB7X9K3M4N5P6Q7R8S9T0V1W","command":"pnpm test","exit":0,"ms":38240,"mocked":true}

Errors

--help

This page and the help text come from one definition.

Output
vakna shell · run a command in a box; its output and exit code pass through usage vakna shell <box> -- <command> flags --format <format> text, or json: one JSON object per line (default: text) --json the same as --format json (default: off) -h, --help this help (default: off) examples vakna shell api -- pnpm test tar c . | vakna shell api -- tar x -C /src exit codes 0 ok 2 usage: a missing argument, an unknown flag or command 255 vakna failed under shell, run, try or fork

View as Markdown