link command is the primary way to share your project. It detects your framework, builds your project (or skips the build if you prefer), and uploads the output to generate a shareable preview link.
Basic Usage
- Detect your framework (Next.js, Vite, etc.)
- Run your build command
- Upload the build output
- Generate a shareable URL (copied to clipboard)
- Set a 24-hour expiration by default
Anonymous users can create up to 1 link per day. Run
sher login for 25 links/day.Flags
Skip the build step and upload a pre-built directory. Useful when you’ve already run the build manually or want to share an existing build output.
Specify a custom directory to upload instead of using the framework’s default output directory.
Set the link expiration time in hours. Default is 24 hours. Maximum is 168 hours (7 days) for Pro users.
Free users: TTL can be set but all links expire within 24 hours max.
Pro users: Can set TTL up to 168 hours (7 days).
Password-protect your preview link. Pro only feature.
Examples
Share a Next.js project
Skip the build step
Share a custom directory
Create a short-lived link
Password-protected link (Pro)
Framework Detection
Sher automatically detects your framework and uses the correct build command and output directory:- Next.js:
npm run build→out/(with automatic static export configuration) - Vite:
npm run build→dist/ - Create React App:
npm run build→build/ - Astro:
npm run build→dist/ - SvelteKit:
npm run build→build/ - Static HTML: No build → current directory
Rate Limits & Upload Limits
| Tier | Links/Day | Max Upload Size |
|---|---|---|
| Anonymous | 1 | 10MB |
| Starter (Free) | 25 | 50MB |
| Pro | 200 | 100MB |
Error Handling
Upload too large
Build fails
If your build command fails, Sher will exit and show the build error. Fix the error and try again.Missing output directory
If you use--no-build or --dir and the directory doesn’t exist, you’ll see: