Skip to content

Commit 62771c9

Browse files
kcmartinclaude
andauthored
Fix CLI examples in quickstart to use correct exec syntax (#113)
Co-authored-by: Claude Opus 4.5 <[email protected]>
1 parent f071a0d commit 62771c9

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/content/docs/quickstart.mdx

Lines changed: 15 additions & 13 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.
@@ -121,17 +121,19 @@ Every Sprite has a unique HTTP URL and can serve traffic. This makes it perfect
121121

122122
### Serve HTTP
123123

124-
Start a simple Python server and get your public URL:
124+
First, get your Sprite's public URL:
125125

126126
```bash
127-
# Start a simple HTTP server on port 8080
128-
sprite exec "python -m http.server 8080 &"
129-
130-
# Get your Sprite's public URL
131127
sprite url
132128
```
133129

134-
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.
130+
Then start a simple Python server:
131+
132+
```bash
133+
sprite exec python -m http.server 8080
134+
```
135+
136+
Visit the URL in your browser—you'll see Python's directory listing page. Press `Ctrl+C` to stop the server when you're done. Your Sprite automatically routes HTTP traffic to port 8080 and wakes up to handle requests.
135137

136138
<Callout type="info">
137139
By default, your Sprite's URL requires authentication. To make it publicly accessible, run:
@@ -140,7 +142,7 @@ By default, your Sprite's URL requires authentication. To make it publicly acces
140142
sprite url update --auth public
141143
```
142144

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

146148
### Test on-demand wake-up

0 commit comments

Comments
 (0)