If no IP is provided, ipwhoami fetches your public IP automatically.
Argument Description ipIPv4 or IPv6 address to look up. Optional — defaults to your public IP.
Flag Short Description Default --provider NAME-pProvider to use: ipinfo, ipapi, ip-api ipinfo--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 —
Code Meaning 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.
# Auto-detect your IP, default provider
# Specific IP, specific provider
ipwhoami -p ip-api 1.1.1.1
ipwhoami -r 8.8.8.8 | jq .city