New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

share-web-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

share-web-cli

Easy CLI tool to share local web services using ngrok without DNS/firewall configuration

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Share Web CLI

A simple and powerful CLI tool to easily share your local web services to the internet using ngrok without complex DNS and firewall configuration.

Features

  • 🚀 Easy Tunneling: Start sharing web services with a single command
  • 🔧 Multiple Protocols: Support for HTTP, HTTPS, and TCP tunnels
  • 📊 Status Monitoring: Check tunnel status and get access URLs
  • ⚙️ Configuration Management: Easy ngrok configuration editing
  • 🎯 Developer Friendly: Common development ports predefined
  • 🛡️ No DNS Required: Perfect for development and testing

Installation

npm install -g share-web-cli

From Source

  • Clone this repository
  • Install dependencies:
npm install

Usage

Basic Usage

# Share a service running on port 3000
share-web start 3000

# Share a service on port 8080
share-web start 8080

# Check current tunnel status
share-web status

# Stop all tunnels
share-web stop

Advanced Usage

# Share with specific protocol
share-web start 3000 --protocol https

# Share TCP service (e.g., database)
share-web start 5432 --protocol tcp

# List common development ports
share-web list

# Show current configuration
share-web config show

# Edit configuration
share-web config edit

Commands

start [PORT]

Start ngrok tunnel for specified port (default: 3000)

Options:

  • --protocol: Protocol to use (http, https, tcp)
  • Default protocol: http

Examples:

share-web start 8080
share-web start 3000 --protocol https
share-web start 22 --protocol tcp

stop

Stop all active ngrok tunnels

Example:

share-web stop

status

Show current tunnel status and access URLs

Example:

share-web status

list

List common development ports and their typical uses

Example:

share-web list

config

Manage ngrok configuration

Subcommands:

  • show: Display current configuration
  • edit: Open configuration file in your default editor

Examples:

share-web config show
share-web config edit

Common Development Ports

PortTypical Use
3000Next.js, React development server
8080Generic web application
5000Flask, Django development
3001Alternative React port
8000FastAPI, Pyramid development
4200Angular development server
5432PostgreSQL database
6379Redis cache
27017MongoDB database

How It Works

Share Web CLI uses ngrok to create secure tunnels to your local development servers. When you start a tunnel:

  • ngrok creates a secure connection to the ngrok cloud
  • Your local port is exposed through a public URL
  • You receive a public URL that can be shared with others
  • All traffic is routed through the encrypted tunnel

Requirements

  • Python 3.6 or higher
  • ngrok binary (automatically downloaded)
  • npm (for installation)

Troubleshooting

Port Already in Use

If you get a "port already in use" error:

# Check what's using the port
lsof -i :3000

# Kill the process if needed
kill -9 <PID>

ngrok Not Found

If you get an ngrok error, make sure ngrok is properly installed:

# Download ngrok manually
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
tar -xzf ngrok-v3-stable-linux-amd64.tgz
chmod +x ngrok

Authentication Issues

For persistent ngrok tunnels, you may need to:

  • Sign up for a free ngrok account
  • Get your auth token from https://dashboard.ngrok.com/
  • Configure it in the ngrok configuration file

Examples

Development Workflow

  • Start your development server:
# React app
npm start

# Next.js app
npm run dev

# Flask app
python app.py
  • In another terminal, start the tunnel:
share-web start 3000
  • Share the generated public URL with collaborators or for testing webhooks

Testing Webhooks

# Start your webhook receiver
python webhook_server.py  # running on port 5000

# Create tunnel for webhook testing
share-web start 5000

# Use the public URL in your webhook provider settings

Database Access

# Start PostgreSQL locally (usually port 5432)
pg_ctl start

# Share database access
share-web start 5432 --protocol tcp

# Others can connect using the provided TCP URL

Contributing

  • Fork the repository
  • Create your feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add some amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

License

This project is licensed under the ISC License - see the LICENSE file for details.

Acknowledgments

  • ngrok for providing the tunneling service
  • The open-source community for inspiration and feedback

Support

If you encounter any issues or have questions:

Made with ❤️ by MiniMax Agent

Keywords

ngrok

FAQs

Package last updated on 20 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts