> ## 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.

# boxd

> Run captured programs on a boxd machine.

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

## Install

```bash theme={null}
pnpm add @boxd-sh/sdk
```

```typescript theme={null}
import { Boxd } from '@boxd-sh/sdk'

const boxd = new Boxd({ region: 'fra' })
const machine = await boxd.machines.create({ name: 'mirage-box', isolated: true })
await boxd.machines.waitUntilReady(machine.id)
console.log(machine.id)
```

## Usage

`captures` defaults to [`@external`](https://docs.mirage.strukto.ai/home/setup/machine/overview#captures):
every program Mirage does not have itself. Name `@python` to run
Python on the machine too.

```typescript theme={null}
import { MountMode, RAMVFS, Workspace } from '@struktoai/mirage-node'

const ws = new Workspace(
  { '/data': new RAMVFS() },
  {
    mode: MountMode.EXEC,
    machines: {
      box: {
        provider: 'boxd',
        machineId: 'machine-id',
        region: 'fra',
        captures: ['@python', '@external'],
      },
    },
  },
)
await ws.shell("python3 -c 'print(1 + 1)'")
```


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