Generate public, tokenized, self-destructing download links for files. Files are served via a local Express server exposed to the internet through a Cloudflare Tunnel.
shared/ after download or expiry/generate and /status require SHARE_SECRETshared/ are served, never the full workspacecloudflared installed and a Cloudflare Tunnel configured pointing to localhost:5050SHARE_PUBLIC_URL to your public tunnel URL (e.g. https://share.yourdomain.com)SHARE_SECRET to a strong random string (recommended)bash
cd skills/share-onetime-link/scripts
npm install
Create a tunnel in the Cloudflare Zero Trust dashboard:
http://localhost:5050share.yourdomain.comRun the tunnel:
bash
cloudflared tunnel run --token YOUR_TUNNEL_TOKEN
bash
SHARE_PUBLIC_URL="https://share.yourdomain.com" \
SHARE_SECRET="your-strong-random-secret" \
node skills/share-onetime-link/scripts/server.js
Or use start.sh (edit variables first):
bash
bash skills/share-onetime-link/scripts/start.sh
bash
SHARE_SECRET="your-secret" \
node skills/share-onetime-link/scripts/share-file.js /path/to/file.pdf 30
# Returns a public link valid for 30 minutes
Just ask naturally:
"Share
report.pdffor 20 minutes" "Generate a download link forphoto.jpg, valid 1 hour"
bash
curl -H "x-share-secret: your-secret" http://localhost:5050/status
VariableRequiredDefaultDescriptionSHARE_PUBLIC_URLYeshttp://localhost:5050Public base URL for generated linksSHARE_SECRETYes_(none)_Secret key for /generate and /status endpointsSHARE_PORTNo5050Local server portSHARED_DIRNoworkspace/shared/Directory for shared files
/dl/:token is public by design — anyone with the link can download once/generate and /status are protected by SHARE_SECRET — required, server refuses to start without itSHARE_SECRET is not set the server exits immediately with an errorshared/ are never accessibleSHARED_DIR unless you intend to share them