Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

shell

This package lets Cairo code spawn a command on the host machine and capture its standard output. It uses the shell oracleprotocol. Each call is a one‑shot subprocess: no processes are kept alive between invocations. The standard error is routed to executor's log stream.

The command line is parsed and executed by a minimal cross-platform shell, the same that powers deno tasks.

Use it primarily in tests, prototypes, or local development scenarios where you need to call small utilities, format data, or fetch information that would be cumbersome to embed in Cairo directly.

Fully qualified path: shell

Free functions

execExecutes a shell command and returns its exit code and standard output. Prefer using output if you only care about successful commands and want an error otherwise....
outputRuns a shell command and returns its stdout on success. If the underlying command exits with a non‑zero status, an error is returned which message includes the exit code....

Type aliases

ExitCodeExit status returned by a shell command.
StdoutCaptured standard output ( stdout ) of a shell command.
ResultResult type re‑export for convenience.