ScriptsMay 23, 2026·3 min read

Harper — Offline Privacy-First Grammar Checker

Fast open-source grammar checker written in Rust that runs entirely offline. Available as a CLI, language server, browser extension, and library.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Harper Overview
Universal CLI install command
npx tokrepo install e1b295c8-56e5-11f1-9bc6-00163e2b0d79

Introduction

Harper is an open-source English grammar checker built in Rust that runs entirely on the local machine. Unlike cloud-based tools, Harper never sends text over the network, making it suitable for confidential documents, air-gapped environments, and privacy-conscious workflows. Maintained by Automattic, it ships as a CLI, a Language Server Protocol (LSP) implementation, a WebAssembly module, and browser extensions.

What Harper Does

  • Detects grammar, spelling, and style issues in English prose
  • Runs as an LSP server for real-time feedback in any editor that supports LSP
  • Ships browser extensions for Chrome and Firefox to check text in web forms
  • Provides a Rust library crate for embedding in other applications
  • Operates entirely offline with no telemetry or cloud dependency

Architecture Overview

Harper parses text into a token stream, then applies a pipeline of lint rules written in Rust. Each rule receives a token window and emits diagnostics with suggested corrections. The LSP server wraps this pipeline behind the standard Language Server Protocol, serving diagnostics and code actions to editors. The WebAssembly build compiles the same Rust core for the browser extension, ensuring identical behavior across platforms.

Self-Hosting & Configuration

  • Install via Cargo: cargo install harper-cli harper-ls
  • Configure your editor to use harper-ls as the language server for plaintext and Markdown
  • Add custom words to a local dictionary file at ~/.config/harper/dictionary.txt
  • Disable specific rules in the LSP settings if they conflict with your style
  • Use the WASM build in CI pipelines for prose linting without Rust on the host

Key Features

  • Sub-millisecond linting speed even on long documents
  • No internet connection required at any point
  • Single binary with no runtime dependencies
  • Integrates with VS Code, Neovim, Helix, Zed, and any LSP-capable editor
  • Fully open source under the Apache-2.0 license

Comparison with Similar Tools

  • Grammarly — cloud-based with a freemium model; Harper is offline and open source
  • LanguageTool — Java-based with optional server; Harper is a single Rust binary
  • Vale — YAML-configured prose linter focused on style guides; Harper focuses on grammar
  • textlint — JavaScript plugin ecosystem; Harper is faster but less extensible
  • proselint — Python-based style checker; Harper covers grammar in addition to style

FAQ

Q: Does Harper support languages other than English? A: Currently Harper supports English only. Contributions for other languages are welcome.

Q: How do I use Harper in VS Code? A: Install the Harper extension from the VS Code marketplace. It bundles the LSP server.

Q: Can I add domain-specific terminology? A: Yes. Add words to the user dictionary file and Harper will stop flagging them.

Q: Is Harper suitable for Markdown and code comments? A: Yes. Harper understands Markdown syntax and skips code blocks when linting.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets