tpn-cli
v1.0.5
Published
A command‑line interface for connecting to the TPN WireGuard VPN network.
Readme
🚀 Features
- 🔍 Autocomplete Country Picker – fuzzy search your desired VPN exit country
- ⏲️ Set Lease Duration – specify how long the VPN should run (in minutes)
- ⚙️ Auto Installs WireGuard – detects & installs
wireguard-tools(Linux/macOS) - 🧠 Non-Interactive Mode – pass flags like
--countryand--leaseminsto skip prompts - 📡 IP Check – shows your public IP before & after connecting
- 📦 npx-Friendly – run instantly with
npxwithout installing globally - ⏹️ Graceful Teardown – prompts to confirm when pressing
Ctrl+C - ⌛ Live Timer Bar – see your lease countdown visually
- 📱 Mobile QR-Code Mode – generate and display a WireGuard QR code you can scan with your phone
💿 Installation
npm install -g tpn-cliInstalls the CLI globally so you can use
tpn-clianywhere on your system.
✅ No install? No problem. Just run:
npx tpn-cliWorks exactly the same without polluting global space. Great for CI or quick tests.
🧑💻 Usage (Add npx before the command if you don't want to install the CLI globally)
🔘 Interactive Mode
tpn-cli- Search for your desired country
- Enter lease time in minutes
- VPN is up in seconds
⚡ Non-Interactive Mode
tpn-cli --country NL --leasemins 10- Skip prompts by specifying country code/name and lease in minutes
📱 Mobile QR-Code Mode
tpn-cli --mobile- Generates a QR code for your WireGuard config directly in the terminal
- Scan it with your mobile WireGuard app to import & connect instantly
You can also combine modes:
tpn-cli --validator 1234 --country US --leasemins 30 --mobile✍️ Author
Sambit Sargam
GitHub: @sambitsargam
Twitter: @sambitsargam
✨ If you enjoy this tool, a star ⭐ on GitHub would mean a lot!
