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

Show all comments

Showing thread 42 of 49

ProfessorZoom2 replies#
e-e-e-electron... for this..
ralfelfving6 replies#
I don't know man. I'm new to development, it's what I chose, probably don't know any better. Tell me what you would have chosen instead?
xNeil1 reply#
electron's a really nice option, specially for people that aren't interested in porting their apps or spending too much time on development

this is a macOS specific app it seems - if you want better performance and more integration with the OS, i'd recommend using swift

ralfelfving1 reply#
Time to learn learn Swift in the next project then! Thank you for the deets.
Filligree#
The good news is you already have a tool to help you with inevitable XCode issues. grin
lolinder1 reply#
Don't mind them—there's a certain subset of HN that is upset that web tech has taken over the world. There are some legitimate gripes about the performance of some electron apps, but with some people those have turned into compulsive shallow dismissals of any web app that they believe could have been native.

There's nothing wrong with using web tech to build things! It's often easier, the documentation is more comprehensive, and if you ever wanted to make it cross-platform election makes it trivial.
If you were working for a company it might be worth considering the trade-offs—do you need to support Macs with less RAM?—but for a side project that's for yourself and maybe some friends, just do what works for you!

ralfelfving1 reply#
Thank you for the explanation! At the end of the day, I'm a newbie and I'm in it to learn something new with each project. Next time I'll probably try my hand at a different framework.

Continue this thread — 1 reply

jdamon961 reply#
ignore the naysayers; nice job building out your idea
ralfelfving#
Thank you! I got pretty thick skin, but always a bit of insecurity involved in doing something the first time -- first public GH repo and Show HN :D
airstrike#
I think the parent comment is a shallow dismissal, but since you're asking, I would have built in SwiftUI
guytv#
What's important is to get an product out there. Nobody cares what stack you use. just us geeks. don't get discouraged. you did well :)
programmarchy#
My two cents: I think you made a good, practical choice. If you're happy with Electron, I'd say stick with it, especially if you have cross-platform plans in the future.

If you want to niche down into a more macOS specific app, you could learn AppKit and SwiftUI and build a fully native macOS app.
If you want to stay cross-platform, but you're not happy with Electron, then it might be worth checking out Tauri. It provides a JavaScript-based API to display native UI components, but without packaging a V8 runtime with your app bundle. Instead, it uses a native JavaScript host e.g. on macOS it uses WebKit, so it significantly reduces the download size of your app.
In terms of developing this into a product, on one hand it seems like deep integration with the host OS is the best way to build a "moat", but then again, Apple could release their own version and quickly blow a product like that out of the water.

atraac1 reply#
Ah yes, cause what's better than building a real, working MVP? Learning Rust for half a year just so you can 'optimize' the f out of an app that does two REST calls.
wtallis#
To be fair, this does sound like the kind of app that would benefit from being able to launch instantly, and potentially registering with the OS as a service in a way that cross-platform frameworks like Electron cannot easily accommodate. But Rust would not be the easiest choice to avoid those limitations.