ipinfo.app / CLI

// Command-Line Client

One binary, three calls: ipinfo myip, ipinfo <ip>, ipinfo asn <num>. Drop-in compatible with scripts migrating from ipinfo.io's CLI. Free by default — no account, no token, no signup.

curl · Linux / macOS
curl -fsSL https://www.ipinfo.app/cli/install.sh | sh
Requires curl + jq. Installs to /usr/local/bin/ipinfo. Override prefix with PREFIX=$HOME/.local/bin.
wget · Linux / macOS
wget -qO- https://www.ipinfo.app/cli/install.sh | sh
Alternate bootstrap. Installer probes for whichever of curl/wget is available.
PowerShell · Windows
iwr -useb https://www.ipinfo.app/cli/install.ps1 | iex
Requires PowerShell 5.1+ (Windows 10 1607+). Installs to $env:USERPROFILE\bin and adds to user PATH. No admin required.
Docker · Any OS
docker run --rm cmunroe/ipinfo myip
Multi-arch image on Docker Hub (amd64 + arm64). Alpine-based, ~15 MB. Tagged :latest, :1.2.0, :1.2, :1. Note: traceroute requires --cap-add=NET_RAW because raw UDP/ICMP probes aren't in the default container capability set.
Dependencies

Linux / macOS: curl and jq are required. jq does response-shape translation from our schemas to the ipinfo.io-compatible output. The installer prints an install hint for your package manager if jq is missing.

Windows: PowerShell 5.1+ only — no jq, no curl, everything is native. A ipinfo.cmd shim is installed so the command works from cmd.exe and Windows Terminal's default profile.

CMD ipinfo myip Free

Looks up your own IP via my.ipinfo.app/api/ip and /api/rdns, then merges the response into the ipinfo.io-compatible shape.

$ ipinfo myip { "ip": "203.0.113.42", "hostname": "c-203-0-113-42.example.net", "country": "US", "org": "AS7922 COMCAST-7922", "asn": { "asn": "AS7922", "name": "COMCAST-7922", "route": "203.0.113.0/24" } }
CMD ipinfo <ip> Free

Look up any IP address. Hits atlas.ipinfo.app/api/v2/ip/:ip directly. Note: hostname is always null for arbitrary IPs — we don't run a public rDNS proxy (see migration notes).

$ ipinfo 8.8.8.8 -f country US $ ipinfo 8.8.8.8 -f asn.name GOOGLE
CMD ipinfo asn <num> Free

ASN details via asn.ipinfo.app/api/json/details/:as. Accepts 13335 or AS13335. Returns org, country, and full CIDR prefix list.

$ ipinfo asn 13335 -f name CLOUDFLARENET
CMD ipinfo bulk [ip...] / stdin Free

Look up multiple IPs in parallel. Reads from argv, stdin, or both. Default concurrency is 4 workers — override with --workers N (cap 10). Output is NDJSON by default; -c for CSV with header row, or -f field for a one-value-per-line stream.

$ cat ips.txt | ipinfo # one JSON object per IP, streamed $ cat ips.txt | ipinfo -c > results.csv # CSV with header row $ cat ips.txt | ipinfo -f country | sort | uniq -c # count of IPs per country

Lines starting with # and blank lines in stdin are skipped, so you can pipe typical host files directly.

CMD ipinfo summarize Free

Reads IPs from stdin, does a bulk lookup, then aggregates counts by country and ASN. Returns a single JSON object sorted descending by count — ready for piping to jq, rendering in a dashboard, or posting to a spreadsheet.

CMD ipinfo classify <ip> [--api v1|v2|v3] v1 Free

IP reputation + classification via blackbox.ipinfo.app. Three tiers:

v1 (default) Free. Single-char reputation: Y (listed) / N (clean) / E (error).
v2 Per-signal flags (proxy, tor, spamhaus, cloud, hosting, goodvpn) + risk score. Needs a RapidAPI key.
v3 (beta) Full classification — mobile / residential / hosting / vpn / tor / privacy_relay / business / bogon — with probabilities + evidence.
$ ipinfo classify 8.8.8.8 { "ip": "8.8.8.8", "reputation": "N", "tier": "v1" } $ export IPINFO_APP_RAPIDAPI_KEY="your-key" $ ipinfo classify 8.8.8.8 --api v2
CMD ipinfo speedtest [--size MB] [--streams N] [--no-calibrate] [--latency-only] Free

Exclusive feature — ipinfo.io's CLI doesn't have this. Two-phase: a 25 MB calibration probe estimates throughput, then runs N concurrent streams against my.ipinfo.app/api/speedtest/download sized for the calibrated tier (1 stream below 25 Mbps, scaling up to 16 × 100 MB above 2.5 Gbps). Aggregate Mbps = sum(bytes) / max(seconds). Latency is server-side TCP RTT to Google DNS (8.8.8.8), Cloudflare (1.1.1.1), and Quad9 (9.9.9.9), in parallel with the download phase.

Why parallel: a single TCP stream caps at 100–300 Mbps on most residential gigabit links — slow start, per-flow CDN limits, and single-CPU encryption. Multi-stream aggregation reveals the actual line rate. Use --streams N to force a specific count, or --no-calibrate to skip phase 1 entirely.

CMD ipinfo traceroute <host> [--max-hops N] [--no-annotate] Free

Runs the system traceroute (Linux/macOS) or tracert (Windows) binary with no-DNS mode (-n / -d), parses each hop, and annotates it via atlas.ipinfo.app/api/v2/hop/:ip — returning reverse DNS, ASN number + name + country, and a best- effort carrier PoP (point-of-presence) match derived from the PTR's naming convention (Hurricane Electric, Cogent, NTT, Lumen, GTT, Zayo).

