Harper: The Free, Private Grammarly Alternative Built in Rust
BBetter Stack
Computing/SoftwareLanguages
Transcript
00:00:00Grammarly costs over $140 a year and according to its own documentation everything you type is
00:00:06shipped to their servers and stored there. A more blunt name for that would be a keylogger you pay
00:00:11for. This is Harper. It's a grammar checker that's free, written in Rust, and works with your Wi-Fi
00:00:17turned off. Before you get too excited I typed, what's going on? I'm Josh into it and it didn't
00:00:23blink. Stay with me because both halves of that are the point.
00:00:30Now, with Harper, the more interesting thing about it is what's missing. There's no AI
00:00:35in it at all. It's a rule-based engine. Your text gets tagged word by word, then ran through
00:00:41about 287 handwritten Rust rules. Rules are deterministic. The same sentence gets the same verdict every
00:00:48single time. Now, compare that to what Grammarly users keep complaining about. It tells you to
00:00:53delete a comma at 9 and then put it back at 10. That's a machine learning model changing
00:00:58its mind about your writing. Harper never changes its mind. And because nothing ever leaves your
00:01:04machine, it's instant. The claim is under 10 milliseconds per check. One more thing before
00:01:10I live run this: since November 2024, Harper belongs to Automatic, the WordPress company,
00:01:15which hired its creator and kept everything Apache 2.0. Hold that thought because I'm going to circle back
00:01:21to it in just a second. If you enjoy coding tools to speed up your workflow, be sure to subscribe. We have
00:01:26videos coming out all the time. Now check this out. Brew install Harper or one click the VS code extension.
00:01:33It's native to Apple Silicon. And now you can switch the Wi-Fi off. You can go fully offline. If you run
00:01:38this, I'm going to type "I ate an pineapple." Flagged instantly. If I type along the lines of "I need
00:01:45the the from the store," "the the" is flagged. I spell a word wrong now like "your point is mute." It suggests
00:01:54an alternative. That correlation is literally a handwritten rule in the source code. I checked.
00:02:01I don't think it's too late. Spelled some things wrong there. Bad punctuation. Three underlines
00:02:06before I could even finish the sentence. No spinner, no cloud. There's nothing to wait for. And here's
00:02:12the part that's going to help us in development. I'll open a TypeScript file and write a comment. I'm
00:02:18going to write "receive the payload." Again, I spelled some things wrong. Harper flags both typos inside the
00:02:25comment. It ignores every line of actual code around it. It does this across basically every language we
00:02:31can write in. Harper ships a zero-language server so it drops into Neo, Vim, Zed, Helix, Emacs,
00:02:37one line of config. The Obsidian plugin, 200,000 downloads, checks your notes, and skips code fences,
00:02:45the exact thing Grammarly actually trips over. The whole engine compiles to web obscenely.
00:02:52So writewithharper.com runs the full checker inside your browser tab. That's your zero install test drive.
00:02:59Think of it this way. Grammarly is an app that watches you type. Harper is a component you install
00:03:04into your tool chain. Now, how does all this land? Grammarly's ML does things Harper doesn't even
00:03:10attempt. Tone, clarity coaching, whole sentence rewrites. Language tool, self-hosted, is the nearest free
00:03:17rival. But here's the fine print nobody's reading. It's good context checks need a 16 gigabyte Ngram
00:03:24data set and the RAM to match. Skip that and Hacker News users found it missing obvious errors.
00:03:31Now, you need to know exactly where that baseline ends. Now, if I just write out here,
00:03:35me and Sally went to have seen the duck's cousin. There's errors, but there's zero errors. Perfectly clean,
00:03:43right? Now, what your name? What day today? Also clean. That's the ceiling of rules. If no rule
00:03:51matches the way a sentence is broken, nothing's going to fire. 287 modules versus language tools,
00:03:566,000 rules versus Grammarly's models. Coverage is what you trade for privacy and speed.
00:04:02And it cuts the other way too. 240 issues in this repo mentioned false positive. It flagged the word
00:04:09Cloudflare for reviewers. Fixes are shipping weekly, but you will hit some. Those speed and memory numbers,
00:04:15the vendors own numbers. There's no benchmarks, they don't exist yet. And one NeoVim user clocked the
00:04:21language server at over a gigabyte of RAM. It's again, English only. Five dialects, nothing else.
00:04:29And the automatic thing I said earlier, after two years of WordPress engine drama,
00:04:33some developers on Hacker News said flat out they won't adopt anything Matt Mullenweg controls.
00:04:39Fair concern. Now, if you pay Grammarly for tone rewrites, keep paying. Harper's not going to
00:04:45replace that. If you want a free private instant checker living inside your editor for code comments,
00:04:50commit messages, docs, notes, nothing else comes close. This is a great hack. My favorite comment in the
00:04:56whole Hacker News thread that I came across was from a dyslexic writer who paid for Grammarly for years.
00:05:03They said it actually worked better back when it was dumb and role-based.
00:05:07When a tool fires on every keystroke in your editor, predictability isn't a compromise,
00:05:12it's the whole feature. Harper is free, released every week or two, and it covers precisely the
00:05:17surfaces Grammarly will never see. Your comments and your commits. The best privacy feature ever shipped
00:05:23isn't a settings toggle or a policy page. It's software that never needed your data in the first place.
00:05:29If you enjoy coding tips and tricks like this, be sure to subscribe to the BetterStack channel.
00:05:33We'll see you in another video.