There are a plethora of websites that will try to deduce your location from your IP address. For example: https://nordvpn.com/what-is-my-ip/.
This is handy for debugging VPNs - if I visit one of these sites and the location corresponds to the reported server location, rather than where I actually am, then I'm reasonably sure the VPN is working.
I'd like to be able to use a tool like this from the command line, where I can't operate a complicated web browser. Does such a tool exist?