Skip to content

Commit 58be91e

Browse files
kcmartinclaude
andcommitted
Fix CLI examples in quickstart to use correct exec syntax
sprite exec passes arguments directly to the command without shell interpretation. Commands using shell operators (&&, |, >, &) need to be wrapped with `bash -c "..."`. Simple commands don't need quotes. Changes: - Add bash -c wrapper for commands with shell operators - Remove unnecessary quotes from simple commands - Fix auth mode reference from `sprite` to `default` Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent f071a0d commit 58be91e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/content/docs/quickstart.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Execute commands in your Sprite:
6969
sprite exec echo "Hello, Sprites!"
7070

7171
# Run multiple commands
72-
sprite exec "cd /tmp && ls -la"
72+
sprite exec bash -c "cd /tmp && ls -la"
7373

7474
# Open an interactive shell
7575
sprite console
@@ -88,15 +88,15 @@ Your Sprite comes pre-configured with common development tools (Node.js, Python,
8888
See what's already installed and ready to use:
8989

9090
```bash
91-
sprite exec "node --version && python3 --version && go version"
91+
sprite exec bash -c "node --version && python3 --version && go version"
9292
```
9393

9494
### Install a package
9595

9696
Install dependencies just like you would locally—they'll stick around:
9797

9898
```bash
99-
sprite exec "pip install requests"
99+
sprite exec pip install requests
100100
```
101101

102102
### Create and read files
@@ -105,12 +105,12 @@ Files you create persist across sessions. Write once, read anytime:
105105

106106
```bash
107107
# Create a file
108-
sprite exec "echo 'Hello from my persistent Sprite!' > /home/sprite/greeting.txt"
108+
sprite exec bash -c "echo 'Hello from my persistent Sprite!' > /home/sprite/greeting.txt"
109109

110110
# Disconnect, get coffee, come back later...
111111
# Everything is still there!
112-
sprite exec "cat /home/sprite/greeting.txt"
113-
sprite exec "python -c 'import requests; print(requests.__version__)'"
112+
sprite exec cat /home/sprite/greeting.txt
113+
sprite exec python -c "import requests; print(requests.__version__)"
114114
```
115115

116116
Unlike containers that reset on each run, your Sprite keeps your installed packages, files, and entire filesystem intact.
@@ -125,7 +125,7 @@ Start a simple Python server and get your public URL:
125125

126126
```bash
127127
# Start a simple HTTP server on port 8080
128-
sprite exec "python -m http.server 8080 &"
128+
sprite exec bash -c "python -m http.server 8080 &"
129129

130130
# Get your Sprite's public URL
131131
sprite url
@@ -140,7 +140,7 @@ By default, your Sprite's URL requires authentication. To make it publicly acces
140140
sprite url update --auth public
141141
```
142142

143-
The default `sprite` auth mode allows access using a Sprite token with Bearer authentication.
143+
The `default` auth mode requires a Sprite token with Bearer authentication.
144144
</Callout>
145145

146146
### Test on-demand wake-up

0 commit comments

Comments
 (0)