Installation

Requirements

  • Node.js 18+

Install the package

npm install hive

Start 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-controller

Docker

docker run --rm -p 10000:10000 ghcr.io/hive-run/hive-controller:latest

Basic 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