gitmyhub

harper

Rust ★ 11k updated 4h ago

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

A fast, privacy-first English grammar checker written in Rust that runs entirely on your device in milliseconds, with plugins for VS Code, Neovim, Obsidian, and web apps, no server, no data ever leaves your machine.

RustWebAssemblyJavaScriptsetup: easycomplexity 2/5

Harper is an English grammar checker built in Rust. It checks your writing for grammar mistakes locally on your device, without sending anything to a server. The author built it because existing options had drawbacks that made them frustrating to use in practice.

The README explains the motivation directly. One popular grammar checker sends everything you type to external servers, which the author sees as a privacy problem. Another well-known option requires downloading a large dataset (around 16 gigabytes) and uses so much memory that it runs slowly on ordinary machines. Harper is designed to address both of those complaints: it keeps your text on your device and runs fast enough that checking a document takes only milliseconds rather than seconds, using far less memory than the alternatives.

Harper integrates with text editors and writing tools through a language server, which is a standard way for editors to talk to external tools that provide suggestions. The README lists supported editors including Visual Studio Code, Neovim, Helix, Emacs, and Zed. There is also a plugin for Obsidian, a note-taking application. Beyond desktop editors, Harper can run in a web browser through WebAssembly, meaning it can be embedded in websites without requiring a server-side component.

A JavaScript package called harper.js is available for developers who want to add grammar checking to web applications. The core is written to be extensible to other languages beyond English, though as of this README only English is supported.

The project treats slow performance as a bug rather than an acceptable limitation. If the checker takes too long on a document, the maintainers want to hear about it and will treat it as something to fix. Harper is maintained by Automattic and welcomes outside contributions.

Where it fits