| name | Sprites.dev API |
| description | This skill should be used when the user asks about "sprites", "sprite API",
"Sprites.dev", "cloud sandbox", "remote execution with sprites", "sprite CLI",
"sprite filesystem API", "sprite sessions", or needs guidance on working with
Sprites.dev cloud development environments.
|
| version | 1.0.0 |
Sprites.dev API Knowledge
Overview
Sprites.dev provides persistent cloud sandboxes (called "sprites") for running code remotely. Key features:
- Persistent ext4 filesystems that survive hibernation
- Auto-hibernation after 30 seconds of inactivity (no compute cost when idle)
- Instant wake on any request
- Session management for long-running processes
- Filesystem API for direct file operations
CLI Reference
Sprite Management
sprite create <name>
sprite list
sprite use <name>
sprite use
sprite destroy <name>
Command Execution
sprite exec "command"
sprite exec -detachable "command"
sprite exec -env KEY=VAL "command"
sprite exec -dir /path "command"
sprite exec -file local:/remote "cmd"
Session Management
sprite sessions list
sprite sessions attach <id>
sprite sessions kill <id>
Detach from session: Press Ctrl+\ (keeps running in background)
Port Forwarding
sprite proxy <port>
Filesystem API
Base URL: https://api.sprites.dev/v1
Auth: Authorization: Bearer <token>
Write File
curl -X PUT \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary "@localfile.txt" \
"https://api.sprites.dev/v1/sprites/NAME/fs/write?path=remote.txt&workingDir=/home/sprite&mkdir=true"
Read File
curl -H "Authorization: Bearer $TOKEN" \
"https://api.sprites.dev/v1/sprites/NAME/fs/read?path=file.txt&workingDir=/home/sprite"
List Directory
curl -H "Authorization: Bearer $TOKEN" \
"https://api.sprites.dev/v1/sprites/NAME/fs/list?path=.&workingDir=/home/sprite"
Delete
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"path":"file.txt","workingDir":"/home/sprite","recursive":false,"asRoot":false}' \
"https://api.sprites.dev/v1/sprites/NAME/fs/delete"
Authentication
Token stored in ~/.sprites/sprites.json after running sprite org auth.
Extract token:
jq -r '.token' ~/.sprites/sprites.json
Best Practices
- Use detachable sessions for long-running processes (dev servers, builds, tests)
- Sync git-tracked files rather than entire directories to avoid bloat
- Port forward for accessing web UIs running in sprites
- Check sessions before creating new ones to avoid orphaned processes
- Sprites hibernate automatically - no need to manually stop them
- Use checkpoints for creating clean restore points (filesystem snapshots)
Common Patterns
Development Server
sprite create my-dev
sprite use my-dev
sprite exec -detachable "npm run dev"
sprite proxy 3000
CI-style Execution
sprite exec "npm install && npm test && npm run build"
Background Build
sprite exec -detachable "npm run build:watch"
sprite sessions list