Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 36 additions & 11 deletions src/content/docs/cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ sprite list --prefix dev

### `sprite destroy`

Destroy the current sprite
Destroy a sprite

```bash
sprite destroy [options]
sprite destroy [options] [sprite-name]
```

**Options:**
Expand All @@ -245,8 +245,9 @@ sprite destroy [options]

**Examples:**
```bash
sprite destroy
sprite destroy -o myorg -s mysprite
sprite destroy mysprite
sprite destroy -o myorg mysprite
sprite destroy -s mysprite
sprite destroy --force
```

Expand Down Expand Up @@ -319,40 +320,64 @@ sprite console -o myorg -s mysprite

### `sprite checkpoint create`

Error: sprite name required: use -s flag or create a .sprite file
Create a new checkpoint

```bash
sprite checkpoint create
```

**Options:**
- `-c, --comment <string>` - Optional comment to describe this checkpoint
- `-h, --help` - Show help for this command

### `sprite checkpoint list`

Error: sprite name required: use -s flag or create a .sprite file
List all checkpoints

```bash
sprite checkpoint list
sprite checkpoint list [options]
```

**Aliases:** `sprite checkpoint ls`, `sprite checkpoints ls`

**Options:**
- `-h, --help` - Show help for this command
- `-h, --history <string>` - Filter by history version Include auto-generated checkpoints

### `sprite checkpoint info`

Error: sprite name required: use -s flag or create a .sprite file
Show information about a specific checkpoint

```bash
sprite checkpoint info <version-id>
```

**Options:**
- `-h, --help` - Show help for this command

**Examples:**
```bash
sprite checkpoint info
sprite checkpoint info v2
```

### `sprite checkpoint delete`

Error: sprite name required: use -s flag or create a .sprite file
Delete a checkpoint (soft delete)

```bash
sprite checkpoint delete
sprite checkpoint delete <version-id>
```

**Aliases:** `sprite checkpoint rm`

**Options:**
- `-h, --help` - Show help for this command

**Examples:**
```bash
sprite checkpoint delete v3
```

### `sprite restore`

Restore from a checkpoint version
Expand Down
25 changes: 0 additions & 25 deletions src/content/docs/cli/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,31 +80,6 @@ sprite use my-project-sprite

This creates a `.sprite` file that the CLI reads automatically. Add `.sprite` to your `.gitignore` as it's user-specific.

## Optional: Mount Helper Function

Add this function to your shell configuration (`~/.zshrc` or `~/.bashrc`) to easily mount your Sprite's filesystem locally:

```bash
sc() {
local sprite_name="${1:-$(sprite use)}"
local mount_point="/tmp/sprite-${sprite_name}"
mkdir -p "$mount_point"
sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 \
"sprite@${sprite_name}.sprites.dev:" "$mount_point"
cd "$mount_point"
}
```

Usage:

```bash
sc my-sprite # Mount and cd to sprite's home directory
```

<Callout type="info">
This requires `sshfs` to be installed. On macOS, install with `brew install macfuse sshfs`. On Linux, use your package manager: `apt install sshfs` or `yum install fuse-sshfs`.
</Callout>

## Troubleshooting

### Permission Denied
Expand Down
26 changes: 13 additions & 13 deletions src/content/docs/working-with-sprites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Sprites give you three main ways to interact:
Run a single command, wait for it to finish, get the output. Perfect for scripts, package installs, or quick checks.

```bash
sprite exec "ls -la"
sprite exec "npm install express"
sprite exec ls -la
sprite exec npm install express
sprite exec -tty vim
```

Expand All @@ -46,7 +46,7 @@ sprite console
All TTY sessions are automatically detachable. Start a command, disconnect with `Ctrl+\`, and reattach later. Great for dev servers, long builds, or background processes.

```bash
sprite exec -tty "npm run dev" # start a TTY session
sprite exec -tty npm run dev # start a TTY session
# Press Ctrl+\ to detach

sprite sessions list # list running sessions
Expand Down Expand Up @@ -79,7 +79,7 @@ Wake-up is fast:
Use TTY sessions to keep things running without going `cold`. You can detach with `Ctrl+\` and reattach later to see all the output.

```bash
sprite exec -tty "rails server"
sprite exec -tty rails server
# Press Ctrl+\ to detach, use `sprite sessions attach <id>` to reattach
```

Expand Down Expand Up @@ -151,9 +151,9 @@ Sprites run Ubuntu 24.04 LTS with common tools preinstalled:
Install packages like you would locally:

```bash
sprite exec "pip install pandas numpy"
sprite exec "npm install -g typescript"
sprite exec "cargo install ripgrep"
sprite exec pip install pandas numpy
sprite exec npm install -g typescript
sprite exec cargo install ripgrep
```

They persist across hibernation. No rebuilds needed.
Expand All @@ -162,7 +162,7 @@ They persist across hibernation. No rebuilds needed.
**Storage space**: Each Sprite has 100 GB of persistent storage. Check usage with:

```bash
sprite exec "df -h"
sprite exec df -h
```
</Callout>

Expand All @@ -175,7 +175,7 @@ sprite exec "df -h"
```bash
sprite use my-sprite
# Now all commands target this sprite
sprite exec "echo hello"
sprite exec echo "hello world"
```

### List and Filter
Expand Down Expand Up @@ -314,16 +314,16 @@ kill $(lsof -t -i:2000)
- [Contact support](https://fly.io/dashboard/support) if persistent

**Storage full:**
- Clean up files: `sprite exec "du -sh /home/sprite/*"`
- Clean up files: `sprite exec bash -c "du -sh /home/sprite/*"`
- Delete old checkpoints
- Create a new Sprite for additional workloads

**Quick debugging:**

```bash
sprite exec "ps aux" # running processes
sprite exec "df -h" # disk space
sprite exec "free -h" # memory usage
sprite exec ps aux # running processes
sprite exec df -h # disk space
sprite exec free -h # memory usage
```

---
Expand Down