Smartlinks
Smartlinks is a CLI and runtime for turning small JavaScript or TypeScript programs into URLs.
The link is the deployment. Query parameters are its inputs, and the script’s return value becomes the response. There are no server-side accounts and no programs are stored.
See it run
Three live demos mint working Smartlinks in your browser: a redirect with a lifetime you choose, an SVG badge, and a riddle whose sealed answer travels inside the link.
Give your agent the context.
Copy a prompt that points your coding agent at the Smartlinks format, CLI, runtime limits, and safety model.
Start Here
Install the CLI and build a link:
npm install --global @jonaslsa/smartlinks
smartlinks build script.ts --copy
Add --secret TOKEN to encrypt a secret for the exact script before
putting it in the URL. Run smartlinks login once to have future builds
signed automatically when recipients should be able to verify the author.
Runtime
- The script receives params, headers, secrets, and a guarded fetch function.
- The CLI compresses the source and seals secrets to the service public key.
- A fresh QuickJS sandbox runs the script inside a Cloudflare Worker.
Smartlinks are immutable, and anyone with the link can run them. Use scoped, revocable credentials.
Acceptable Use
Smartlinks is a shared preview service for small, legitimate programs and automations. Don’t use it for phishing, malware, spam, unauthorized access, scanning, abusive proxying, illegal or deceptive content, or attempts to escape or exhaust the runtime. Abusive traffic may be rate-limited or blocked.