A blink-fast, LLM-powered selection translator for macOS — lives in your menu bar.
Select any text in any macOS app, fire a hotkey (or double-tap ⌘C), and a translucent panel slides out from the menu bar with the translation. Works in Safari, Notes, Mail, Xcode, VSCode, Cursor, Preview/PDF, and most native + Electron apps.
Powered by any OpenAI-compatible Chat Completions endpoint (OpenAI, DeepSeek, Qwen, SiliconFlow, OpenRouter, your own proxy, etc.). 11 built-in translation styles (general, academic, technology, news, finance, novel, medical, legal, GitHub, etc.).
- Grab
Glance-*.dmgfrom the latest release. - Open the DMG, drag Glance.app into Applications.
- Launch Glance. If macOS blocks it with "unable to verify the developer":
- Right-click Glance.app → Open → confirm in the dialog. Or:
xattr -dr com.apple.quarantine /Applications/Glance.app
- Grant Accessibility permission when prompted (or in System Settings → Privacy & Security → Accessibility).
Requires Xcode 15+ (for the Swift 5.9 toolchain).
git clone https://github.com/WShawnMing/Glance.git
cd Glance
./scripts/build-app.sh
open dist/Glance.appUniversal binary (Apple Silicon + Intel):
UNIVERSAL=1 ./scripts/build-app.shBuild the DMG installer:
UNIVERSAL=1 ./scripts/build-dmg.sh # → dist/Glance-x.y.z.dmg- Click the Glance icon in the menu bar → ⚙ to open settings.
- Fill in:
- Base URL — e.g.
https://api.openai.com/v1,https://api.siliconflow.cn/v1,https://api.deepseek.com/v1 - API Key
- Model — e.g.
gpt-4.1-mini,deepseek-chat,Qwen/Qwen2.5-72B-Instruct
- Base URL — e.g.
- Hit Test connection to confirm.
- Pick a translation mode and target language.
- Pick a trigger:
- Global hotkey (default
⌃⌥⌘T) — uses macOS Accessibility to read the selection - Double ⌘C — press ⌘C twice within 400 ms to trigger; reads the clipboard
- Global hotkey (default
- Select text in any app.
- Press the trigger.
- A translucent panel slides out below the menu-bar icon with the translation.
- Click the copy icon (or
⌘Cwhile the panel is focused) to copy the result. - Click outside or press
Escto dismiss.
Works across Mission Control Spaces and fullscreen apps.
Sources/
GlanceCore/ # platform-agnostic translation pipeline
Types.swift # mode / result / error types
TranslationModes.swift # 11 built-in modes
TranslationClient.swift # URL normalize, system-role fallback, response parsing
Settings.swift # AppSettings + persistence
GlanceApp/ # macOS shell
App.swift / AppDelegate.swift # @main, status item, popover, hotkey wiring
Hotkey/HotkeyManager.swift # Carbon RegisterEventHotKey
Hotkey/DoubleCommandCMonitor.swift # CGEventTap for double-⌘C
Selection/SelectionReader.swift # AX selection + clipboard fallback
UI/PopoverView.swift # SwiftUI translation panel
UI/SettingsView.swift # SwiftUI settings window
UI/HotkeyRecorderView.swift # record arbitrary keyboard shortcut
Resources/Info.plist.template
Resources/AppIcon.icns
Tests/GlanceTests/ # unit tests (URL normalize / fallbacks / array-content / modes)
scripts/
build-app.sh # swift build → .app bundle (ad-hoc signed)
build-dmg.sh # build-app.sh → hdiutil → Glance-x.y.z.dmg
make-icon.py # regenerate AppIcon.icns from Python (Pillow)
.github/workflows/
ci.yml # tests + .app build on every push
release.yml # build universal + DMG on tag, publish GitHub release
- Accessibility path (preferred) —
AXUIElementCopyAttributeValue(focused, kAXSelectedTextAttribute). Works in Safari, Notes, Mail, Xcode, Preview, native apps. - Clipboard fallback — if AX returns nothing, Glance:
- Waits for the user's modifier keys to release
- Snapshots the pasteboard contents
- Synthesises ⌘C via CGEvent
- Reads the new pasteboard string
- Restores the original pasteboard contents
- Double ⌘C mode — never touches the pasteboard itself; the user's two ⌘C presses put the text there, Glance just reads it.
- Streaming output
- Per-app trigger overrides
- Custom translation modes UI
- Move API key to Keychain
- Optional automatic update via Sparkle
MIT. Translation pipeline and prompt templates ported from sibling projects: