npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@computesdk/sandbox0

v1.0.3

Published

Sandbox0 provider for ComputeSDK - fast persistent sandboxes with command execution and native filesystem access

Readme

@computesdk/sandbox0

Sandbox0 provider for ComputeSDK. Create fast persistent sandboxes, run shell commands, and use native filesystem operations through the official Sandbox0 JavaScript SDK.

Installation

npm install computesdk @computesdk/sandbox0

Setup

Create a team API key and export it:

export SANDBOX0_TOKEN=your_sandbox0_token

SANDBOX0_BASE_URL is optional and defaults to the public Sandbox0 API at https://api.sandbox0.ai. For automated team workloads, set it to the team's home-region endpoint so requests go directly to the regional gateway.

An interactive access token can also be used by setting both SANDBOX0_TOKEN and SANDBOX0_TEAM_ID.

Usage

import { compute } from 'computesdk';
import { sandbox0 } from '@computesdk/sandbox0';

compute.setConfig({
  provider: sandbox0({
    token: process.env.SANDBOX0_TOKEN,
    hardTtl: 600,
  }),
});

const sandbox = await compute.sandbox.create({
  templateId: 'coding-agent',
  memory: 256,
});

const result = await sandbox.runCommand('node --version');
console.log(result.stdout);

await sandbox.filesystem.writeFile('/tmp/hello.txt', 'Hello from Sandbox0');
console.log(await sandbox.filesystem.readFile('/tmp/hello.txt'));

await sandbox.destroy();

Configuration

| Option | Environment variable | Default | Description | |---|---|---|---| | token | SANDBOX0_TOKEN or SANDBOX0_API_KEY | required | Team API key, or an access token when teamId is set | | teamId | SANDBOX0_TEAM_ID | none | Team ID required with access-token authentication | | baseUrl | SANDBOX0_BASE_URL | SDK default | Sandbox0 API endpoint | | templateId | SANDBOX0_TEMPLATE | coding-agent | Template used for new sandboxes | | ttl | - | platform default | Soft runtime TTL in seconds | | hardTtl | - | platform default | Hard sandbox TTL in seconds | | memory | - | template default | Memory in MiB or a quantity such as 1Gi | | envs | - | none | Default environment variables | | commandTimeout | - | none | Default command timeout in milliseconds |

Per-create templateId, snapshotId, memory, envs, ttl, hardTtl, and autoResume options override provider defaults where applicable. Numeric memory values are interpreted as MiB.

Feature support

| Feature | Supported | |---|---| | Create / getById / list / destroy | Yes | | Shell commands | Yes, through sh -lc | | Command cwd, environment, timeout, and background mode | Yes | | Filesystem | Yes, through Sandbox0's native file API | | Public URLs | Yes, for public services already configured on the sandbox | | Restore from snapshot | Yes, with snapshotId at create time | | Snapshot management | Use the native Sandbox0 SDK |

Foreground runCommand calls start an asynchronous Sandbox0 Context, follow its WebSocket terminal event, and read the final result from the Context API. If the WebSocket disconnects, the provider polls the Context until it exits. The command timeout is also applied as the Context TTL, and a timed-out call attempts to delete the Context.

destroy is idempotent and retries short-lived throttling or server failures. Setting hardTtl is still recommended for automated workloads so a failed client cannot leave a sandbox indefinitely.

For Sandbox0-specific capabilities such as pause/resume, services, snapshots, volumes, and observability, call sandbox.getInstance() to access the native sandbox0 SDK handle.

License

MIT