Save your API key
Ask the Nullspace team for a beta key, then save it with the hosted API URL:The command prompts for the key and stores it in your local Nullspace config —
no environment variables needed for local use.
The same flow in Python
The CLI quickstart runs the exact SDK flow you would write yourself. Save it locally withnullspace quickstart --write quickstart.py, or create it by
hand:
quickstart.py
python quickstart.py.
A few things worth noticing:
/workspaceis the default mutable work tree; other sandbox-scoped absolute paths like/tmp/result.txtwork too.- The
withblock destroys the sandbox on exit. Without a context manager, callsandbox.kill()when you are done. - The preview URL is a signed link to a port inside the microVM — see Preview URLs.
Configuration for scripts and CI
Environment variables work everywhere the CLI config does:.env, ~/.config/nullspace/config.json,
and ~/.nullspace/config.json. Explicit api_key= and base_url= arguments
override local config when you need per-process values.
Optional: set up Claude Code or Codex locally
Optional: set up Claude Code or Codex locally
If you want Claude Code or Codex on your laptop to build with Nullspace,
install the MCP extra and then the project-local agent pack:This writes local agent docs (
.nullspace/agent-docs/), Claude Code and Codex
skills, managed CLAUDE.md/AGENTS.md blocks, and MCP config. Use
--agent claude-code or --agent codex for a narrower install. The installer
needs no API key, stores no secrets, and never edits user-level files.Troubleshooting
| Symptom | Check |
|---|---|
NULLSPACE_API_KEY is required | Run nullspace auth login --api-url https://api.13-215-85-171.sslip.io, export NULLSPACE_API_KEY, or pass api_key= to Sandbox.create. |
401 or 403 | Confirm the key is active and sent as Authorization: Bearer .... |
| Sandbox create times out | Increase --timeout or timeout= during private beta, or retry when capacity is available. |
| Preview URL does not respond | Bind the server to 0.0.0.0, keep the background process running, then retry sandbox.get_url(port). |
Next steps
Browse recipes
Common next tasks: files, ports, fork, templates, volumes, and raw HTTP.
Run notebook-style code
Stateful Python cells, packages, charts, and artifacts.
Run an agent in a sandbox
Codex, Claude Code, Amp, OpenCode — or deploy your own.
Build a template
Bake dependencies once and launch repeatable sandboxes.