Skip to content

Conversation

@jbellerb
Copy link

@jbellerb jbellerb commented Jan 19, 2026

Note that the sprite exec tee command doesn't currently work (it will produce an invalid file and then hang). This is a bug with how sprite exec handles stdin for non-interactive commands. This should be fixed shortly.

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

CLI Documentation Generator

Metric Value
CLI Version 0.0.1
Commands Generated 24
Tests ✅ 0/0 passed
📚 Commands documented
  • sprite login
  • sprite logout
  • sprite org auth
  • sprite org list
  • sprite org logout
  • sprite org keyring disable
  • sprite org keyring enable
  • sprite auth setup
  • sprite create
  • sprite use
  • sprite list
  • sprite destroy
  • sprite exec
  • sprite console
  • sprite checkpoint create
  • sprite checkpoint list
  • sprite checkpoint info
  • sprite checkpoint delete
  • sprite restore
  • sprite proxy
  • sprite url
  • sprite url update
  • sprite api
  • sprite upgrade

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Preview Deployment

Name URL
Preview https://pr-88-superfly-sprites-docs.fly.dev

Commit: 771716a

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Lighthouse Results

URL Performance Accessibility Best Practices SEO
/ 🟢 90 🟢 100 🟢 96 🟢 100
/working-with-sprites/ 🟢 98 🟢 100 🟢 100 🟢 100

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

E2E Test Results

✅ Tests success

Ran against: https://pr-88-superfly-sprites-docs.fly.dev

@kcmartin
Copy link
Collaborator

Review feedback

The sprite exec tee stdin issue can be worked around by embedding the key content directly in the command:

sprite exec -s my-sprite bash -c "mkdir -p .ssh && echo '$(cat ~/.ssh/id_*.pub)' >> .ssh/authorized_keys"

This replaces both commands:

sprite exec mkdir -p .ssh
cat ~/.ssh/id_*.pub | sprite exec tee -a .ssh/authorized_keys

Benefits:

  • Avoids the stdin bug entirely
  • Combines two commands into one
  • SSH public keys are base64 (no single quotes), so the escaping is safe

Alternative using the -f file upload flag:

sprite exec -s my-sprite -f ~/.ssh/id_ed25519.pub:/tmp/key.pub bash -c "mkdir -p .ssh && cat /tmp/key.pub >> .ssh/authorized_keys"

Also note the commands need -s flags to specify which sprite, unless users run sprite use first (which isn't mentioned in the setup steps).

@kcmartin
Copy link
Collaborator

Additional feedback: Add context for SSH setup

The section would benefit from explaining why all this setup is needed. The old docs implied you could SSH directly to sprite@{name}.sprites.dev, but that's not how it works.

Suggested intro text after the heading:

### Mounting Filesystem Locally

Use SSHFS to mount your Sprite and edit files with your local tools.

Sprites don't expose SSH directly—you'll need to install an SSH server on your 
Sprite and tunnel the connection through `sprite proxy`. This keeps your Sprite 
secure while still allowing local filesystem access.

This sets expectations before users dive into the setup steps.

@kcmartin
Copy link
Collaborator

Additional feedback: Clarify the test -n line

The purpose of this line isn't obvious:

test -n "$(sprite url -s "${sprite_name}")"

Adding a comment would help:

sc() {
  local sprite_name="$1"
  local mount_point="/tmp/sprite-${sprite_name}"
  # Wake the sprite and verify it exists
  test -n "$(sprite url -s "${sprite_name}")"
  mkdir -p "$mount_point"
  sprite proxy -s "${sprite_name}" 2000:22 &
  sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 \
    "sprite@localhost:" -p 2000 "$mount_point"
  cd "$mount_point"
}

@kcmartin
Copy link
Collaborator

Additional feedback: Port collision issue

Hardcoding port 2000 means:

  • Running sc twice will fail (port already bound)
  • Can't mount multiple sprites simultaneously

Consider deriving a unique port from the sprite name, or checking if already mounted before starting a new proxy.

@jbellerb
Copy link
Author

I originally had a cat command, but changed it to tee to demonstrate that piping to a Sprite was possible. I'll change it back to cat so we have working instructions. I'd love to revert it later :)

The test is unnecessary since sprite proxy fails anyways. I'll remove it.

As this is a throwaway example hidden at the bottom of the docs, I want to keep it as simple as possible. Dynamic ports in shell is doable but looks strange. I'll add a check to see if the port is occupied and ask the user if they want to close the existing mount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants