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

Connect the CLI

2 min readv0.3.2this page as markdown
let your agent do it
Run a sandbox from the shell with the Hermitbox CLI.
Paste it into your agent. It follows this page as Markdown: cli.md

Run any command in a fresh sandbox from your shell, or keep a sandbox and work in it step by step. If the CLI isn’t installed yet, run the one-command installer.

To use a Hermitbox installed elsewhere from another Linux machine (x86_64 or aarch64, which npm calls x64 and arm64), install only the CLI, from npm:

shell
npm install -g @hermitbox/cli

Quickstart

shell
hermitbox run -- echo hello

hermitbox run creates a sandbox, runs the command in it, prints hello and deletes the sandbox. On the machine where you installed Hermitbox, the CLI uses the saved credentials by itself. From another machine, set HERMITBOX_API_URL and HERMITBOX_API_KEY.

Sleep and wake with state kept

A sandbox you keep holds its files while it sleeps. Create one, write a file in its data directory, put it to sleep, wake it and read the file back:

shell
id=$(hermitbox sandbox create | jq -r .id)
hermitbox sandbox exec "$id" -- sh -c 'echo "saved before sleep" > notes.txt'
hermitbox sandbox sleep "$id"
hermitbox sandbox wake "$id"
hermitbox sandbox exec "$id" -- cat notes.txt
hermitbox sandbox rm "$id"

Output includes:

text
saved before sleep

See the CLI reference and host boundaries.

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