msb CLI. Python SDK and Node.
Installation
Installmsb 0.7.8 or later on the host and put it on PATH. Create a
sandbox from an image with sh, your programs, and the tools needed for
connecting the workspace:
Usage
captures defaults to @external.
Add python3 to run Python programs in the guest too.
- Python
- TypeScript
- YAML
Connecting the workspace
A program in the sandbox opens workspace files at the same paths as in Mirage. Setmount_type in Python or YAML, or mountType in TypeScript:
sshshares the host workspace through guestsshfs.fuseuses a Mirage workspace running inside the guest.bothkeeps the guest’s own mounts and uses ssh for the rest.- Unset leaves file access to you.
ssh
Addmount_type: ssh to the config (mountType: 'ssh' in TypeScript).
Install mirage-ai[ssh] on a Python host or ssh2 on a Node host. The
guest needs sshfs and access to /dev/fuse, but no Mirage installation,
SSH keys or open port. In ssh and both, each runtime instance serves
its first session only.
fuse
Use the sandbox image, which carries Mirage andfuse3. Put the same mounts at the same paths
in a sandbox.yaml inside the guest:
Runtime behavior
Notes
- Keep the sandbox running while Mirage is connected. Reconnect after a restart.
- Closing the runtime leaves the sandbox running.
- A timeout cancels the CLI call. The guest agent cleans up that call’s commands; filesystem cleanup may take longer.
- Commands share the sandbox’s files and processes. Use one sandbox per tenant.
- Environment values are passed as CLI arguments. Avoid secrets on hosts shared with untrusted users.