https://github.com/buddy/sandbox-sdk
TypeScript SDK for managing Buddy sandboxes - isolated Ubuntu environments for running commands
https://github.com/buddy/sandbox-sdk
api automation buddy buddyworks cd ci ci-cd cicd cloud devops isolated isolation nodejs sandbox sdk sdk-ts sdk-typescript typescript ubuntu
Last synced: 3 months ago
JSON representation
TypeScript SDK for managing Buddy sandboxes - isolated Ubuntu environments for running commands
- Host: GitHub
- URL: https://github.com/buddy/sandbox-sdk
- Owner: buddy
- License: mit
- Created: 2026-01-05T06:04:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-26T16:47:29.000Z (4 months ago)
- Last Synced: 2026-01-27T01:48:32.101Z (4 months ago)
- Topics: api, automation, buddy, buddyworks, cd, ci, ci-cd, cicd, cloud, devops, isolated, isolation, nodejs, sandbox, sdk, sdk-ts, sdk-typescript, typescript, ubuntu
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@buddy-works/sandbox-sdk
- Size: 213 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Buddy Sandbox SDK
TypeScript SDK for managing Buddy sandboxes - isolated Ubuntu environments for running commands.
## Installation
```bash
npm install @buddy-works/sandbox-sdk
```
## Usage
```typescript
import { Sandbox } from "@buddy-works/sandbox-sdk";
const identifier = "my-sandbox";
let sandbox: Sandbox;
try {
sandbox = await Sandbox.getByIdentifier(identifier);
} catch {
sandbox = await Sandbox.create({
identifier,
name: "My Sandbox",
os: "ubuntu:24.04",
});
}
await sandbox.start();
await sandbox.runCommand({
command: "ping -c 5 buddy.works",
});
await sandbox.stop();
```
Set required environment variables:
```bash
export BUDDY_TOKEN="your-api-token"
export BUDDY_WORKSPACE="your-workspace"
export BUDDY_PROJECT="your-project"
export BUDDY_REGION="US" # Optional: US (default), EU, or AP
```
## Regions
Configure the API region:
```bash
# Via environment variable (recommended)
export BUDDY_REGION="EU"
```
```typescript
// Or via connection config
const sandbox = await Sandbox.create({
identifier: "my-sandbox",
name: "My Sandbox",
os: "ubuntu:24.04",
connection: {
region: "EU" // US, EU, or AP
}
});
```
## Connection overrides
Override workspace/auth per call:
```typescript
await Sandbox.create({
identifier: "my-sandbox",
name: "My Sandbox",
os: "ubuntu:24.04",
connection: {
workspace: "different-workspace",
project: "different-project",
token: "custom-token",
region: "EU"
}
});
```