Skip to content

Quickstart

Sprites are cloud VMs that feel like persistent dev environments. You can run commands, install packages, create files—and everything stays exactly how you left it. Unlike containers that reset each time, Sprites remember your entire filesystem between sessions.

The magic: when you’re not using your Sprite, it goes to sleep. Send a command or HTTP request, and it wakes up instantly. Everything is right where you left it.

This guide will walk you through creating your first Sprite. In just a few minutes, you’ll have a persistent development environment that responds to HTTP traffic and remembers everything between runs.

Install with our install script (macOS/Linux):

Terminal window
curl -fsSL https://sprites.dev/install.sh | sh

This script auto-detects your platform, verifies checksums, and installs the latest Sprite CLI to ~/.local/bin.

For Windows or manual installation, see CLI Installation.

Verify installation:

Terminal window
sprite --help

Sprites uses your Fly.io account for authentication:

Terminal window
sprite org auth

This opens a browser window to authenticate with Fly.io.

Terminal window
sprite create my-first-sprite

This creates a new Sprite with default configuration, running and ready to accept commands.

Set it as your active Sprite to avoid adding -s my-first-sprite to every command:

Terminal window
sprite use my-first-sprite

Use sprite list to see all your Sprites, or sprite destroy my-first-sprite when you’re done with one. You can have multiple Sprites running simultaneously—each with its own isolated environment.

Execute commands in your Sprite:

Terminal window
# Run a simple command
sprite exec echo "Hello, Sprites!"
# Run multiple commands
sprite exec "cd /tmp && ls -la"
# Open an interactive shell
sprite console

Your Sprite comes pre-configured with common development tools (Node.js, Python, Go, Git, and more). Here’s the magic: everything you install or create persists between commands.

See what’s already installed and ready to use:

Terminal window
sprite exec "node --version && python3 --version && go version"

Install dependencies just like you would locally—they’ll stick around:

Terminal window
sprite exec "pip install requests"

Files you create persist across sessions. Write once, read anytime:

Terminal window
# Create a file
sprite exec "echo 'Hello from my persistent Sprite!' > /home/sprite/greeting.txt"
# Disconnect, get coffee, come back later...
# Everything is still there!
sprite exec "cat /home/sprite/greeting.txt"
sprite exec "python -c 'import requests; print(requests.__version__)'"

Unlike containers that reset on each run, your Sprite keeps your installed packages, files, and entire filesystem intact.

Every Sprite has a unique HTTP URL and can serve traffic. This makes it perfect for testing APIs, hosting prototypes, or running background services.

Start a simple Python server and get your public URL:

Terminal window
# Start a simple HTTP server on port 8080
sprite exec "python -m http.server 8080 &"
# Get your Sprite's public URL
sprite url

Visit the URL in your browser—you’ll see Python’s directory listing page. Your Sprite automatically routes HTTP traffic to port 8080 and wakes up to handle requests.

Here’s where it gets cool. Close your terminal, wait a minute, then visit the URL again. Your Sprite wakes up automatically to serve the request. That’s the magic of on-demand wakeup—no manual starting or stopping required.


The CLI is perfect for day-to-day development, but if you’re building tools, automation workflows, or integrating Sprites into your application, the SDKs give you programmatic control. Use them to dynamically create environments, orchestrate workloads, or embed Sprites into your product.

import { SpritesClient } from '@fly/sprites';
const client = new SpritesClient(process.env.SPRITE_TOKEN);
const sprite = await client.createSprite('my-sprite');
// Execute a command
const result = await sprite.execFile('python', ['-c', "print('hello')"]);
console.log(result.stdout);
// Stream output from long-running commands
const cmd = sprite.spawn('bash', ['-c', 'for i in {1..10}; do date +%T; sleep 0.5; done']);
for await (const line of cmd.stdout) {
process.stdout.write(line);
}
await sprite.delete();

Working with Sprites

Sessions, ports, persistence, and everything beyond the basics

CLI Reference

Complete command-line documentation