grammai: An Open-Source Browser Grammar Checker with Local AI CLI Integration
grammai is a GNU GPLv3 open-source Chrome extension offering offline English, German, and Romanian grammar checking alongside optional rewrites and translation
Sending every keystroke and draft to remote servers for grammar checking creates ongoing privacy and compliance concerns. The open-source Chrome extension grammai, developed by Silvestro and published under GNU GPLv3 (zilvestro/grammai), provides an alternative architecture: fully offline in-browser grammar validation paired with direct bridges to local CLI AI tools.

Image source: zilvestro (GitHub repository zilvestro/grammai)
Designed for Chrome and Chromium-based browsers such as Helium, grammai runs core linguistic checks entirely on the user's device. Following its public code release in mid-October 2026, the tool is accessible through both the Chrome Web Store and source builds.
Offline Browser Engine and Privacy-First Architecture
The foundational design of grammai eliminates third-party backend requirements for day-to-day writing assistance. Users do not need an account, an API key, or extra background runtimes.
- Bundled Offline Engines: Grammar rules and dictionaries for English, German, and Romanian are packaged directly into the extension. The tool runs without Java, Homebrew, or an external LanguageTool daemon.
- Contextual In-Place Corrections: Beyond simple typographical checks, local rules detect context-sensitive confusions, such as German phrasing differences between "Ist das wirklich war?" and "Ist das wirklich wahr?". Hovering over marked text reveals correction pills that can be accepted or dismissed in place.
- No Analytics or Telemetry: Ordinary editing and checking routines do not send telemetry, analytics, or automatic crash reports. Preferences, custom dictionaries, saved prompt templates, and domain exclusions stay in local browser storage.
The German and Romanian rule engines initialize in a few seconds on their first run, after which checks execute locally without latency.
Optional AI Assistance via Local Claude Code and Codex CLIs
Rather than bundling a paid cloud subscription, grammai connects to the user's existing AI credentials through local command-line tools. Text rewrites, custom prompt macros, deeper contextual analysis, and bidirectional translation across English, German, and Romanian rely on this mechanism.
This integration requires a one-time native helper installation, currently supported on macOS. The extension does not store API credentials in the browser; instead, it delegates requests through the helper to an authenticated local Claude Code or Codex CLI session.
When an explicit rewrite or translation command is triggered, only the selected snippet or active input field is dispatched to the chosen CLI tool. All upstream token costs and access rules remain governed by the user's existing Anthropic or OpenAI setup, eliminating intermediary subscriptions.
Editor Support, Keyboard Shortcuts, and Installation
grammai emphasizes keyboard-driven editing workflows, enabling writers to review suggestions and trigger transformations without reaching for the mouse:
- Toggle Assistant: Windows/Linux
Ctrl + Shift + Y(macOSCmd + Shift + Y) - Open Rewrite Menu: Windows/Linux
Ctrl + Shift + K(macOSCmd + Shift + K) - Translate Selection: Windows/Linux
Ctrl + Shift + L(macOSCmd + Shift + L) - Accept / Dismiss Suggestions:
Alt + Enterto accept,Alt + Backspaceto dismiss, andAlt + Zto undo the previous edit
Installation is available through the Chrome Web Store (extension ID coafchipjppaininmkchbiodpcdkkakc). Alternatively, developers can build the extension from source using Node.js 22 or higher:
npm ci
npm run build
Once built, navigate to chrome://extensions, enable Developer mode, select Load unpacked, and choose the generated dist folder. Helium follows the identical unpacked extension flow.
Current beta coverage spans standard <textarea> elements, single-line text inputs, native contenteditable containers, and verified Draft.js implementations (including X-style composition fields). Dedicated Google Docs canvas integration and generalized adapters for Shadow DOM, Slate, and ProseMirror remain works in progress. For developers seeking private, local grammar verification with optional CLI-level AI control, grammai delivers a functional, transparent alternative to proprietary browser writing tools.
Sources
- GitHub Repository: zilvestro/grammai