Install
Usage
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python on the machine too.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run captured programs on a boxd machine.
pnpm add @boxd-sh/sdk
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)
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python on the machine too.
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)'")