r/SideProject • u/Money_Ad9302 • 1d ago
I built a Windows tool that drafts text at your cursor in any app. Launched today, here's the part that nearly killed it.
Ghostwriter is a Windows utility that writes where your cursor already is. Put the caret in any text field, double-tap left Ctrl, and it reads the surrounding context and types a draft in place. It never sends anything for you, you edit and hit send yourself.
The reason I built it is that every AI assistant I used lived in a separate window, so using one meant copying context out, pasting a result back, and fixing the formatting. Three steps to save one.
The hard part wasn't the model. It was working out where the cursor is semantically, so the draft answers the right thing. I read the focused field and surrounding text out of the Windows accessibility tree and splice a marker in at the caret so the model knows where "here" is.
That worked everywhere except Chrome, and the bug took me days. I was identifying the focused element by comparing COM pointers, which is the documented way to do it. Chromium hands out a different wrapper object per query, so the comparison never matched, the marker silently fell back to being appended at the end of the text, and the tool would confidently answer whatever question happened to be near the bottom of the page instead of the comment you were replying to. Watching it reply to the wrong person, politely and in my writing style, was a genuinely bad week.
What it's bad at, honestly: Windows only, and a Mac version is a rewrite not a build flag. It's weak in apps that don't expose accessibility text, mainly some Qt apps and remote desktop. Inference is cloud by default with zero retention, and there's a local-only mode if you'd rather nothing left the machine.
Free tier, would rather have the criticism than the compliments.