Fork notice. This is a modified fork of OpenGrammar by Swadhin Biswas, distributed under the Apache License 2.0. It contains substantial changes (a new Harper-based inline engine, a local n-gram context re-ranker, re-architected LLM correction, encrypted API-key storage, additional providers, a proactive sentence-review flow, and an all-new OS-wide desktop app — see
NOTICEfor the full list of modifications). It is not affiliated with or endorsed by the original author. The originalLICENSEandNOTICEare retained as required by Apache-2.0.
Your privacy-first, open-source writing assistant — now everywhere you type. A free, local-first, bring-your-own-key alternative to premium grammar tools.
OGrammar now ships as two distinct products that share the same Harper + LLM engine but run in completely different places:
A Grammarly-style assistant for Chrome / Brave / Edge. Inline underlines, proactive
sentence review, autocomplete, tone rewriting, writing stats, and opt-in autocorrect —
in Gmail, Google Docs, Notion, Reddit, and any web editor.
→ Install · source in opengrammar/extension/
A native (Rust, no Electron) OS-wide proofreader that works in any focused text
field — Notepad, Word, Slack desktop, chat boxes, IDE fields — via UI Automation. True
OS overlay underlines, click-to-fix cards, opt-in autocorrect, and an LLM rewrite pen
(Polish / Formal / Casual on your selection or the whole field, with preview before apply).
→ Overview · Build · source in desktop/
The two are de-conflicted: the desktop app excludes browsers by default, so the extension owns the browser and the desktop app owns everything else. Run both for end-to-end coverage.
- Harper (local, instant): the Harper engine runs 100% on-device — spelling, grammar, punctuation, capitalization, style — no network, no account.
- On-device grammar model (optional, beta): off by default. Turn it on to download a ~114 MB grammar model once; it then runs on your CPU, offline, and catches everyday grammar slips Harper misses ("he go", "she like"). Nothing is sent anywhere, and its suggestions are never autocorrected. See docs/34-gector-grammar-pass.md.
- LLM context tier (optional, BYOK): add your own key (OpenAI, DeepSeek, Groq, OpenRouter, Together, or local Ollama) for context/sentence review. The model's findings are merged with Harper's and de-duplicated (Harper wins on overlap).
- Parity: the desktop's Rust
ograms-engineis a direct port of the extension's LLM correction core (normaliser, diff fallback, protected-text guard), and every AI instruction — proofreading, the three tones, and Rephrase — lives in ONE shared file,opengrammar/extension/src/shared/prompts.json, which the extension imports and the desktop embeds at build time (a desktop test pins the mobile copy to it). Spelling parity is gated byopengrammar/extension/scripts/parity-harness.mjs(≥99% top-1 agreement). The grammar model's pipeline is pinned in both products by the same golden fixtures (opengrammar/extension/test-data/gector-golden.json). - Privacy: local-first, bring-your-own-key, no text telemetry. Keys are encrypted at
rest (extension:
chrome.storage; desktop: Windows DPAPI in%APPDATA%\OGrammar).
OGrammar 1.0.0 uses two models we fine-tuned ourselves. Both are optional and run on your own machine.
- Grammar model (GECToR, v1.0.0): a fine-tune of
proofbird/gector-bert-en(Apache-2.0), ~109 MB int8 ONNX, published as the GitHub releaseog-gector-bert-en-v1.0.0-int8onzazzn/ogrammar(and on Hugging Face atzazzn/og-gector-bert-en), and downloaded by the apps from that release when you turn the grammar model on. Against the original model it makes far fewer edits to correct text (3 wrong changes instead of 23 on our clean test sets) and fixes more errors. - Tone model (
og-tone-qwen3.5-4b): a QLoRA fine-tune of Qwen3.5-4B (Apache-2.0) for the Polish / Formal / Casual rewrites, run through local Ollama. Published on Hugging Face at hf.co/zazzn/og-tone-qwen3.5-4b.
How they were trained, the data and its licences, the teacher models, results and costs:
docs/36-model-training.md. To train them yourself, see
docs/35-fine-tuning-guide.md and training/.
Extension: build opengrammar/extension, then in chrome://extensions enable
Developer Mode → Load unpacked → select the built extension. Open its options to add
your AI key. See docs/04-browser-extension-setup.md.
Desktop (Windows):
cd desktop
cargo build --release -p ograms-hotkey
.\target\release\ograms-hotkey.exeThen open Settings from the tray icon to set your dialect, AI provider/model, and key. See desktop/README.md.
Start at docs/30-products-overview.md, or the full index at docs/00-index.md.
See CONTRIBUTING.md and ROADMAP.md.
Apache 2.0 — see LICENSE and NOTICE. OGrammar is a modified fork
of OpenGrammar.