curl -fsSL https://www.ipinfo.app/cli/install.sh | sh
curl + jq. Installs to
/usr/local/bin/ipinfo. Override prefix with
PREFIX=$HOME/.local/bin.
wget -qO- https://www.ipinfo.app/cli/install.sh | sh
curl/wget is available.
iwr -useb https://www.ipinfo.app/cli/install.ps1 | iex
$env:USERPROFILE\bin and adds to user PATH.
No admin required.
docker run --rm cmunroe/ipinfo myip
: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.
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.
Looks up your own IP via my.ipinfo.app/api/ip
and /api/rdns, then merges the response into
the ipinfo.io-compatible shape.
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).
ASN details via asn.ipinfo.app/api/json/details/:as.
Accepts 13335 or AS13335.
Returns org, country, and full CIDR prefix list.
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.
Lines starting with # and blank lines in
stdin are skipped, so you can pipe typical host files
directly.
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.
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. |
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.
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.
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 …
Prints a shell completion script. Source it from your rc file, or write it into your shell's completion dir.
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.
| Field | Coverage | Source |
|---|---|---|
| ip | ✓ always | echoed from request |
| hostname | ⚠ myip only | my.ipinfo.app/api/rdns is caller-scoped; no rDNS for arbitrary IPs |
| country | ✓ always | atlas.ipinfo.app ISO alpha-2 |
| org | ✓ always | "AS<n> <description>" from atlas |
| asn.asn / name / route | ✓ always | atlas AS number, description, CIDR prefix |
| asn.type | ⚠ --api v3 | derived from blackbox v3 classification (RapidAPI) |
| city / region / postal / timezone | ✗ never | no paid GeoIP source; always null |
| loc (lat,lon) | ✗ never | same as above |
| asn.domain | ✗ never | not 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 serviceipinfo map— no hosted map UIipinfo 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 ouripinfo
| TLS | All upstream calls are HTTPS. No --insecure / -k fallback. |
| SHA256 verification | Both 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. |