ipinfo CLI: IP geolocation and CIDR utilities from the IPinfo API, token required for bulk use
Official Command Line Interface for the IPinfo API (IP geolocation and other types of IP data)
At a glance
- What is it?
- ipinfo CLI v3.3.2 is the official command-line client for the IPinfo.io API, giving engineers single-IP lookups, ASN queries, bulk piping, CIDR expansion and a map view in one binary. Token-free use returns limited fields and blocks bulk operations; a free token from ipinfo.io gives access to the full data set.
- Who is it for?
- ipinfo CLI is worth it for engineers who already rely on IPinfo.io data and want bulk lookups, CIDR expansion and field filtering without writing API wrappers. Register for a free token at ipinfo.io/signup before running bulk operations, since that is the only credential path the documentation covers.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 166 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 6, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Without a token, data output is limited and bulk lookups are unavailable; free tokens come from ipinfo.io
ipinfo CLI connects to the IPinfo.io API to return geolocation, ASN and carrier data for any IP address. Running without a token is documented as producing limited data output and blocking bulk lookups. Free tokens are available at https://ipinfo.io/signup.
No documentation in the README spells out exactly which fields are withheld in token-free mode. What is clear is that bulk operations, meaning piping a list of addresses through the tool, require a token. Summarize, which processes up to 1000 IPs at once, also falls in that category.
For someone who needs only occasional single-IP lookups on a public address, the CLI functions without registration. For any workflow that processes more than one address at a time or needs every available field, the token registration step comes first.
Eleven installation methods in the README: brew, apt PPA, Docker, go install, ports and more
Eleven separate installation sections appear in the README. For macOS, brew is the primary path:
brew install ipinfo-cliFor Ubuntu with automatic updates, the PPA method installs the full binary suite and keeps it current:
echo "deb [trusted=yes] https://ppa.ipinfo.net/ /" | sudo tee "/etc/apt/sources.list.d/ipinfo.ppa.list"
sudo apt update
sudo apt install ipinfoFor Docker:
docker run --rm -it ipinfo/ipinfo:3.3.2For Go developers building from source:
go install github.com/ipinfo/cli/ipinfo@latestAdditional methods cover a Debian one-time installer script, FreeBSD ports, Arch Linux AUR, Scoop for Windows, a Windows PowerShell script, and manual binary downloads via curl or wget. Binary downloads span 24 OS and architecture combinations, covering darwin, linux, freebsd, netbsd, openbsd, dragonfly and solaris across amd64, arm, arm64 and 386 variants. Building from source requires Go 1.20 per go.mod.
ipinfo init stores the token once; myip and direct IP arguments are the two basic queries
After installation, storing the API token takes one command:
ipinfo initWith the token stored, looking up your own machine's IP runs:
ipinfo myipFor any specific address, pass it as an argument:
ipinfo 8.8.8.8Config is stored at `/root/.config/ipinfo` inside a Docker container. Running the tool in Docker without a volume mount means the token set by `ipinfo init` is discarded when the container exits. Persisting the config requires mounting a local directory to that path:
docker run --rm -it -v "$PWD/ipinfo:/root/.config/ipinfo" ipinfo/ipinfo:3.3.2For any Docker-based workflow that runs the CLI repeatedly, that volume flag is the piece to add.
Piping a file to stdin feeds bulk lookups; -f extracts one field and the summarize cap is 1000 IPs
Bulk mode takes one IP per line from any stdin source and returns results for each. Passing a file goes like this:
cat ips.txt | ipinfo | lessCSV output uses the -c flag:
cat ips.txt | ipinfo -c | lessExtracting a single field from each result uses -f:
cat ips.txt | ipinfo -f hostnameSummarize is a distinct operation from the bulk pipe. Its cap of 1000 IPs appears only in the introduction's feature bullet list and is not repeated in the detailed usage sections, making it the kind of limit that surfaces only after a user tries to process a larger set.
Both the bulk pipe and the summarize operation require a token.
Eleven subcommands also ship as standalone binaries with independent version numbers
grepip, grepdomain, matchip, prips, cidr2range, cidr2ip, range2cidr, range2ip, randip, splitcidr and mmdb are distributed as standalone binaries alongside the main CLI. Each carries its own version number: grepip is at 1.2.3, cidr2range at 1.2.0, range2cidr at 1.3.0, and the others at 1.0.0 or 1.1.0.
mmdb is versioned separately as mmdbctl-1.4.2 and operates on MaxMind MMDB format files locally, without calling the IPinfo API.
Installing each standalone binary uses the same methods as the main CLI, with just the binary name substituted in the install command. A Homebrew or Scoop install, a Docker image pull, or a manual binary download all work the same way for each subcommand. Version numbers for each are listed in the README's subcommand table and each links to its own GitHub release tag.
go install needs $GOPATH/bin in $PATH; the Docker image name differs from the GitHub repository path
go install places the binary in `$GOPATH/bin`. Making that path available requires `$GOPATH/bin` to be in `$PATH`, a prerequisite the README states explicitly before presenting the install command. On a default Go toolchain setup, this is often not configured.
For Docker users, an important distinction sits between the GitHub repository name and the Docker Hub image name. This repository is at `ipinfo/cli` on GitHub, but the Docker image is `ipinfo/ipinfo`. Anyone who constructs a Docker pull command from the GitHub path will get a failure; the README's own examples use `ipinfo/ipinfo:3.3.2` throughout, which is the correct form.
Windows PowerShell installation requires the shell to run as administrator. That requirement appears as a note in the README before the install command and affects any automated deployment script that does not handle privilege escalation.
Direct API calls via curl are the stateless alternative; the CLI adds bulk, CIDR tools and auth persistence
Calling the IPinfo API directly with curl is the stateless alternative to ipinfo CLI. A single request to the appropriate endpoint returns the same JSON data with no binary installation, no token file on disk, and no version to manage.
What the CLI adds over raw API calls is a set of operations that curl does not provide out of the box. Bulk piping over large address lists, field extraction with -f, CSV formatting with -c, CIDR expansion through the standalone cidr2ip and cidr2range binaries, and IP grepping with grepip are all operations that would otherwise require scripting. Auth persistence is also part of the picture: `ipinfo init` stores the token once so it does not need to appear on every command.
For teams that automate curl calls with shell scripts today, switching to the CLI gives a more consistent command interface. For single lookups or situations where adding a binary is unwanted, direct API calls remain adequate.
Editorial conclusion
ipinfo CLI is worth it for engineers who already rely on IPinfo.io data and want bulk lookups, CIDR expansion and field filtering without writing API wrappers. Register for a free token at ipinfo.io/signup before running bulk operations, since that is the only credential path the documentation covers. It is wrong for one-off lookups where a direct API call costs less setup, and wrong for environments that cannot add extra binaries. Before deploying via Docker, note that the image is published as ipinfo/ipinfo:3.3.2 on Docker Hub, not under the ipinfo/cli path that the GitHub repository uses.
Frequently asked questions
What is the ipinfo CLI?
ipinfo CLI is the official command-line tool for the IPinfo.io API, providing IP geolocation, ASN lookups, bulk processing and CIDR utilities from the terminal. It is written in Go and distributed under the Apache-2.0 license.
Does the ipinfo CLI require an API token?
Token-free use is documented as returning limited data and not supporting bulk lookups. Free tokens are available at https://ipinfo.io/signup and enable full field access and bulk operations.
How do I install the ipinfo CLI?
Eleven methods are covered: brew on macOS, apt via PPA on Ubuntu, a Debian one-time installer, FreeBSD ports, Arch AUR, Windows PowerShell as administrator, Scoop, Docker, go install, manual curl or wget binary download, and building from source with git.
How does bulk IP lookup work with the ipinfo CLI?
Pipe a file of IP addresses to the CLI: cat ips.txt | ipinfo returns results for each address. Add -c for CSV output or -f with a field name to extract one field. Bulk lookups require a token and the summarize command caps at 1000 IPs.
What is the Docker image name for ipinfo CLI?
The Docker image is published as ipinfo/ipinfo:3.3.2 on Docker Hub, not as ipinfo/cli. Without a volume mount at /root/.config/ipinfo, the token stored by ipinfo init is lost when the container exits.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ipinfo-cli)