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/createos-sandbox

v0.1.1

Published

CreateOS provider for ComputeSDK — NodeOps VM sandboxes with pause/resume/fork snapshots

Readme

@computesdk/createos-sandbox

ComputeSDK provider for CreateOS — NodeOps' createos-sandbox VM sandbox service. Thin adapter over the official @nodeops-createos/sandbox.

Install

npm install computesdk @computesdk/createos-sandbox

Usage

import { compute } from "computesdk";
import { createosSandbox } from "@computesdk/createos-sandbox";

compute.setConfig({
  provider: createosSandbox({
    apiKey: process.env.CREATEOS_SANDBOX_API_KEY,
    baseUrl: process.env.CREATEOS_SANDBOX_BASE_URL,
  }),
});

const sandbox = await compute.sandbox.create({ memoryMb: 1024, image: "devbox:1" });
const { stdout } = await sandbox.runCommand("echo hello");
await sandbox.filesystem.writeFile("/tmp/x.txt", "hi");
await sandbox.destroy();

Configuration

| Field | Env fallback | Notes | |---|---|---| | apiKey | CREATEOS_SANDBOX_API_KEY | Required. createos-sandbox API key. | | baseUrl | CREATEOS_SANDBOX_BASE_URL | Control-plane URL. Optional; defaults to the production control plane. | | shape | — | Default VM shape (e.g. s-1vcpu-1gb). | | rootfs | — | Default rootfs catalog name / template. | | timeout | — | Reported getInfo().timeout (ms). Informational. |

Capability mapping

createos-sandbox sizes VMs from a shape catalog (not free-form cpu/mem), so create() fetches the live catalog (GET /v1/shapes) and maps ComputeSDK's cpus/memoryMb onto the smallest shape that fits. Pass a provider-specific shape to pin one exactly (skips the catalog fetch). With no size pinned, the default is the smallest live shape with ≥1 GiB RAM. image/runtime map to rootfs; ephemeralDiskMb is passed straight through to disk_mib (the control plane validates it; 0/omitted = the shape's default disk).

| ComputeSDK | createos-sandbox | |---|---| | shape selection | GET /v1/shapes (live catalog, nearest fit) | | sandbox.create / getById / list / destroy | POST/GET/DELETE /v1/sandboxes | | sandbox.runCommand | POST /v1/sandboxes/:id/exec (wrapped in sh -c) | | sandbox.getInfo | GET /v1/sandboxes/:id | | sandbox.getUrl({port}) | per-sandbox ingress URL | | filesystem.readFile / writeFile | GET/PUT /v1/sandboxes/:id/files | | filesystem.mkdir / readdir / exists / remove | synthesised via runCommand | | snapshot.create / list / delete | pause / list paused / destroy |

Template builds (/v1/templates) are not exposed through the ComputeSDK provider surface — ComputeSDK's public Provider type can't carry the createos-specific dockerfile create option type-safely. Build templates with the native @nodeops-createos/sandbox client (client.templates.create) directly.

Native escape hatch

ComputeSDK's core surface has no pause/resume/fork. Reach the full @nodeops-createos/sandbox Sandbox handle via getInstance():

const native = sandbox.getInstance();
await native.pause();
await native.resume();
const clone = await native.fork();
await native.attachDisk({ diskId: "my-bucket", mountPath: "/mnt/data" });

Known limitations

  • runCommand env/cwd are synthesised — createos-sandbox drops per-exec env server-side, so env/cwd are injected by wrapping the command in an inline sh -c script. Sandbox-level env should be set at create time (envs).
  • Snapshot semantics differsnapshot.create pauses the sandbox (the source VM stops); the paused sandbox id IS the snapshot id. create({ snapshotId }) forks that paused bundle into a fresh sandbox.
  • getUrl needs ingress + works in-process — sandboxes are created with ingress enabled by default; getUrl is only available for sandboxes created in this process (the SDK handle from getById/list carries no ingress template). Ingress currently serves a non-CA TLS cert and strips the Authorization header upstream — use protocol: "http" / curl -k and don't rely on HTTP auth behind ingress.
  • readdir parses ls output — relies on coreutils ls in the rootfs.

License

MIT