sher is a CLI that builds your frontend project, uploads it, and returns a live preview URL.
Use it when the user wants to see a frontend project live.
Global (recommended for agents):
bash
npm i -g shersh
Or one-off with npx:
bash
npx shersh link
From the project root:
bash
sher link
sher auto-detects the framework, runs the build, uploads the output, and returns a URL.
FlagDescription--dir <path>Upload a specific directory (skips framework detection)--ttl <hours>Set link expiry in hours (default: 24)--no-buildSkip the build step (use if already built)--pass [password]Password-protect the preview (Pro only)
bash
sher link # standard deploy
sher link --no-build # already built
sher link --dir ./dist # specific output directory
sher link --ttl 2 # 2-hour link
The CLI prints the live URL to stdout:
text
https://a8xk2m1p.sher.sh (copied)
expires 2/19/2026, 11:00 AM
The URL matches https://[a-z0-9]{8}.sher.sh and is copied to the clipboard.
Present the URL to the user:
Your preview is live at https://a8xk2m1p.sher.sh
Mention expiry if --ttl was set, and share the password if --pass was used.
sher auto-detects and builds:
dist/out/dist/build/dist/, build/, or out/--dir . to upload directlyIf sher link fails:
package.json, or use --dirdist/, build/, or out/, or use --dir