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.
| Command | What it does |
|---|
ip2geo <ip>... | Locates addresses, the same as ip2geo convert. One address prints in full, several as a table |
ip2geo convert --file ips.txt | Reads addresses from a file, or from stdin with --file - or a pipe. Add --unique to convert each address once |
ip2geo me | Finds 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 list | Searches 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 fields | The fields --fields and --select take, the same list as the SDK’s select constant |
| Command | What it does |
|---|
ip2geo conversions list | Your 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 |
| Command | What it does |
|---|
ip2geo login / ip2geo logout | Signs in with an emailed code, or forgets the sign-in on this machine |
ip2geo whoami | The account, current project and API key the CLI uses |
ip2geo account | Your profile; account update --name, --avatar <file> or --remove-avatar; account delete |
ip2geo usage | This billing period’s conversions against your plan’s limit |
| Command | What it does |
|---|
ip2geo projects | Your projects; current, switch, create, update, delete and leave |
ip2geo keys | Secret keys; create (--use to convert with it), rename, rotate, delete, secret and use |
ip2geo websites | Websites and their public keys; add, rename, enable, disable and remove |
ip2geo members | Members and invitations; invite (as --role admin or the default viewer), resend, role and remove |
ip2geo invites | Invitations 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.
| Command | What it does |
|---|
ip2geo analytics | Today against yesterday, conversions over --range today, week, month, year or all-time, and the top countries and cities |
ip2geo billing | Your 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.
| Command | What it does |
|---|
ip2geo config | Settings and where each comes from; get, set, unset and path |
ip2geo status | Checks the API, your credentials and the config |
ip2geo completion bash | Shell completion for bash, zsh or fish |
ip2geo version | The version and the runtime it runs on |