A macOS menu bar app that fixes your typos in real time — across every app on your Mac, including browser-based editors like Slack, Linear, Notion, and Gmail.
Instant corrections for obvious typos. Cloud LLM for everything else. Works system-wide via macOS Accessibility APIs with a Chrome extension bridge for web apps.
- System-wide correction — works in any text field on macOS: native apps, Electron apps, and browser-based editors
- 3-tier correction engine
- Tier 1: Instant — SymSpell dictionary lookup corrects obvious typos in <1ms (
teh→the,recieve→receive) - Tier 2: Confidence routing — ambiguous corrections (edit distance 2, multiple candidates) are held for sentence context
- Tier 3: Cloud LLM — full sentences are sent to a cloud LLM (Anthropic, OpenAI, or Gemini) for context-aware correction
- Tier 1: Instant — SymSpell dictionary lookup corrects obvious typos in <1ms (
- Configurable aggressiveness — Cautious (sentence-only), Balanced (instant + LLM), or Aggressive (correct everything as you type)
- BYOK (Bring Your Own Key) — use your own API key for Anthropic, OpenAI, or Google Gemini
- Chrome extension bridge — corrects text inside browser-based editors (Slack, Linear, Notion, Gmail) via a local HTTP bridge and DOM replacement
- Quick undo — press
⌥Z(configurable) to instantly revert the last correction. Corrections expire after 30 seconds or ~80 characters of typing - Poof animation — subtle sparkle animation appears at the corrected word
User types in any text field
│
▼
┌─────────────────────────┐
│ macOS Accessibility API │ ◄── Observes text value changes system-wide
│ (AXObserver + polling) │
└──────────┬──────────────┘
│
▼
┌─────────────────────────┐
│ Word Buffer │ ◄── Detects word/sentence boundaries, handles
│ (trailing by 1 word) │ batched AX notifications
└──────────┬──────────────┘
│
┌─────┴──────┐
▼ ▼
┌──────────┐ ┌──────────────┐
│ SymSpell │ │ Cloud LLM │
│ (word) │ │ (sentence) │
│ <1ms │ │ 200-800ms │
└────┬─────┘ └──────┬───────┘
│ │
▼ ▼
┌─────────────────────────┐
│ Text Replacer │
│ ┌─────────┐ ┌────────┐ │
│ │Native AX│ │Browser │ │ ◄── AX for native apps, HTTP bridge + Chrome
│ │ replace │ │ bridge │ │ extension for web apps
│ └─────────┘ └────────┘ │
└─────────────────────────┘
| Component | Technology |
|---|---|
| App | Swift, SwiftUI, macOS Accessibility APIs |
| Spell check | SymSpell (edit distance 1-2, 82K word dictionary) |
| LLM | Cloud API — Anthropic Claude, OpenAI GPT, Google Gemini |
| Browser bridge | NWListener HTTP server (localhost:9876) |
| Chrome extension | Manifest V3, content script + service worker |
| API key storage | macOS Keychain (Security.framework) |
| Animation | SwiftUI overlay windows (floating, borderless) |
- macOS 14+ (Sonoma or later)
- Xcode 15+
- Chrome/Arc/Brave/Edge (for browser extension)
- An API key from Anthropic, OpenAI, or Google AI Studio
# Clone the repo
git clone https://github.com/chansty/backspace-bro.git
cd backspace-bro
# Open in Xcode
open BackspaceBro/BackspaceBro.xcodeproj
# Build and run (⌘R)On first launch, macOS will prompt you to grant Accessibility permissions in System Settings → Privacy & Security → Accessibility.
- Click the menu bar icon → Settings
- Pick your provider (Anthropic / OpenAI / Gemini)
- Paste your API key
- Click Save & Test
- Open
chrome://extensionsin Chrome - Enable Developer mode (top right)
- Click Load unpacked → select the
chrome-extension/folder - The extension connects automatically when BackspaceBro is running
BackspaceBro/
├── App/ # AppState, entry point
├── Monitor/ # AX observer, WordBuffer, AccessibilityHelper
├── Correction/ # CorrectionRouter, CorrectionPipeline, SymSpell
├── LLM/ # CloudLLMService (Anthropic/OpenAI/Gemini)
├── Replacement/ # TextReplacer (AX + browser bridge paths)
├── Browser/ # BrowserBridge HTTP server
├── Undo/ # CorrectionHistory, GlobalHotkeyManager
├── Animation/ # OverlayWindow, poof + toast animations
├── Utilities/ # KeychainHelper, CoordinateConverter
├── Views/ # SettingsView, MenuBarView, HotkeyRecorder
└── Resources/ # SymSpell frequency dictionary (82K words)
chrome-extension/
├── manifest.json # MV3 manifest
├── content.js # DOM text replacement, polls native app
└── background.js # Service worker, proxies HTTP to localhost
| Setting | Options | Default |
|---|---|---|
| LLM Provider | Anthropic, OpenAI, Gemini | OpenAI |
| Correction Style | Cautious, Balanced, Aggressive | Balanced |
| Undo Hotkey | Any modifier+key combo | ⌥Z |
| Excluded Apps | Per-app toggle | Terminal, iTerm2 |
At typical usage (~500 corrections/day), cloud LLM costs are negligible:
| Provider | Model | ~Monthly Cost |
|---|---|---|
| Gemini Flash | gemini-2.0-flash | ~$0.30 |
| GPT-4o Mini | gpt-4o-mini | ~$0.45 |
| Claude Haiku | claude-haiku-4-5 | ~$2.76 |
This project is for personal/educational use.