Total Router Control.
Direct From Your Terminal.

Inspect RSRP/RSRQ/SINR radio parameters, lock carrier bands, read 2FA SMS tokens, auto-reboot, clamp MTU to 1420 GTP tunnel standards, and engage kernel BBR congestion control. Zero web UI lag.

$ curl -fsSL https://tp-link-cli.dulith.me/install.sh | bash

Compatible with Linux, macOS, WSL2, Raspberry Pi & OpenWrt

npm: @dulith/tplink-cli pip: tplink-cli brew: tplink-cli apt: tplink-cli.deb Go: cmd/tplink-cli

Interactive Terminal Experience

Select a command to test live output simulations

dulith@sliit-malabe: ~ (tp-link-cli v1.0.0)
bash 5.2 utf-8
Cellular Radio & Kernel Breakthrough

Engineered to Crush Bufferbloat & Keep NAT Alive

Developed under real-world cellular conditions in Malabe, Sri Lanka on the Hutch 4G 20Mbps Unlimited plan. Here is how three targeted optimizations deliver up to 340% lower loaded latency.

BBR Congestion Control

Replaces legacy Reno/Cubic loss-based algorithms with model-based bottleneck bandwidth and round-trip propagation time calculations. Eliminates queue buildup in cellular eNodeB buffers.

1420 MTU GTP Clamping

LTE Carrier EPC backhauls wrap packets in GPRS Tunneling Protocol (GTP-U) headers. Standard 1500 MTU packets fragment at the tower, halving throughput. Clamping to 1420 prevents fragmentation entirely.

ip link set dev wlan0 mtu 1420
iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

Carrier NAT Keepalive Pulse

Mobile providers tear down idle UDP connection states after 30-60 seconds, forcing radio resource reconnections. Our 28-byte background pulse fires every 25s, keeping the 4G radio in active state for zero initial packet stall.

tplink-cli pulse --interval 25s
Payload: 28B ICMP/UDP echo (~3.2KB/hr)
Real Throughput
99% of 20Mbps theoretical cap
28 ms
Loaded Latency
Down from 184ms on Cubic
0.0%
Packet Fragmentation
MSS 1380 + MTU 1420
100%
Reversible
One-click revert on non-cellular Wi-Fi

18 Universal Subcommands

Full feature parity with TP-Link 192.168.1.1 Web Admin GUI

tplink-cli profile Diagnostics

Probe router model, firmware variant, and auto-detect HTTP session/token encryption.

tplink-cli status Diagnostics

WAN IP, gateway, DNS servers, uptime, cellular network type, and connection state.

tplink-cli signal [--watch] Cellular

Real-time radio telemetry: RSRP (dBm), RSRQ (dB), SINR (dB), RSSI, Band (B1/B3/B8/B20/B40).

tplink-cli cell-lock Cellular

Force-lock modem to specific carrier band (e.g., Band 3 1800MHz) or Physical Cell ID (PCI).

tplink-cli set-mode 4G_ONLY Cellular

Switch cellular RAT between AUTO, 4G_ONLY, 3G_ONLY, and 5G_NSA to prevent 3G drops.

tplink-cli apn [--set name] Cellular

Read or update APN profile (e.g. Hutch 'hutch3g' / 'net'), PDP type (IPv4/IPv6), and auth.

tplink-cli sms list SMS

List SIM card inbox messages, extract 2FA verification codes, view sender, and timestamp.

tplink-cli sms send SMS

Transmit SMS message via the SIM modem to activate cellular bundles or query balance.

tplink-cli ussd "*344#" SMS

Send interactive USSD codes to carrier gateway for instant balance checks and reloads.

tplink-cli wifi status Wi-Fi

Display 2.4GHz & 5GHz SSID status, channel number, bandwidth (20/40/80MHz), and encryption.

tplink-cli wifi set-channel Wi-Fi

Change broadcast channel to avoid apartment RF congestion (e.g., Channels 1, 6, 11).

tplink-cli clients Wi-Fi

List all connected LAN/Wi-Fi devices with MAC addresses, hostnames, assigned IPs, and bandwidth.

tplink-cli reboot System

Cleanly restart router OS and modem module without touching physical reset pin.

tplink-cli reconnect System

Disconnect and reconnect WAN cellular session to trigger new CGNAT IP lease.

tplink-cli optimize-network Tuning

Apply/Revert kernel BBR, 1420 MTU clamping, Cloudflare 1.1.1.1 DNS, and TCP buffer sizes.

tplink-cli pulse Tuning

Background UDP keepalive daemon that keeps 4G tower carrier states active indefinitely.

tplink-cli repl Interactive

Interactive shell session with tab-completion, live signal meters, and history navigation.

tplink-cli benchmark Interactive

Run latency jitter, packet fragmentation tests, and bufferbloat grade evaluation.

Zero-Friction Installation

Available across all major package ecosystems

curl -fsSL https://tp-link-cli.dulith.me/install.sh | bash
Verified clean on Python 3.10+, Node 18+, Go 1.22+
Env vars: TPLINK_ROUTER_IP TPLINK_PASSWORD