Quickstart
Install Hermitbox on this machine and run a first sandbox.
Install Hermitbox, create a sandbox, run echo hello in it and delete it. Do it from the CLI
first, then the same steps from TypeScript or Python.
Install Hermitbox
Run the installer as your own user. Linux (x86_64 or aarch64), no root, no Docker.
curl -fsSL https://hbx.sh | shThe installer starts Hermitbox and prints a JSON summary. apiUrl is your API URL, and apiKey
is your key, printed on the first install only. Both are also saved privately for the CLI and
hermitbox mcp.
Check it works
~/.local/bin/hermitbox run -- echo helloIt prints:
hellohermitbox run creates a sandbox, runs one command in it and deletes it. New shells find
hermitbox on your PATH. In the shell you installed from, use ~/.local/bin/hermitbox.
Use the CLI
The CLI reads the credentials the installer saved. This block uses jq to read the new
sandbox’s ID.
# Create a sandbox and save its ID.
SANDBOX_ID=$(hermitbox sandbox create | jq -r .id)
# Run a command in it.
hermitbox sandbox exec "$SANDBOX_ID" -- echo hello
# Delete it when you're done.
hermitbox sandbox rm "$SANDBOX_ID"hermitbox sandbox create prints the new sandbox as JSON. With no tier named, the sandbox runs on
the host’s default tier. On a host that serves only containers, add --image alpine:3.22 to
create.
Set the URL and key
The SDKs read HERMITBOX_API_URL and HERMITBOX_API_KEY from the environment. Use the apiUrl
the installer printed. hermitbox config key prints the saved key.
export HERMITBOX_API_URL='<api-url>'
export HERMITBOX_API_KEY="$(hermitbox config key)"Keep the key in your process’s private environment, never in a file you share.
Use TypeScript
Install the TypeScript SDK from the release:
npm install https://github.com/hermitbox/hermitbox/releases/download/v0.2.1/hermitbox-0.2.1.tgzSave this as quickstart.ts:
import { Hermitbox } from 'hermitbox'
// Read HERMITBOX_API_URL and HERMITBOX_API_KEY from the environment.
const hb = new Hermitbox()
// Create a sandbox on the host's default tier.
const box = await hb.sandbox()
// Run a command in it.
const result = await box.run('echo hello')
console.log(result.stdout) // hello
// Delete it when you're done.
await box.delete()Run it with Bun or your project’s TypeScript runner:
bun quickstart.tsUse Python
Install the Python SDK from the release, on Python 3.12 or later:
pip install https://github.com/hermitbox/hermitbox/releases/download/v0.2.1/hermitbox-0.2.1-py3-none-any.whlSave this as quickstart.py:
from hermitbox import Hermitbox
# Read HERMITBOX_API_URL and HERMITBOX_API_KEY from the environment.
hb = Hermitbox()
# Create a sandbox on the host's default tier.
box = hb.sandbox()
# Run a command in it.
result = box.run('echo hello')
print(result.stdout) # hello
# Delete it when you're done.
box.delete()Run it:
python3 quickstart.pyDefault tier
These examples name no tier and no image, so Hermitbox picks process or wasm. On a host that
serves only containers, or whose default tier is container, pass an image to hb.sandbox():
{ image: 'alpine:3.22' } in TypeScript, image='alpine:3.22' in Python. See
Isolation tiers.
Next steps
- Connect your agent: paste one prompt into your agent, or add
hermitbox mcpto it yourself. - 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