BabelKey is a local-first macOS translation overlay built for fast back-and-forth bilingual writing.
It is designed to stay out of the way until summoned by hotkey, then give you two independent text panes where either side can be the source. It currently targets translategemma-4b-it running in LM Studio on your Mac.
- Global summon/hide overlay hotkey
- Two-pane translation UI with either pane acting as the source
- Side-by-side and stacked layouts
- Draggable, resizable, always-on-top overlay
- Remembers window size and position
- Per-pane copy actions and keyboard-first workflows
- Translation history stored in SQLite
- Configurable overlay color, opacity, and shortcut
- Menu bar app with no Dock icon
- Local LM Studio integration using the TranslateGemma prompt format
- macOS 14 or later
- Xcode 16+ with command line tools
- LM Studio
- The
translategemma-4b-itmodel already downloaded in LM Studio ghif you want to publish or clone/fork with GitHub CLIxcodegenif you want to regenerate the Xcode project fromproject.yml
BabelKey talks to LM Studio through the local OpenAI-compatible completions endpoint:
http://127.0.0.1:1234/v1/completions
It does not depend on LM Studio’s chat-format adapter for TranslateGemma. Instead, it renders the model prompt directly so the request shape matches the model’s expected template.
In LM Studio:
- Load
translategemma-4b-it - Start the local server on port
1234 - Confirm the model is available before launching BabelKey
From the repo root:
xcodebuild -project BabelKey.xcodeproj -scheme BabelKey -configuration Debug buildOr open BabelKey.xcodeproj in Xcode and run the BabelKey scheme.
The built app bundle is typically here:
open ~/Library/Developer/Xcode/DerivedData/BabelKey-*/Build/Products/Debug/BabelKey.appOn first launch:
- the overlay appears immediately
- a menu bar icon appears
- the app runs as a menu bar utility with no Dock icon
If you use the cross-app paste workflow (Cmd-Shift-V), BabelKey needs Accessibility permission:
- System Settings
- Privacy & Security
- Accessibility
Without that permission, BabelKey can still copy the translation and close the overlay, but it cannot send the final paste command into the previously focused app.
- Global toggle:
Cmd-Control-Option-Shift-T - Translate focused pane:
Cmd-Return - Close overlay:
EscorCmd-W - Quit app:
Cmd-Q - Open Settings:
Cmd-, - Focus left pane:
Cmd-Shift-[ - Focus right pane:
Cmd-Shift-] - Copy left pane:
Cmd-1 - Copy right pane:
Cmd-2 - Copy selection or latest translation:
Cmd-C - Copy latest translation and close overlay:
Cmd-Shift-C - Copy latest translation, close overlay, refocus prior app, and paste:
Cmd-Shift-V - Tab between panes:
Tab
The global toggle shortcut is configurable in Settings.
BabelKey includes settings for:
- global hotkey
- overlay color
- overlay transparency
The overlay becomes more transparent when the app is not active, while still preserving the configured focused opacity when the Settings window is open.
Translation history is stored locally in SQLite. Logged data includes:
- source text
- translated text
- source and target language codes
- prompt/completion/total tokens
- latency
- provider and model identifiers
- error state
This is intended as a personal local utility. There is no cloud sync.
Project structure:
BabelKey/Sourcescontains app, UI, model, and service codeBabelKey/Resourcescontains asset catalogsBabelKey/Testscontains testsproject.ymlis the XcodeGen source of truth
If you modify project.yml, regenerate the project with:
xcodegen generateThen rebuild:
xcodebuild -project BabelKey.xcodeproj -scheme BabelKey -configuration Debug buildRun tests with:
xcodebuild -project BabelKey.xcodeproj -scheme BabelKeyTests -configuration Debug test -destination 'platform=macOS'- This app is currently optimized for macOS and LM Studio.
- The translation provider layer is structured so other local models/providers can be added later.
- The current default language pairing is English and Mexican Spanish, but the UI supports the broader TranslateGemma language set.