Quickstart
Install Hermitbox on this machine and run a first sandbox.
Install Hermitbox, run a first sandbox that prints hello, then put a sandbox to sleep and find
its files still there when it wakes.
Install
Run this on Linux (x86_64 or aarch64) as your own user. It needs no root and no Docker.
curl -fsSL https://hbx.sh | shThe installer starts Hermitbox and saves its credentials privately, where the CLI, hermitbox mcp
and the SDKs find them. New shells find hermitbox on PATH; in this shell, call
~/.local/bin/hermitbox.
Your first sandbox
Shell
~/.local/bin/hermitbox run -- echo hellohermitbox run creates a sandbox, runs the command in it, prints hello and deletes the
sandbox.
TypeScript
Install the TypeScript SDK from npm:
npm install hermitboximport { Hermitbox } from 'hermitbox'
const hb = new Hermitbox()
const box = await hb.sandbox()
console.log((await box.run('echo hello')).stdout.trim())
await box.delete()Python
Install the Python SDK from PyPI, on Python 3.12 or later:
pip install hermitboxfrom hermitbox import Hermitbox
with Hermitbox() as hb:
box = hb.sandbox()
print(box.run('echo hello').stdout.strip())
box.delete()Rust
Add the hermitbox crate from crates.io and Tokio, on Rust 1.99 or later:
cargo add hermitbox tokio --features tokio/macros,tokio/rt-multi-threaduse hermitbox::Hermitbox;
#[tokio::main]
async fn main() -> hermitbox::Result<()> {
let hb = Hermitbox::new()?;
let sandbox = hb.sandbox().await?;
println!("{}", sandbox.run("echo hello").await?.stdout.trim());
sandbox.delete().await?;
Ok(())
}Sleep and wake, keeping your files
Sleep stops a sandbox’s compute and keeps its data directory. Wake it, and your files are where you left them:
import { Hermitbox } from 'hermitbox'
const hb = new Hermitbox()
const box = await hb.sandbox()
try {
await box.write('notes.txt', 'still here after sleep')
await box.sleep()
await box.wake()
console.log(await box.read('notes.txt'))
} finally {
await box.delete()
}Output:
still here after sleepOn the machine you installed on, the CLI and SDKs connect by themselves, with no environment
variables. From another machine, set HERMITBOX_API_URL and HERMITBOX_API_KEY; hermitbox config key prints the saved key.
Next steps
- Connect your agent: paste one prompt into your agent, or add
hermitbox mcpto it yourself. - TypeScript, Python, Rust and CLI: snapshots, forks, running generated code and shell workflows.
- Concepts: sandboxes, their lifecycle, isolation tiers and templates.
- Hosting: run Hermitbox on a server, a platform that runs images, or a fleet of machines.
$curl -fsSL https://hbx.sh | shInstall Hermitbox and set it up for me