GitHub

Harper: Project Description

What is the project about?

Harper is an English (currently American English only) grammar checker designed for speed, privacy, and efficiency. It aims to be a superior alternative to existing solutions like Grammarly and LanguageTool.

What problem does it solve?

Harper addresses the shortcomings of existing grammar checkers:

  • Privacy Concerns: Unlike Grammarly, Harper processes everything locally. No data is sent to external servers, protecting user privacy.
  • Performance Issues: It's significantly faster and uses far less memory than LanguageTool, making it suitable for real-time checking and integration into various editors. LanguageTool requires large downloads and significant RAM.
  • Cost: While not explicitly stated as "free", the existence of crates.io and npm packages, along with the open-source nature, strongly implies a free/open-source model, contrasting with Grammarly's subscription cost.
  • Accuracy and Context: Harper aims to provide more accurate and context-aware suggestions than existing tools, avoiding the "overbearing" and sometimes incorrect suggestions of competitors.

What are the features of the project?

  • Fast Grammar Checking: Processes documents in milliseconds.
  • Low Memory Footprint: Uses a fraction of the memory required by LanguageTool.
  • Completely Private: All processing happens locally; no data is sent to external servers.
  • WebAssembly Support: Can be loaded and run in a web browser via WebAssembly (demonstrated by writewithharper.com).
  • Extensible Core: Designed to potentially support other languages in the future (though currently only supports American English).
  • Language Server Protocol (LSP) Support: harper-ls provides integration with editors that support LSP (like Neovim, as mentioned explicitly).
  • JavaScript Library: harper.js provides a JavaScript interface for integration into web applications.
  • Neovim Integration: Specific support and documentation for Neovim.

What are the technologies used in the project?

  • Rust: The core of Harper (and harper-ls) is likely written in Rust, given the crates.io badge and the focus on performance and memory safety.
  • JavaScript/TypeScript: harper.js is a JavaScript library, and the website (writewithharper.com) likely uses JavaScript/TypeScript.
  • WebAssembly: Used to compile the core logic for use in web browsers.
  • Language Server Protocol (LSP): Used for editor integration.

What are the benefits of the project?

  • Privacy: User data remains private.
  • Speed: Fast grammar checking enables real-time feedback.
  • Efficiency: Low memory usage allows it to run on a wider range of devices.
  • Flexibility: Can be integrated into various environments (editors, web applications) via LSP and harper.js.
  • Open Source: The project is open-source, encouraging community contributions and transparency.

What are the use cases of the project?

  • Text Editors and IDEs: Integration with code editors and IDEs via the Language Server Protocol (e.g., Neovim, VS Code, etc.).
  • Web Applications: Incorporating grammar checking into web-based writing tools, forums, or content management systems using harper.js.
  • Browser Extensions: Potentially creating browser extensions for real-time grammar checking on any website (leveraging the WebAssembly support).
  • Command-Line Tools: Using harper-ls as a command-line tool for linting documents.
  • Any application requiring fast, private, and efficient English grammar checking.
harper screenshot