Cloudflare Tunnels, simplified.
Expose your local dev server to the internet in one command.
sparq is a CLI that manages Cloudflare Tunnels for you. It creates tunnels, sets up DNS records, and runs the daemon. Run sparq in your project directory and get a permanent public URL on your own domain.
Next time you run sparq, it starts the tunnel instantly — no setup needed.
npm i -g trysparq# First time: authenticates, creates tunnel, sets up DNS, starts it
sparq
# After that, just start/stop
sparq # start
sparq down # stopYou'll need a Cloudflare account with at least one domain added.
| Command | Description |
|---|---|
sparq |
Start tunnel (or run setup wizard on first use) |
sparq up |
Alias for sparq |
sparq down |
Stop the tunnel |
sparq status |
Show tunnel state, routes, and PID |
sparq add |
Add another hostname → port route |
sparq rm <host> |
Remove a route and its DNS record |
sparq ls |
List all sparq-managed tunnels across projects |
sparq logs |
Show tunnel logs (-f to follow) |
sparq login |
Authenticate with Cloudflare |
sparq logout |
Remove stored credentials |
sparq import [path] |
Import config from another directory |
sparq destroy |
Permanently delete tunnel, DNS records, and all config |
sparq manages two layers of Cloudflare auth automatically:
- OAuth — for listing your domains and account info
- cloudflared cert — for creating tunnels and DNS routes
Both are browser-based, one-time flows. After that, sparq handles everything:
- Creates a named Cloudflare Tunnel for your project
- Points your chosen subdomain → tunnel via CNAME
- Generates a
cloudflaredconfig and runs it as a background daemon - Stores project config in
.sparq/and credentials securely in~/.sparq/
Each project gets its own tunnel. Run sparq ls from anywhere to see them all.
Forward multiple local ports through one tunnel:
- Node.js >= 20
- Cloudflare account with at least one active domain
- cloudflared — sparq installs this automatically if missing
MIT


