Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

share0

A Dead Simple CLI tool to share files from your machine, without uploading them anywhere.

One command. A link and a QR code. Any browser can download. No account. No cloud.

GitHub stars GitHub forks Latest release Open issues MIT license

share0 pic

demo.webm

Built with Bun Linux, macOS, Windows PRs welcome

Quick startUsageHow it worksTroubleshootingContributing


share0 send ./video.mp4
Local  http://192.168.1.42:8787/a8Fd
QR     scan with your phone camera
Done   link is in your clipboard
Press Ctrl+C to stop

That is the whole flow. If the devices share Wi-Fi, the bytes move over your network and never touch a third party server. Kill the command and the share dies.

If this saves you a WeTransfer upload, please star the repo. It helps more than you think.

✨ Why people like it

  • 📂 Send anything. Single files, multiple files, full directories. Add --zip to serve a directory as one archive.
  • Starts at once, resumes on drop. The server streams from disk with HTTP Range support. A 20 GB video never loads fully into memory.
  • 📱 Phones just work. The recipient scans a QR code and downloads in the browser. No app, no login.
  • 🌍 Public when you need it. Add --public and share0 opens a free tunnel, checks /health through it, and prints only links that answer.
  • 🔒 Private when you need it. Short passwords like 482-719, expiry like 30m, download limits like --downloads 1.
  • 🩺 Fixes its own network issues. share0 doctor checks ports, firewalls, IPv6, UPnP, and tunnel binaries and prints the exact fix.

🚀 Quick start

Install the binary:

curl -fsSL https://raw.githubusercontent.com/Xeven777/share0/main/scripts/install.sh | bash

Or download it manually from Releases and put it on your PATH.

Run from source with Bun 1.1 or newer:

bun install
bun run apps/cli/index.ts send ./file.mp4

📖 Usage

Send files

share0 send ./photo.jpg
share0 send file1.jpg file2.jpg
share0 send ./project
share0 send ./project --zip
share0 send secret.pdf --password
share0 send secret.pdf --password 482719
share0 send ./video.mp4 --expires 30m
share0 send ./video.mp4 --downloads 1
share0 send ./video.mp4 --upnp
share0 send ./video.mp4 --public
share0 send ./video.mp4 --public --tunnel pinggy
share0 send ./video.mp4 --qr=off
share0 send ./video.mp4 --no-p2p
share0 send ./video.mp4 --detach
share0

Bare share0 opens an interactive menu. --tunnel accepts auto, ask, pinggy, localxpose, cloudflare, localtunnel, localhost.run, zrok. --qr accepts all, local, public, off.

Receive files

Turn your machine into a drop box. Someone else pushes files to you.

share0 receive
share0 receive --dir ./share-inbox
share0 receive --port 9000
share0 receive --password

Push straight to a receive endpoint:

share0 send ./report.pdf --to http://192.168.1.10:8788

Discover, list, stop, diagnose

share0 discover   # find nearby shares and receivers on the LAN
share0 list       # show running shares
share0 stop a8Fd  # kill one share
share0 doctor     # check network, firewall, and tunnels

🔧 How it works

Your machine serves. The browser downloads. It needs no database and no accounts. Exit the CLI and the share ends.

Transport When share0 uses it How it moves bytes
LAN Same Wi-Fi or cable, the default Direct HTTP to your LAN IP
IPv6 Both sides have direct IPv6 Direct HTTP to your IPv6 address
UPnP You pass --upnp Short lived router port mapping, removed on exit
WebRTC P2P Offered by default, uses UDP 52000 to 52100 Browser DataChannel with STUN for NAT traversal
Tunnel You pass --public Free tunnel adapter, link checked with /health before display

Tunnel adapters today include Pinggy, LocalXpose, Cloudflare quick tunnel, LocalTunnel, localhost.run, and zrok. Pinggy free sessions run about 60 minutes and suit most temporary links. zrok free allows 5 GB per day and suits small shares. share0 skips dead links and tries the next provider.

share0 vs the usual tools

Task Cloud upload tools share0
Send a 10 GB video Wait for upload, then wait for download, pay for storage Stream it from disk, start at once, pay nothing
Share on home Wi-Fi Still round trips through a data center Moves over LAN at LAN speed
Share with a phone Ask them to install an app and make an account They scan a QR code in the camera app
End access Hope the expiry setting worked Press Ctrl+C, the server stops, the URL dies

❓ Troubleshooting

Phone cannot open the LAN URL on the same Wi-Fi

Work through this list in order.

  1. Confirm the phone uses Wi-Fi, not mobile data, with no VPN active.
  2. Skip guest, hotel, and office networks. Many block device to device traffic.
  3. Check the laptop firewall. share0 doctor flags a blocked port and prints the fix.
  4. The CLI prints every LAN IP it finds. Try each one.
  5. If you switched networks after starting, restart the share. The CLI warns when your IP changes.

Fix a blocked port 8787:

sudo ufw allow 8787/tcp
sudo firewall-cmd --add-port=8787/tcp --permanent
sudo firewall-cmd --reload
Pinggy shows a warning page

That is Pinggy free link screening. The recipient taps Enter site once and the download page loads. Curl clients skip it.

Tunnel link returns 404

Some providers hand out a URL before edge routing exists. share0 requests /health through each tunnel and prints only links that answer. Dead links never print.

SSH asks for a password for Pinggy

Press Enter. Empty input is the documented answer for free tunnels.

The P2P button does nothing

The browser must reach the signaling URL first. Symmetric NAT often blocks UDP hole punching. Plain download still works. To open the P2P port range on ufw:

sudo ufw allow 52000:52100/udp

🗺️ Roadmap

  • LAN sharing with QR codes and clipboard copy
  • Streaming with HTTP Range resume
  • Passwords, expiry, download limits, ZIP mode
  • Free tunnel adapters with verified links
  • UPnP port mapping and WebRTC P2P offer
  • Receive mode and LAN discovery
  • PWA receiver and installable share pages
  • Optional end-to-end encryption
  • Native desktop and mobile wrappers

Have an idea? Open an issue or send a PR.

🤝 Contributing

Contributions are welcome. Big feature? Open an issue first so we agree on scope.

git clone https://github.com/Xeven777/share0.git
cd share0
bun install
bun test
bun run apps/cli/index.ts doctor

Please run bun test before pushing. Keep transport vendors behind the adapter interface in packages/transport, and keep packages/core free of vendor imports.

🙏 Acknowledgements

Built with Bun. Tunneling via Pinggy, LocalXpose, Cloudflare, LocalTunnel, localhost.run, and zrok. Inspired by the original share-cli idea of a tiny local server plus a tunnel.

📄 License

MIT. See LICENSE.

About

A Dead Simple CLI tool to share files from your machine, without uploading them anywhere.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages