Installation
How to install and configure the Runra SDK
Install the SDK
The Runra JavaScript/TypeScript SDK is available via npm:
npm install runra
Or with Bun:
bun add runra
Environment variables
Set these environment variables to configure the SDK:
| Variable | Required | Description |
|---|---|---|
RUNRA_API_KEY | Yes | Your Runra API key |
RUNRA_API_URL | No | API base URL (defaults to https://box.runra.dev) |
RUNRA_TEMPLATE_ID | No | Default sandbox template |
SDK configuration
You can also configure the SDK programmatically:
import { configure, Sandbox } from "runra";
configure({
apiKey: process.env.RUNRA_API_KEY,
// Optional: override API URL
apiUrl: "https://box.runra.dev",
// Optional: default template
template: process.env.RUNRA_TEMPLATE_ID,
});
const sandbox = await Sandbox.create();
Provider options
The Runra SDK supports multiple sandbox providers:
| Provider | Description |
|---|---|
runra-sandbox | Hosted Runra Sandbox (recommended) |
cubesandbox | Self-hosted CubeSandbox |
docker | Local Docker |
e2b | E2B Code Interpreter |
TypeScript support
The SDK is written in TypeScript and includes full type definitions. No additional packages needed.
import { Sandbox } from "runra";
The SDK is backed by the E2B code-interpreter client, so the returned sandbox exposes E2B-compatible methods such as runCode(), commands.run(), files.write(), and files.read().
Next steps
- Quick Start — build your first sandbox
- Setup Guide — production configuration
- SDK Reference — full API reference