tunnel-notify
v1.0.13
Published
Instantly expose localhost via a secure Cloudflare Tunnel and send the live URL to your Telegram app.
Maintainers
Readme
Tunnel Notify
A lightweight, on-demand Node.js CLI tool that instantly exposes your local development server to the internet using a secure Cloudflare tunnel and automatically pushes the public HTTPS link right to your phone via Telegram.
No account registration required, no tedious Ngrok limits, and no permanent background daemons. It only uses resources while you are actively exposing your app!
Why use this?
If you build web apps, sometimes you need to quickly check how localhost looks on your mobile device, or quickly share a demo link with a client.
With Tunnel Notify, instead of manually creating a tunnel and copy-pasting links, you simply type:
tunnel-notify 3000The tool instantly fires up a Cloudflare Tunnel, extracts the temporary `trycloudflare.com` URL, and does two things:
- Prints a QR Code right in your terminal so you can scan it instantly with your phone camera.
- Sends a push notification directly to your private Telegram chat so you can open it on your phone or forward it to a client.
(The terminal output is fully colorized, and the `cloudflared` binary is downloaded entirely automatically during installation. You do NOT have to install it manually!)
Installation
npm install -g tunnel-notifySetup (Optional, One Time)
If you want the CLI to automatically send links to your phone, you need to connect your Telegram account. Simply run:
tunnel-notify loginThe terminal will guide you exactly on how to get:
- A Bot Token (from `@BotFather`)
- Your Chat ID (from `@userinfobot`)
It safely stores these in a local config file on your machine.
Usage
Whenever you have a local server running (like Next.js on port 3000, or a Flask app on port 5000), open a new terminal tab and type:
tunnel-notify <port>Example:
# Start your React app
npm run dev
# In another terminal, expose port 3000
tunnel-notify 3000You will instantly see a beautiful colored output in your terminal framing a scannable QR code, and your Telegram app will receive a message reading: `[SUCCESS] Tunnel Active for port 3000! URL: https://random-words.trycloudflare.com`
When you are done, simply press Ctrl+C in the terminal to cleanly destroy the tunnel.
Debugging
If your tunnel isn't starting properly or Cloudflare is throwing an error, you can use the verbose flag to see the raw logs directly from the tunnel:
tunnel-notify 3000 -vHow it Works
- Runs a lightweight Cloudflare Tunnel as a child process.
- Intercepts the generated tunnel URL from stderr.
- Fires a single HTTP POST request to the Telegram Bot API to deliver your link.
- Cleans up gracefully upon exit.
