Runpak is a local developer tool for interactively testing npm and pnpm packages in real Browser and Node.js runtimes.
Point Runpak at a local package root, write a small TypeScript or JavaScript entry file, then run it without creating a throwaway app.
pnpm installpnpm startRunpak starts at:
http://localhost:7777
- Enter a package root path. The directory must contain
package.json. - Choose
BrowserorNode.js. - Write code in the editor.
- Import the package by its real package name and exported subpaths.
- Use
console.log,console.warn, orconsole.errorto inspect output. - Use
returnto show the primary result. - Click
Run.
Move the cursor inside a call to see its expanded argument and return types in the Types pane below the script. Promise results show their awaited shape. Nested types expand automatically; recursive types and very large shapes show a labelled limit.
Drag the pane dividers to resize them. Panel sizes, code, package path, and runtime are remembered across reloads. The trash button clears saved settings and restores the default layout.
The Return pane is read-only. Use the arrows beside the line numbers to collapse or expand response objects and arrays. Its copy button copies the full response, including collapsed sections.
Example:
import { createClient } from "example-package/client";
const client = createClient({ environment: "staging" });
const result = await client.items.list();
return result;Runpak does not install or build your package. Build the package yourself first if your source needs compilation.