npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

ipify-cli

5.0.0

@sindresorhus

npmHomeRepoSnykSocket
Downloads:8
$ npm install ipify-cli
DailyWeeklyMonthlyYearly

ipify-cli

Get your public IP address

Using the ipify API or a custom ipify instance.

Install

npm install --global ipify-cli

Usage

$ ipify --help

  Usage
    $ ipify

  Options
    --endpoint  Custom API endpoint (can be used multiple times for redundancy)

  Examples
    $ ipify
    2001:0db8:85a3:0000:0000:8a2e:0370:7334
    $ ipify --endpoint=https://ipify.mycompany.com
    2001:0db8:85a3:0000:0000:8a2e:0370:7334
    $ ipify --endpoint=https://api.ipify.org --endpoint=https://ipify.example.org
    2001:0db8:85a3:0000:0000:8a2e:0370:7334

Multiple Endpoints

You can specify multiple endpoints for redundancy. The CLI will try all endpoints concurrently and return the first successful response:

$ ipify --endpoint=https://api.ipify.org --endpoint=https://api64.ipify.org --endpoint=https://backup.example.com

Related

  • ipify - API for this package