Install
Usage
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python in the sandbox too.
@struktoai/mirage-core/machine/e2b/handle once
to register the provider (pnpm add @struktoai/mirage-core), pass
apiKey, and use mountType: 'fuse' or leave it unset.
Connecting the workspace
Pick amount_type. ssh and both do not work in browsers, and
each file call is about 150 ms for a small file from a laptop. With fuse,
base the template on the machine image
and run mirage workspace create /tmp/sandbox.yaml in the sandbox.
A template for ssh
Build a template withsshfs and pass its sandbox ID as sandbox_id:
In a browser
Import the E2B machine from core (pnpm add @struktoai/mirage-core), which
also registers the e2b provider for machines:, and pass apiKey:
mountType ssh and both need Node, so a browser
uses fuse or none.