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

@omnirun/sdk

v0.5.0

Published

TypeScript SDK for OmniRun sandboxes

Readme

@omnirun/sdk

TypeScript SDK for OmniRun sandboxes.

Install

npm install @omnirun/sdk
pnpm add @omnirun/sdk
bun add @omnirun/sdk

Configuration

The SDK resolves configuration in this order:

  1. Explicit options passed to SDK methods.
  2. Environment variables: OMNIRUN_API_URL, OMNIRUN_API_KEY.
  3. Default API URL: https://api.omnirun.io.

Quickstart

import { Sandbox } from "@omnirun/sdk";

const sbx = await Sandbox.create("python-3.11", {
  apiKey: process.env.OMNIRUN_API_KEY,
  apiUrl: process.env.OMNIRUN_API_URL,
  timeout: 300,
});

const result = await sbx.commands.run("python3 -c \"print('hello')\"");
console.log(result.stdout);

await sbx.kill();

Files

await sbx.files.write("/tmp/input.txt", "hello");
const content = await sbx.files.read("/tmp/input.txt");
const bytes = await sbx.files.read("/tmp/input.txt", "bytes");

Signed URLs

const uploadUrl = await sbx.uploadUrl("/tmp/report.json");
const downloadUrl = await sbx.downloadUrl("/tmp/report.json");

Use uploadUrl with multipart form-data when you need to move artifacts across the sandbox boundary.

Streaming

const command = await sbx.commands.run("for i in 1 2 3; do echo $i; sleep 1; done", {
  background: true,
});

for await (const event of command) {
  if (event.type === "stdout") {
    process.stdout.write(event.data ?? "");
  }
}

Production controls

await sbx.production.setNetworkPolicy({
  allowDomains: ["api.openai.com"],
});

const metrics = await sbx.production.metrics();
const snapshots = await sbx.production.metricsSnapshots();

Integration tests

Integration tests are opt-in:

OMNIRUN_API_URL=https://api.omnirun.io \
OMNIRUN_API_KEY=<key> \
RUN_OMNIRUN_INTEGRATION=1 \
npm run test:integration

Hosted API smoke examples

OMNIRUN_API_URL=https://<your-api-host> \
OMNIRUN_API_KEY=<key> \
npm run examples:hosted

Hosted example suites live in examples/hosted/.

E2EE scaffold (client key bootstrap)

The SDK can generate a client keypair and send clientPublicKey during sandbox creation:

import { Sandbox } from "@omnirun/sdk";

const sbx = await Sandbox.create("python-3.11", {
  apiUrl: process.env.OMNIRUN_API_URL,
  apiKey: process.env.OMNIRUN_API_KEY,
  e2ee: true,
});

console.log(sbx.e2ee?.clientPublicKey);
console.log(sbx.e2ee?.serverPublicKey); // available when backend returns it

Protocol scaffold details: docs/E2EE-PROTOCOL-SCAFFOLD.md.

API Surface

  • Sandbox
  • Commands / CommandHandle
  • Filesystem
  • Pty / PtySession
  • Contexts
  • Production
  • Webhooks