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

@tupper/api

v0.1.2

Published

HTTP API for Tupper sandboxes, built on Hono.

Downloads

20

Readme

@tupper/api

HTTP API for Tupper sandboxes, built on Hono. A thin REST layer over @tupper/sdk — the sandbox backend is resolved per request.

Run the server

Run the standalone server with the tupper-api bin — no install needed. The platform sandbox backend (@tupper/container on macOS, @tupper/firecracker on Linux) is installed automatically as an optional dependency:

npx @tupper/api          # npm
pnpm dlx @tupper/api     # pnpm
bunx @tupper/api         # bun

The port and host are optional — set them with flags or environment variables:

npx @tupper/api --port 8080 --host 0.0.0.0
# or
PORT=8080 HOST=0.0.0.0 npx @tupper/api

From a checkout of this package, bun run start runs the built server (node ./dist/server.mjs) after bun run build.

Configuration

| Flag | Env var | Default | Description | | --- | --- | --- | --- | | --port, -p | PORT | 3000 | Port to listen on. | | --host | HOST | localhost | Hostname/address to bind (use 0.0.0.0 to accept external connections). |

A flag takes precedence over its environment variable. The tupper-api bin uses @hono/node-server (built on node:http), so it runs on both Node and Bun.

Backend resolution

The sandbox backend is resolved once, at boot — when createApp() runs — and reused for the lifetime of the app. There is no per-request backend selection. By default the platform default is auto-detected; pass createApp({ backend }) (a registered name or package specifier) to pin a specific one. If no backend is available, createApp() rejects, so the server fails to start rather than failing on the first request.

The backend package ships as an optional dependency and is installed automatically for the host platform (@tupper/container on macOS, @tupper/firecracker on Linux). To use a different one, install it and pass createApp({ backend }) — see the SDK reference.

Embed in your own Hono app

The standalone server above is the way to run the API. If instead you want the routes inside your own Hono application, createApp() resolves a backend and returns a plain Hono app you can mount:

import { Hono } from "hono";
import { createApp } from "@tupper/api";

const app = new Hono();
app.route("/tupper", await createApp()); // Tupper API now served under /tupper/*

createApp is async (it resolves the backend at boot) and accepts { backend } to pin one. The result is a standard Hono instance, so its .fetch handler also works directly on any Web-standard runtime (Bun, Deno, Cloudflare Workers, …) if you'd rather serve it yourself.

Endpoints

| Method | Path | Body / query | Result | | --- | --- | --- | --- | | GET | /health | — | { ok: true, backend } | | GET | /sandboxes | — | { sandboxes: SandboxInfo[] } | | POST | /sandboxes | CreateSandboxOptions | SandboxInfo (201) | | GET | /sandboxes/:id | — | SandboxInfo | | DELETE | /sandboxes/:id | — | 204 | | POST | /sandboxes/:id/commands | { command, cwd?, env?, user?, timeoutMs? } | ExecResult | | GET | /sandboxes/:id/files | ?path | { path, content } | | PUT | /sandboxes/:id/files | { path, content } | { path } |