Harper
PackageOffline English grammar checker in Rust that runs in the browser via WebAssembly
- Price
- Free, open source
- Access
- None, runs locally
About
Harper is Automattic's open-source English grammar and spelling checker. harper.js runs it in the browser or Node.js through WebAssembly and harper-ls brings it to editors, so text never leaves the device. English only; the harper.js API is still marked early access.
What you can do with it
- Check grammar and spelling in a web app's text box without sending text to a server
- Lint Markdown docs and code comments for English mistakes in VS Code or Neovim
- Add on-device English proofreading to an Electron or Node.js app
Get started
- Run npm install harper.js
- Create a LocalLinter with the bundled binary and call lint()
Example
import { LocalLinter, Dialect } from "harper.js";
import { binary } from "harper.js/binary";
const linter = new LocalLinter({ binary, dialect: Dialect.American });
const lints = await linter.lint("This is a example of how to use harper.js.");
for (const lint of lints) console.log(lint.message(), lint.span());Details
- Hosting
- Runs locally
- Available in
- Worldwide
- Official SDKs
- JavaScript/TypeScript, Rust
- MCP server
- None
- Works with
- VS Code