npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

setulink

v3.0.1

Published

Temporary public URL for local servers (testing only)

Readme

☁️ setulink

setulink is a powerful Node.js CLI tool that breathes life into your local development environment by securely exposing your local servers to the internet using Cloudflare Tunnels. No more port forwarding, no more "blank page" security blocks, and no more manual configuration.


🏗 How it Works (Architecture)

setulink acts as a bridge between your local machine and the global Cloudflare network. It leverages the cloudflared engine to create a persistent, encrypted tunnel.

graph TD
    A[🌍 Internet User] -->|HTTPS Request| B[☁️ Cloudflare Edge]
    B -->|Encrypted Tunnel| C[💻 Your Machine]
    subgraph "setulink CLI"
        C --> D[🛠 cloudflared Binary]
        D --> E[🔗 Local Server - localhost:PORT]
    end
    subgraph "Local Environment"
        E --> F[React / Vite]
        E --> G[Node / Express / Python / etc.]
    end

✨ Features

  • 🔦 Smart Auto-Port Detection: Automatically scans your system for active ports (3000-6000) and lets you choose which one to expose.
  • Vite-Specific Optimization: Detects Vite projects and automatically configures host, allowedHosts, and HMR for a seamless remote experience.
  • 📅 Session Summary: Get a neat report on exit showing your session duration and the URL history.
  • 🔒 Secure by Default: Uses Cloudflare's enterprise-grade infrastructure. No local password bypasses required.
  • 🚀 Zero Config: Just run it, select your port, and share your link.

📁 File Structure

setulink/
├── bin/
│   └── index.js           # Main CLI entry point (Port scanning, Logic, Summary)
├── src/
│   ├── tunnel.js          # Cloudflare Tunnel lifecycle management
│   ├── detectVite.js      # Vite project detection logic
│   ├── updateViteConfig.js # Automatic Vite configuration helper
│   ├── prompt.js          # Interactive user input (prompts, selections)
│   └── logger.js          # Styled terminal output (Chalk + Ora)
├── node_modules/          # Dependencies (cloudflared, commander, etc.)
└── package.json           # Project metadata and CLI registration

🛠 Technical breakdown

1. Port Discovery

The CLI uses a concurrent scanning algorithm to check for active listeners on localhost between ports 3000 and 6000. If multiple servers are found (e.g., a React frontend and a Node backend), it provides an interactive menu.

2. Tunneling Engine

Under the hood, setulink spawns a cloudflared process using the Tunnel.quick() API. This creates a secure tunnel to the Cloudflare edge and yields a unique *.trycloudflare.com URL.

3. Vite Synchronization

Since Vite 6+ has strict host and security requirements, setulink offers to inject the following into your vite.config.js:

  • server.host: true: Required for external tunnel access.
  • server.allowedHosts: true: To permit the Cloudflare domain.
  • server.hmr.clientPort: 443: To ensure Hot Module Replacement works over the HTTPS tunnel.

🚀 Usage

Installation

Clone the repository and link it globally:

npm install
npm link

Running the App

Auto-detect and start:

setulink

Expose a specific port:

setulink --port 4000

Debug connection issues:

setulink --debug

Exit

Press Ctrl + C to shut down the tunnel. You will see a summary of your session:

🔒 Tunnel closed
⏱ Session duration: 15m 20s
🌍 URL was: https://awesome-project.trycloudflare.com

Created with ❤️ for developers who want to share their work instantly.