I regularly find myself needing to know my public IP, but swapping from Terminal to check DDG only serves to break my flow.

Instead, we can use ipinfo.io to get a terminal-friendly version:

$ curl ipinfo.io
{
  "ip": "81.92.201.10",
  "city": "London",
  "region": "England",
  "country": "GB",
  "loc": "51.5085,-0.1257",
  "org": "AS9009 M247 Ltd",
  "postal": "EC1A",
  "timezone": "Europe/London",
  "readme": "https://ipinfo.io/missingauth"
}%

Or, for even more terse output, pipe to jq

$ curl -s ipinfo.io | jq .ip
"81.92.201.10"