## File: README.md

[](https://github.com/automattic/harper/actions/workflows/binaries.yml)
[](https://github.com/automattic/harper/actions/workflows/build_web.yml)
[](https://github.com/automattic/harper/actions/workflows/just_checks.yml)
[](https://crates.io/crates/harper-ls)




Harper is an English grammar checker designed to be _just right._
I created it after years of dealing with the shortcomings of the competition.

Grammarly was too expensive and too overbearing.
Its suggestions lacked context, and were often just plain _wrong_.
Not to mention: it's a privacy nightmare.
Everything you write with Grammarly is sent to their servers.
Their privacy policy claims they don't sell the data, but that doesn't mean they don't use it to train large language models and god knows what else.
Not only that, but the round-trip-time of the network request makes revising your work all the more tedious.

LanguageTool is great, if you have gigabytes of RAM to spare and are willing to download the ~16GB n-gram dataset.
Besides the memory requirements, I found LanguageTool too slow: it would take several seconds to lint even a moderate-size document.

That's why I created Harper: it is the grammar checker that fits my needs.
Not only does it take milliseconds to lint a document, take less than 1/50th of LanguageTool's memory footprint,
but it is also completely private.

Harper is even small enough to load via [WebAssembly.](https://writewithharper.com)

## Language Support

Harper currently only supports English, but the core is extensible to support other languages, so we welcome contributions that allow for other language support.

## Performance Issues

We consider long lint times bugs.
If you encounter any significant performance issues, please create an issue on the topic.

If you find a fix to any performance issue, we would appreciate the contribution.
Just please make sure to read [our contribution guidelines first.](https://writewithharper.com/docs/contributors/introduction)

## Links

- [Frequently Asked Questions](https://writewithharper.com/#faqs)
- [Obsidian Documentation](https://writewithharper.com/docs/integrations/obsidian)
- [`harper-ls` Documentation](https://writewithharper.com/docs/integrations/language-server)
- Supported Editors' Documentation
  - [Visual Studio Code](https://writewithharper.com/docs/integrations/visual-studio-code)
  - [Neovim](https://writewithharper.com/docs/integrations/neovim)
  - [Helix](https://writewithharper.com/docs/integrations/helix)
  - [Emacs](https://writewithharper.com/docs/integrations/emacs)
  - [Zed](https://writewithharper.com/docs/integrations/zed)
- [`harper.js` Documentation](https://writewithharper.com/docs/harperjs/introduction)
- [Official Discord Server](https://discord.com/invite/JBqcAaKrzQ)

## Huge Thanks

This project would not be possible without the hard work from those who [contribute](https://writewithharper.com/docs/contributors/introduction).

<a href="https://github.com/automattic/harper/graphs/contributors">
  
</a>

Harper's logo was designed by [Lukas Werner](https://lukaswerner.com/).

---

## File: harper-cli/README.md

# `harper-cli`

## What?

`harper-cli` is a small, experimental frontend for Harper.
It can be used in any situation where you might need to check a large number of files automatically (like in continuous integration).

Right now it is quite feature barren, mainly because an external use-case has not been defined yet.
If you have any thoughts, feel free to reach out.

## Possible Future Features

- On-disk caching
- Custom dictionaries (maybe use the same ones as `harper-ls`?)
- Machine-readable output

---

## File: harper-comments/README.md

# `harper-comments`

This crate holds a number of functions, but it is primarily a wrapper around `tree-sitter` that allows Harper to locate the comments of a wide variety of programming languages.
It also has purpose-built parsers for the structured comments of a number of languages, including Go.
These additional parsers are available through the `CommentParser` and are enabled automatically through there.

---

## File: harper-core/README.md

# `harper-core`

`harper-core` is the fundamental engine behind [Harper](https://writewithharper.com), the private grammar checker.

`harper-core` is [available on `crates.io`](https://crates.io/crates/harper-core) to enable Rust engineers to integrate high-quality grammar checking directly into their apps and workflows.
Feel free to use `harper-core` in your projects.
If you run into problems with the code, open an issue or, even better, create a pull request.
We are also happy to chat with you on [Discord](https://discord.com/invite/JBqcAaKrzQ).

[The documentation for `harper-core` is available online.](https://docs.rs/harper-core/latest/harper_core/)

If you would prefer to run Harper from inside a JavaScript runtime, [we have a package for that as well.](https://www.npmjs.com/package/harper.js)

## Example

Here's what a full end-to-end linting pipeline could look like using `harper-core`.

```rust
use harper_core::linting::{LintGroup, Linter};
use harper_core::parsers::PlainEnglish;
use harper_core::spell::FstDictionary;
use harper_core::{Dialect, Document};

let text = "This is an test.";
let parser = PlainEnglish;

let document = Document::new_curated(text, &parser);

let dict = FstDictionary::curated();
let mut linter = LintGroup::new_curated(dict, Dialect::American);

let lints = linter.lint(&document);

for lint in lints {
    println!("{:?}", lint);
}
```

## Features

`concurrent`: Whether to use thread-safe primitives (`Arc` vs `Rc`). Disabled by default.
It is not recommended unless you need thread safety (i.e. you want to use something like `tokio`).

## Other Relevant Packages

- [`harper-ls`](https://crates.io/crates/harper-ls)
- [`harper-tree-sitter`](https://crates.io/crates/harper-tree-sitter)

---

## File: harper-ls/README.md

# `harper-ls`

Documentation for `harper-ls` has moved to the main [website](https://writewithharper.com/docs/integrations/language-server).

---

## File: harper-stats/README.md

# `harper-stats`

This crate contains the centralized logic for Harper's statistics logging.

---

## File: harper-wasm/README.md

# `harper-wasm`

`harper-wasm` is the WebAssembly-compiled version of the [Harper](https://github.com/automattic/harper) grammar checker.

Currently, the API exists to meet the needs of both the [web demo](https://writewithharper.com) and the Obsidian plugin.

---

## File: packages/wordpress-plugin/README.md

# Harper for WordPress



This repository contains the WordPress plugin for [Harper](https://writewithharper.com).
It is a work-in-progress. Here be dragons!

## Contributing

Refer to [the online documentation](https://writewithharper.com/docs/contributors/wordpress) for instructions to contribute to the plugin.

---

## File: packages/web/src/routes/docs/integrations/zed/+page.md

---
title: Zed
---

For our Zed integration, we have an [extension](https://github.com/zed-extensions/harper) that automatically downloads and runs [`harper-ls`](./language-server). For more information on how to install it and how it works, you can head over to the [extension's README](https://github.com/zed-extensions/harper/blob/main/README.md).

---

## File: packages/web/src/routes/docs/integrations/wordpress/+page.md

---
title: Harper for WordPress
---

<script>
    import {Button} from "components"
</script>

Harper still works great with WordPress, but the recommended way to use it today is the
[Chrome extension](https://chromewebstore.google.com/detail/private-grammar-checking/lodbfhdipoipcjmlebjbgmmgekckhpfb).
Read the announcement: [The Chrome Extension Supersedes the WordPress Plugin](https://elijahpotter.dev/articles/the_chrome_extension_supersedes_the_wordpress_plugin).

The extension is faster to iterate on than the WordPress.com plugin review process, which means you get new
features and fixes right away. It also offers a more holistic experience by keeping your Harper preferences in
sync across the sites where you write.



Install the Chrome Extension

Want to explore the classic workflow? Visit our online demo that runs inside the WordPress Playground.

Go to the Demo

## Still using the plugin?

The existing Harper WordPress plugin will stick around, but it no longer receives regular updates and is already a
few months behind the Chrome extension. If you need a manual copy, you can still download `harper.zip` from
[GitHub releases](https://github.com/Automattic/harper/releases/latest) and upload it to your site.