diff --git a/src/content/docs/cli/commands.mdx b/src/content/docs/cli/commands.mdx index 1a2e026..d2e973d 100644 --- a/src/content/docs/cli/commands.mdx +++ b/src/content/docs/cli/commands.mdx @@ -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:** @@ -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 ``` @@ -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 ` - 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 ` - 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 +``` + +**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 ``` **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 diff --git a/src/content/docs/cli/installation.mdx b/src/content/docs/cli/installation.mdx index c4b9e47..26de5f6 100644 --- a/src/content/docs/cli/installation.mdx +++ b/src/content/docs/cli/installation.mdx @@ -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 -``` - - -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`. - - ## Troubleshooting ### Permission Denied diff --git a/src/content/docs/working-with-sprites.mdx b/src/content/docs/working-with-sprites.mdx index 255ecfc..5af8d0d 100644 --- a/src/content/docs/working-with-sprites.mdx +++ b/src/content/docs/working-with-sprites.mdx @@ -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 ``` @@ -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 @@ -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 ` to reattach ``` @@ -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. @@ -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 ``` @@ -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 @@ -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 ``` ---