I’ve written a shell script to query common network parameters including public IP. The ipinfo service is among the supported finders.
Originally, I’ve come here to just post about this, but since there is a hackaton event going on, I thought to post it under this tag.
Hope its helpful,