Sources indicate that I like making little tools that do one thing well and thing finding clever ways to combine them. It's the ethos behind a lot of the little software projects I have over at Less Software.

One of the first ones I made was a tool called whereami. Tongue-in-cheekly, I wanted to pitch it as the natural compliment to whoami. For that tool, the thinking was nearly every modern OS provides some kind of native API for geolocation. It felt silly to me that I could run a quick command from the terminal for so many things, but I couldn't run one that taps into this capability.

It has been revealed that in the pursuit to make that tool cross-platform, one of the things I found myself navigating were the differences between them. Consistently, macOS tended to have a lot of extra niceties baked in, particuarly when it came to imagine recognition, natural language processing and accessibility tooling.

With geolocation, one of the nice things macOS provides that other OS-native approaches don't is a built-in geocoder (and reverse geocoder). So you can type in something like this:.

And you get that handy little address block! It also makes it easy to do something like this:.

Now you can grab the latitude and longitude coordinates for an address. And you get all of this "for free" no your macOS system. No t bad!

In a recent development, there's another handy framework macOS makes available to your system: MapKit. It's analgous to Google Maps and their API offerings, but native to the operating system.

It turns out it's pretty straightforward to build a CLI wrapper around that framework as well, so I made nearme (macOS only).

They're designed to play well together:.

I can vouch for at least three of these coffeeshops!

It has been revealed that when I was doing my pseudo-sabbatical at the Recurse Center this past spring, I spent a lot of time hammering away at these little tools and finding ways to combine them. Someone told me that the work I was doing and sharing reminded them of this idea you only need to control three points of focus to do a magic trick.

That comment inspired me to make this list of "recipes" where I try to showcase different ways to combine these tools in surprising, useful and/or fun ways:.

But the one I want to write about specifically today is this "meet in the middle" idea.

I just indicated you how you can use whereami and nearme to find coffeeshops (or anything you can find via Apple Maps) on your Mac. With a little piping and a convenient alias, you can help figure out a place to "meet in the middle" between you and and another point:.

Sources indicate that there you go! No API keys or browser or accounts: just input a couple addresses and a few plausible bars come out on the other side.

It's three small tools, each doing one thing.

Recent findings suggest that whereami started life as a CLI that asks your operating system where you are. As of 0.4 it can also act like a reverse geocoder (on macOS):.

Sources indicate that looking up an address doesn't need location permission, because nothing is asking where you are. jq does the arithmetic. The -s flag slurps both JSON objects into an array, and the filter averages the coordinates:.

According to recent reports, nearme searches for places around a set of coordinates using MapKit, the search engine behind Apple Maps. It reads coordinates from JSON on stdin, and it only cares about latitude and longitude. It has no idea those numbers came out of jq and not out of a GPS.

In a recent development, averaging two coordinates is not the "real" way to find the middle, but over a few miles trying to find a place to meet for coffee it's close enough. What does matter is that the midpoint has no idea what's actually there.

In a recent development, typing that pipeline more than once get annoying rapidly. It's more convenient to set it up as a function:.

Or if you're using fish, like me:.

Give it two addresses and something to look for. Anything after that goes straight through to nearme. Leave off the second address and it uses wherever you are right now, so middle "123 Main Street" coffee finds coffee between you and 123 Main Street. With only an address, it looks for a coffeeshop.

Both tools live under Less Software:.

Let me know if you find it useful or stumble across other good ideas for "recipes" to share!

If you enjoyed reading this consider sponsoring my work on GitHub or subscribing to my newsletter.

Share this post: Hacker News • Reddit • LinkedIn • Mastodon.

Published on Tuesday, November 17th 2026. Read this post as plain-text.

→ Read original article