Skip to content
docs
type to search↑↓ move↵ openesc close
v0.3.2github

Quickstart

2 min readv0.3.2this page as markdown
let your agent do it
Install Hermitbox on this machine and run a first sandbox.
Paste it into your agent. It follows this page as Markdown: quickstart.md

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.

shell
curl -fsSL https://hbx.sh | sh

The 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

shell
~/.local/bin/hermitbox run -- echo hello

hermitbox run creates a sandbox, runs the command in it, prints hello and deletes the sandbox.

TypeScript

Install the TypeScript SDK from npm:

shell
npm install hermitbox
typescript
import { 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:

shell
pip install hermitbox
python
from 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:

shell
cargo add hermitbox tokio --features tokio/macros,tokio/rt-multi-thread
rust
use 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:

typescript
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:

text
still here after sleep

On 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 mcp to 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.
run it yourself
$curl -fsSL https://hbx.sh | sh
or ask your agent
Install Hermitbox and set it up for me
Linux (x86_64 or aarch64), no root, no Docker. Agents can read every page: llms.txt · llms-full.txt
the floor · nothing below this line