identme

Lookup and display your public IP address from the command line

brewmacoslinux
Try with needOr install directly
Source

About

Public IP address lookup

Commands

identme

Examples

Display your public IP address$ identme
Get public IP in JSON format$ identme --json
Display IP with additional details$ identme --verbose