Output is NDJSON by default (one hop per line, streamed as hops come in) so you see progress. Use -j for a JSON array, -c for CSV, or -f asn.name for a stream of one field per hop.

$ ipinfo traceroute 8.8.8.8 --max-hops 5 {"hop":1,"ip":"192.0.2.1","rtt_ms":0.5,"ptr":null,"asn":null,"pop":null} {"hop":2,"ip":"198.51.100.1","rtt_ms":5.1,"ptr":"sjc1.he.net","asn":{"number":6939,"name":"HURRICANE"},"pop":{"iata":"SJC","city":"San Jose","confidence":"high"}} {"hop":3,"ip":"8.8.8.8","rtt_ms":12.3,"ptr":"dns.google","asn":{"number":15169,"name":"GOOGLE"},"pop":null}

The /api/v2/hop/:ip endpoint is on atlas-staging.ipinfo.app during early access and is being promoted to the production atlas.ipinfo.app host. If the endpoint returns 404 on the configured host, the CLI falls through to raw hops (no annotation) and prints a one-time stderr hint with the staging override: IPINFO_APP_ATLAS_URL=https://atlas-staging.ipinfo.app ipinfo traceroute …

CMD ipinfo completion <bash|zsh|fish|powershell> Free

Prints a shell completion script. Source it from your rc file, or write it into your shell's completion dir.

# bash — one-shot install $ ipinfo completion bash > /etc/bash_completion.d/ipinfo # zsh $ ipinfo completion zsh > ~/.zsh/completions/_ipinfo # PowerShell (add to $PROFILE) > ipinfo completion powershell | Out-String | Invoke-Expression
CMD ipinfo self-update [--yes] Free

Fetches version.json, checks if a newer version is available, verifies the SHA256 of the new script, and — after explicit confirmation — replaces the on-disk file atomically.

The --yes flag skips the confirmation prompt (useful in automation). Without it, the CLI aborts if stdin is not a TTY rather than prompting into the void.

-j, --json Force JSON output (the default for most commands).
-c CSV output — headers from the first object's keys.
-f, --field <path> Extract a single field via dotted path (e.g. asn.name). One value per line. Null for missing fields.
--api <tier> classify tier: v1 (default, free), v2, or v3.
--workers <N> Parallel workers for bulk (default 4, cap 10).
--size <MB> speedtest download size in MB (default 25, range 1–100).
--latency-only Skip the download portion of speedtest.
--yes Skip confirmation prompts (self-update).
--nocolor Disable ANSI colour escapes. NO_COLOR=1 env var has the same effect.
-q, --quiet Suppress upsell hints on stderr (e.g. the v2-upgrade nudge on v1 Y).

classify --api v2 and v3 route through RapidAPI for billing + rate limiting. Get a key from rapidapi.com/ipinfo-app/api/blackbox and set it one of two ways:

1. Env var export IPINFO_APP_RAPIDAPI_KEY="your-key" — highest precedence.
2. Config file Write the key to $XDG_CONFIG_HOME/ipinfo-app/rapidapi-key (defaults to ~/.config/ipinfo-app/rapidapi-key). Mode must be 0600; the CLI warns if it isn't.

On Windows the config file lives at %APPDATA%\ipinfo-app\rapidapi-key.

v1 is free and always available — no key required. When you run classify with a Y result on v1, the CLI prints a one-line nudge (to stderr, TTY only) suggesting v2 for the per-signal breakdown. Silence it with -q.

Our CLI emits the same field names as ipinfo.io's binary, so scripts that parse .country, .asn.name, .asn.route, etc. keep working after swapping the binary. Fields we can't populate stay null rather than being omitted, so jq -r .postal returns null instead of erroring — your script decides whether absence matters.

FieldCoverageSource
ip✓ alwaysechoed from request
hostname⚠ myip onlymy.ipinfo.app/api/rdns is caller-scoped; no rDNS for arbitrary IPs
country✓ alwaysatlas.ipinfo.app ISO alpha-2
org✓ always"AS<n> <description>" from atlas
asn.asn / name / route✓ alwaysatlas AS number, description, CIDR prefix
asn.type⚠ --api v3derived from blackbox v3 classification (RapidAPI)
city / region / postal / timezone✗ neverno paid GeoIP source; always null
loc (lat,lon)✗ neversame as above
asn.domain✗ nevernot in our ASN dataset

Commands we don't have (silently unsupported — not in help, return unknown-subcommand error if invoked):

  • ipinfo domain <host> — no domain→IP service
  • ipinfo map — no hosted map UI
  • ipinfo init/logout/config/quota — we don't use a token system
  • Offline utilities (grepip, prips, cidr2range, etc.) — keep ipinfo.io's standalone binaries for those; they're shipped separately upstream and don't collide with our ipinfo
TLS All upstream calls are HTTPS. No --insecure / -k fallback.
SHA256 verificationBoth the installer and self-update verify the downloaded script against the hash in version.json. Mismatch = abort (exit 3) and leave the existing script untouched.
Atomic install self-update downloads to a tempfile, verifies, and mvs into place. The target file is never partially written.
RapidAPI key Sent only in the x-rapidapi-key header on blackbox v2/v3 calls. Never logged. Never sent to any other endpoint.
Config file mode The optional key file should be 0600. The CLI warns on looser modes but still reads the key (doesn't break working setups).
Source Scripts are plain text — view ipinfo / view ipinfo.ps1 with syntax highlighting before piping into sh. Deep-comments throughout; auditable in one read.