Local Agent Vibe Coded Keylogger
I’ve been doing a lot of experiments and spikes using my local lab running a local LLM (on an Nvidia 5060Ti with 16gb) using my own AI harness (written by hand in a language other than python or javascript; thank you very much), and I decided to put it through it’s paces and let it try to code something itself.
I am close to releasing an old school digital audio workstation (called a Tracker) for Mac and the Steam Deck. It’s really fun, but if you are not used to trackers you’d probably find it impossible to use. To hopefully mitigate that learning curve, I decided to make some videos showing how to use it.
I wanted to have the key presses visible in the video to make it clear what I was doing as I made a song. To my surprise, there is no way to just display key presses on macOS. I had a look around for an application to display my keystrokes (like KeyCastr), but then I started thinking… why would I purposefully install a key logger on my own system? Sure some of them were open source, but I really didn’t feel like auditing the code.
This seemed like the perfect opportunity to try out what I have been saying to a number of people, “vibe coding” is perfect for those little apps and workflows that you use internally. And it seemed like a good test to see if my little local model could pull it off.
It worked:
At the end of that video was showing another surprise, it appears Xcode can use local models as well. It’s built right into the IDE - who knew?
And the final application wasn’t a tremendously bloated mess either:

It was easy to review and thumbs up.
“We” planned the code, broke it into tasks, it went off and wrote the code, and mostly worked out of the box. There was one part that was a bit nuts. It tried to recreate an entire ASCII table lookup instead of just:
let nsEvent = NSEvent(cgEvent: event)
var baseCharacter = nsEvent?.charactersIgnoringModifiers ?? ""
And if you knew nothing about coding that would have stumped someone for quite a while. Also, I am not a Swift programmer so I don’t know if that is the best way to do that. My Spidey Sense looking over the code tells me there are bits that could definitely be done in a better way. However, for a simple utility that I don’t plan on releasing, the code seems fine.
Also, it knew about all the macOS permissions it needed to dance around to log keystrokes which would have taken me a while to look up.
The best thing about this was: I didn’t use any foundation model tokens.