Is there a way to access a Mac's geolocation from terminal?
vilmoskörte's answer appears to be a good one, but I took it upon myself to make a tool that does this for my own education. I put it on GitHub.

WhereAmI

A simple command line tool. No options, just runs and outputs Lat/Long, accuracy in meters, and a timestamp. It will need OS X Location Services to be turned on (System Preferences > Security &amp; Privacy), and permission to gather your location (OS X will prompt you on first run).

Direct Download Link (.zip)