@nullspace/sdk) gives you on-demand Linux
sandboxes from Node or the browser. Its public surface mirrors the
Python SDK camelCased — same resource names, same
namespacing, same error semantics — so one mental model teaches both languages.
Install
WebSocket, which Node 22+ and all browsers provide.
Configure
Authentication resolves from explicit options first, then the environment:NULLSPACE_API_KEY— required API key.NULLSPACE_API_URL(aliasNULLSPACE_BASE_URL) — base URL.
Quickstart
Create → exec → file → destroy, in under 10 lines:Resources
ASandbox exposes namespaced resources, mirroring Python:
sandbox.commands—run(withonStdout/onStderrstreaming),list,kill,sendStdin,getLogs.sandbox.files—read,write,list,exists,info,makeDir,remove,rename,upload/downloadwith progress callbacks.sandbox.pty—open()returns a handle (send input, resize, async-iterate output,wait(),kill()).sandbox.code—run()streams Jupyter-style execution events over SSE.sandbox.lifecycle—list()history andsubscribe()live events.
Errors
Every failure is a typed subclass ofSandboxError with a stable code,
matching the Python hierarchy: NotFoundError, AuthError, ConflictError,
QuotaExceededError, RateLimitError, TimeoutError, BuildError,
FileUploadError, and more.
Browser support
The REST and SSE core works in browsers; WebSocket (PTY, exec streaming, lifecycle) and filesystem-path helpers are Node-first. WebSocket routes authenticate with thenullspace-api-key subprotocol so browsers work without
setting headers. See the package README for the full support matrix.
Not included
The MCP server and CLI remain Python-owned (nullspace-sdk[cli,mcp]). Some
advanced REST domains the Python SDK exposes are not yet wrapped in the
TypeScript surface; the per-operation coverage manifest lives in
specs/client-surfaces/typescript-sdk.yaml.