> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Host

> Run programs installed on the host, optionally confined by a sandbox.

What to install and a runnable Python example. The settings, how the workspace connects and the notes are on [Host](https://docs.mirage.strukto.ai/home/setup/machine/host.md), shared by both SDKs.

## Usage

`captures` defaults to `@python` (`python3` and `python`). Add names such as `node` or `tsx`, or
[`@external`](https://docs.mirage.strukto.ai/home/setup/machine/overview#captures) for every program
Mirage does not have itself. Mirage's own commands, pipes and redirects stay
in Mirage: `ffmpeg -i in.mp4 out.webm | wc -c` sends only `ffmpeg`.

```python theme={null}
from mirage import RAMVFS, MountMode, Workspace

ws = Workspace(
    {"/data": RAMVFS()},
    mode=MountMode.EXEC,
    machines={"host": {"provider": "host", "captures": ["@python", "@external"]}},
)
await ws.shell("python3 -c 'print(1 + 1)'; echo hi | cksum")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.