A lightweight macOS menu bar app for system-wide grammar correction, text rewriting, and voice-to-text, powered by local LLMs via Ollama or LM Studio and on-device speech recognition via Moonshine.
Select text in any app, hit a keyboard shortcut, and get instant results. Hold a shortcut to dictate with your voice. All processing happens locally. No data leaves your machine.
Latest Release: 1.3.0
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | Rewrite-apple-silicon.dmg |
| macOS (Intel) | Rewrite-intel.dmg |
- Download the DMG for your Mac
- Open the DMG and drag Rewrite.app to your Applications folder
- On first launch, right-click the app and select Open (macOS blocks unsigned apps by default)
- Grant Accessibility permissions when prompted
- macOS 13+
- Swift toolchain (Xcode or Command Line Tools)
- CMake (for building the Moonshine C++ core)
- Git
git clone --recursive https://github.com/sanathks/rewrite.git
cd rewriteIf you already cloned without --recursive, initialize the submodule:
git submodule update --init --depth 1Build the app:
chmod +x Scripts/build.sh Scripts/install.sh
./Scripts/build.shThis will:
- Build the Moonshine C++ core and create the XCFramework (first time only)
- Compile the Swift app in release mode
- Create
build/Rewrite.appandbuild/Rewrite.dmg
To build for a specific architecture:
./Scripts/build.sh arm64 # Apple Silicon only
./Scripts/build.sh x86_64 # Intel only./Scripts/install.shThis copies Rewrite.app to ~/Applications and registers it with Launch Services.
Or simply open the DMG from build/Rewrite.dmg and drag to Applications.
To pull the latest Moonshine changes:
git submodule update --remote vendor/moonshineThen rebuild the XCFramework by removing the old one and running the build:
rm -rf vendor/moonshine/swift/Moonshine.xcframework
./Scripts/build.sh- Ollama or LM Studio installed and running
- For Ollama, pull a model (default:
gemma3):ollama pull gemma3
- For LM Studio, load a model and start the local server (default port:
1234)
- Launch Rewrite -- an icon appears in the menu bar
- Select text in any app (browser, Slack, Notes, TextEdit, etc.)
- Press
Ctrl+Shift+Gto silently fix grammar (text is replaced in-place, no popup) - Press
Ctrl+Shift+Tto open the rewrite popup with mode selection - Click Replace to swap the original text, or Copy to copy to clipboard
Press Esc to dismiss the popup.
- Download a speech model from Settings (Tiny, Small, or Medium)
- Grant microphone permission when prompted
- Hold
Ctrl+Option+Sand speak - Release the keys to stop recording
- The transcribed text is inserted at your cursor
When Auto Grammar Fix is enabled (default), transcribed text is automatically corrected by the LLM before insertion. Toggle this off in Settings to insert raw transcription.
You can select which microphone to use from the Settings dropdown.
Rewrite uses Moonshine for on-device speech recognition. Three streaming models are available:
| Model | Size | Accuracy | Latency (MacBook Pro) |
|---|---|---|---|
| Tiny | ~35 MB | Good | ~34ms |
| Small | ~130 MB | Better | ~73ms |
| Medium | ~300 MB | Best | ~107ms |
All models run entirely on-device with no internet required.
The rewrite popup runs your default mode immediately and shows mode pills to switch between:
- Fix Grammar -- fixes grammar, spelling, and punctuation errors without changing tone or wording
- Clarity -- simplifies text for maximum readability
- My Tone -- rewrites to match your personal tone description
- Humanize -- makes AI-generated text sound natural
Click Replace to swap the original text in-place, or Copy to copy the result to clipboard.
Modes are fully configurable. Add, remove, or edit modes and their prompts via Configure... in settings.
Click the menu bar icon to access settings:
- Server URL -- default:
http://localhost:11434(Ollama) orhttp://localhost:1234(LM Studio) - Model -- auto-detected from your LLM server
- Rewrite Modes -- click Configure to edit mode names and prompts
- Shortcuts -- click to rebind the grammar, rewrite, and voice input hotkeys
- Default Mode -- choose which mode the Quick Fix shortcut uses
- Voice Input -- select speech model, microphone, and toggle auto grammar fix
- Launch at Login -- start Rewrite automatically when you log in
Settings persist across app restarts.
Rewrite uses the macOS Accessibility API to read and write text in any app. When you trigger a shortcut:
- Reads the selected text via accessibility
- Sends it to your local LLM server with a tailored prompt
- For Quick Fix: silently replaces the text in-place using the default mode
- For rewrite: shows a popup near your selection with mode options and the result
- On "Replace", writes the corrected text back into the source app via accessibility
For voice input:
- Captures audio from your selected microphone
- Transcribes speech on-device using the Moonshine streaming model
- Optionally runs the transcription through the LLM for grammar correction
- Inserts the result at your cursor position
rewrite/
Sources/Rewrite/ # Swift source code
Resources/ # Info.plist, icons
Scripts/
build.sh # Build app bundle and DMG
build-moonshine.sh # Build Moonshine C++ core + XCFramework
install.sh # Install to ~/Applications
vendor/moonshine/ # Moonshine submodule (speech recognition)
Package.swift # Swift Package Manager manifest
MIT


