Installation
Requirements
- Node.js 18+
Install the package
npm install hiveStart the controller
The Hive controller manages sandboxes and runs locally at http://localhost:10000 by default.
Binary
Download hive-controller from the releases page and run it:
hive-controllerDocker
docker run --rm -p 10000:10000 ghcr.io/hive-run/hive-controller:latestBasic usage
index.ts
import { getOrCreateSandbox } from "hive";
const sandbox = await getOrCreateSandbox("my-sandbox", {
fs: [{ backend: "local", mount: "/workspace", acls: [{ path: "/workspace/**", access: "rw" }] }],
});Remote controller
To connect to a controller running elsewhere, pass gatwayUrl:
index.ts
const sandbox = await getOrCreateSandbox("my-sandbox", config, {
gatwayUrl: "https://hive.internal.example",
});Next: Getting Started