Lurker News
Heeey! I built a macOS copilot that has been useful to me, so I open sourced it in case others would find it useful too.

It's pretty simple:
- Use a keyboard shortcut to take a screenshot of your active macOS window and start recording the microphone.
- Speak your question, then press the keyboard shortcut again to send your question + screenshot off to OpenAI Vision
- The Vision response is presented in-context/overlayed over the active window, and spoken to you as audio.
- The app keeps running in the background, only taking a screenshot/listening when activated by keyboard shortcut.
It's built with NodeJS/Electron, and uses OpenAI Whisper, Vision and TTS APIs under the hood (BYO API key).
There's a simple demo and a longer walk-through in the GH readme https://github.com/elfvingralf/macOSpilot-ai-assistant, and I also posted a different demo on Twitter: https://twitter.com/ralfelfving/status/1732044723630805212

Comments (159) 49 threads

Earlier comments
stephenblum1 reply#
You made real-life Clippy! for the Mac. This would be great to be for other mac apps too. Add context of current running apps.
ralfelfving#
It should work for any macOS app. It just takes a screenshot of the currently active window, you can even append the application name if you'd like.
lordswork1 reply#
This looks very cool. Does anyone know of something similar for Windows? (or does OP intend to extend support to Windows?)
ralfelfving1 reply#
Hey, OP here. I don't have a Windows machine so have not been able to confirm if it works, and probably won't be able to develop/test for it either -- sorry! :/

I suspect that you should be able to take my code and only require a few tweaks to make it work tho, shouldn't be much about it that is macOS only.

jamesmurdza1 reply#
Have you thought about integrating the macOS accessibility API for either reading text or performing actions?
ralfelfving#
No, my thought process never really stretched outside of what I built. I had this particular idea, then sat down to build it. I had some idea of getting OpenAI to respond with keyboard shortcuts that the application could execute.

E.g. in Photoshop: "How do I merge all layers" --> "To merge all layers you can use the keyboard shortcut Shift + command + E"
If you can get that response in JSON, you could prompt the user if they want to take the suggested action. I don't see myself using it very often, so didn't think much further about it.

spullara1 reply#
Did you not find the built-in voice-to-text and text-to-speech APIs to be sufficient?
ralfelfving#
Didn't even think of them to be honest.

Load more comments