Queries multiple public IP information APIs (ipify, ipinfo, icanhazip) with automatic fallback if one fails. Displays your public IP address, ASN, ISP, and approximate location. Supports --watch mode that polls every 5 seconds and highlights changes — useful for debugging VPNs, proxies, and multi-homed servers. JSON output for scripting.
NetworkingUtilityIPCLI
Features
- Multi-source query with automatic fallback chain
- IP, ASN, ISP, and approximate location display
- Watch mode: polls every 5s, highlights changes
- JSON output for automation
- 5-second timeout per source, fails fast
Flags
| Long | Short | Description |
|---|---|---|
| --version | -V | Show version and license |
| --watch | -w | Poll every 5s, highlight changes |
| --json | -j | Output as JSON |
Usage
terminal
$ pubip
$
$ pubip --watch --json
Dependencies
stdlib only — net/http, encoding/json, time
Install
$ curl -LO https://labs.stech-sol.com/downloads/pubip/0.1.0/pubip_linux_amd64
$ chmod +x pubip_linux_amd64
$ sudo mv pubip_linux_amd64 /usr/local/bin/pubip
About
Downloads
Verify integrity
SHA256 checksums