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

Quickstart

3 min readv0.2.1this 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, 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.

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

The 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

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

It prints:

text
hello

hermitbox 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.

shell
# 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.

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

shell
npm install https://github.com/hermitbox/hermitbox/releases/download/v0.2.1/hermitbox-0.2.1.tgz

Save this as quickstart.ts:

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

shell
bun quickstart.ts

Use Python

Install the Python SDK from the release, on Python 3.12 or later:

shell
pip install https://github.com/hermitbox/hermitbox/releases/download/v0.2.1/hermitbox-0.2.1-py3-none-any.whl

Save this as quickstart.py:

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

shell
python3 quickstart.py

Default 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 mcp to 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.
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