A command line tool to display the current global IP address.
$ npm install -g showip-cli
$ showip
203.0.113.1
You can select the service you want to use.
$ showip -s aws
203.0.113.1
service_cd | default | URL |
---|---|---|
aws | ✔ | https://checkip.amazonaws.com |
https://domains.google.com/checkip | ||
ifconfigio | https://ifconfig.io/ip | |
ifconfigme | https://ifconfig.me/ip | |
ipaddrshow | http://ipaddr.show/ |
In fact, there is a smarter way.
$ vi ~/.bashrc
alias showip='curl https://checkip.amazonaws.com'
The MIT License.