Commands

Every ip2geo CLI command: lookups, stored conversions, your account, projects, keys, websites, members, analytics and billing.

Each command takes --help for its options, and ip2geo help lists them all. Keys, websites, members and projects can be named by their id or by their name. Commands that act on a project use your current one unless you pass --project.

Lookups

CommandWhat it does
ip2geo <ip>...Locates addresses, the same as ip2geo convert. One address prints in full, several as a table
ip2geo convert --file ips.txtReads addresses from a file, or from stdin with --file - or a pipe. Add --unique to convert each address once
ip2geo meFinds the address you connect from, and locates it
ip2geo domain <domain>Resolves a domain’s A and AAAA records and locates each address. Free
ip2geo dns <domain>Looks up DNS records, all types or --type A,MX. Free
ip2geo asn <number>A network’s profile from the ASN directory, or --prefixes for every prefix it announces. Free
ip2geo asn listSearches the directory with --search, --country, --sort and --limit. Free
ip2geo notation <ip>Every IPv4 and IPv6 notation of an address, also as ip2geo ipv4 and ip2geo ipv6. Offline
ip2geo validate <value>...Checks values the way the SDK’s IP validation does, and exits 1 if any is invalid. Offline
ip2geo fieldsThe fields --fields and --select take, the same list as the SDK’s select constant

Stored conversions

CommandWhat it does
ip2geo conversions listYour conversions, newest first, with --limit, --offset, --search and --select, or --all of them
ip2geo conversions get <id>...Conversions by id, like the SDK’s GetConversion and GetConversions

Account

CommandWhat it does
ip2geo login / ip2geo logoutSigns in with an emailed code, or forgets the sign-in on this machine
ip2geo whoamiThe account, current project and API key the CLI uses
ip2geo accountYour profile; account update --name, --avatar <file> or --remove-avatar; account delete
ip2geo usageThis billing period’s conversions against your plan’s limit

Projects and team

CommandWhat it does
ip2geo projectsYour projects; current, switch, create, update, delete and leave
ip2geo keysSecret keys; create (--use to convert with it), rename, rotate, delete, secret and use
ip2geo websitesWebsites and their public keys; add, rename, enable, disable and remove
ip2geo membersMembers and invitations; invite (as --role admin or the default viewer), resend, role and remove
ip2geo invitesInvitations you received; show and accept, with the link from the email

Switching projects in the CLI switches them on the dashboard too. Rotating or deleting the key the CLI converts with updates its config by itself.

Viewers can look at a project but change nothing in it. A project keeps one owner: nobody can be made an owner, the owner cannot be removed, and nobody removes themselves (ip2geo projects leave instead). Team Members lists what each role can do.

Analytics and billing

CommandWhat it does
ip2geo analyticsToday against yesterday, conversions over --range today, week, month, year or all-time, and the top countries and cities
ip2geo billingYour plan and this period’s usage; history, invoice, plans, upgrade <plan> and portal

Checkout and the billing portal open in your browser with --open; otherwise the CLI prints the link.

The CLI itself

CommandWhat it does
ip2geo configSettings and where each comes from; get, set, unset and path
ip2geo statusChecks the API, your credentials and the config
ip2geo completion bashShell completion for bash, zsh or fish
ip2geo versionThe version and the runtime it runs on
Get Started

Convert IPs into accurate location data in milliseconds.

Sign up today and get 1,000 free monthly conversions, and discover why developers trust us for fast, reliable, and affordable IP conversions.