Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 23, 2026·3 min de lecture

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.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Harper Overview
Commande CLI universelle
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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires