Skip to content

CLI Options

ipwhoami [options] [ip]

If no IP is provided, ipwhoami fetches your public IP automatically.

ArgumentDescription
ipIPv4 or IPv6 address to look up. Optional — defaults to your public IP.
FlagShortDescriptionDefault
--provider NAME-pProvider to use: ipinfo, ipapi, ip-apiipinfo
--compare-cQuery all providers and show results side-by-side
--raw-rOutput raw JSON instead of formatted table
--help-hShow help message and exit
--version-vShow version and exit
CodeMeaning
0Success
1Error (invalid IP, network failure, unknown provider)

ipwhoami uses the built-in fetch API in Node.js 18+. It respects standard proxy environment variables (HTTP_PROXY, HTTPS_PROXY) if your Node.js version supports them.

Terminal window
# Auto-detect your IP, default provider
ipwhoami
# Specific IP, specific provider
ipwhoami -p ip-api 1.1.1.1
# Compare all providers
ipwhoami -c 8.8.8.8
# Raw JSON piped to jq
ipwhoami -r 8.8.8.8 | jq .city
# Combine flags
ipwhoami -c -r 1.1.1.1