@souvikeet/file-share
v1.2.2
Published
Instant file and folder sharing CLI over local network and the internet via Cloudflare Tunnel
Maintainers
Readme
⚡ @souvikeet/file-share
Instant CLI file and folder sharing over local network and the internet via Cloudflare Tunnel. Direct HTTP downloads, smart port resolution, and terminal QR code.
🌟 Key Features
- 📁 Interactive Folder & File Selection:
- Prompts you for the folder path to share (defaults to current directory
.). - Prompts for specific files, or press Enter (leave blank) to share all files in the folder.
- Prompts you for the folder path to share (defaults to current directory
- 🔌 Port Collision Handling:
- Checks if candidate port
30080is free. - If occupied, interactively prompts for a free available port.
- Checks if candidate port
- 🌐 Instant Cloudflare Quick Tunnel:
- Automatically establishes a secure public
https://*.trycloudflare.comtunnel. - Automatically downloads standalone
cloudflaredbinary if not already installed.
- Automatically establishes a secure public
- 📱 QR Code in Terminal:
- Generates a scannable QR code directly inside your terminal for quick smartphone access.
- ⚡ Direct HTTP Downloads:
- Accessing
/<filename>directly downloads the requested file. - If a single file is shared, visiting the root URL
/directly triggers the download. - If multiple files/folders are shared, visiting root
/gives a clean direct download index. - Subfolder navigation and one-click subfolder
.ziparchive downloads. - Accessing
/download-allstreams a single.ziparchive of all shared files.
- Accessing
- 🔒 Source Code Security & Obfuscation:
- Proprietary source code is obfuscated before publishing to npm.
🚀 Quick Start
Run directly with NPX (No installation needed)
npx @souvikeet/file-shareOr install globally via NPM
npm install -g @souvikeet/file-share
file-share📋 Interactive CLI Walkthrough
When you run file-share, it prompts you step-by-step:
╔═══════════════════════════════════════════════════════════════╗
║ ⚡ FILE SHARE CLI - Instant File Sharing ⚡ ║
╚═══════════════════════════════════════════════════════════════╝
Share local folders & files over LAN and Internet via Cloudflare
📁 Enter folder path to share [Default: . (current directory)]: ./my-folder
✔️ Folder selected: /home/geeks/my-folder
📊 Found 3 file(s) in selected folder.
• presentation.pdf (3.4 MB)
• design-mockup.png (1.2 MB)
• notes.txt (12 KB)
📄 Enter specific file(s) to share (comma-separated, or leave BLANK to share all):
✔️ Sharing 3 file(s) (All folder files)
🚀 Starting local HTTP server on port 30080...
✔️ Local server running successfully!
🌐 Establishing Cloudflare Tunnel to generate public URL... Connected!
┌────────────────────────────────────────────────────────────────────────┐
│ 📁 LOCAL & INTERNET FILE SHARE ACTIVE │
│ │
│ Folder: /home/geeks/my-folder │
│ Files: 3 files (4.61 MB) [All files shared] │
│ │
│ 🔗 Access URLs: │
│ • Local: http://localhost:30080 │
│ • Network: http://192.168.1.50:30080 │
│ • Cloudflare: https://random-subdomain.trycloudflare.com [PUBLIC] │
│ │
│ 💡 Scan QR Code on your smartphone or share the link with anyone! │
│ 🛑 Press Ctrl + C to stop sharing anytime. │
└────────────────────────────────────────────────────────────────────────┘
📱 Scan to Open in Browser (https://random-subdomain.trycloudflare.com):
...⚙️ CLI Flags
# Share specific directory
file-share --dir /path/to/my/folder
# Share specific files only
file-share --dir ./docs --files "summary.pdf, logo.png"
# Custom port
file-share --port 8080
# LAN/Local only (disable Cloudflare tunnel)
file-share --no-tunnel
# View help
file-share --help| Flag | Shorthand | Description | Default |
|------|-----------|-------------|---------|
| --dir <path> | -d | Path to directory folder to share | Current directory (.) |
| --files <list> | -f | Comma-separated list of filenames to share | All files in folder |
| --port <number> | -p | Local HTTP server port | 30080 (or prompts if busy) |
| --no-tunnel | | Disable Cloudflare public tunnel | false |
| --help | -h | Display help information | |
| --version | -v | Display version number | |
👤 Author
Souvik Ghosh
- GitHub: @sousvkeet
- npm: ~souvikeet
📄 License
MIT © 2026 Souvik Ghosh
