AnyDoor
English | 简体中文

A macOS menu bar control center driven by global hotkeys. Bind any key
combination to launch and toggle apps, translate text, flip system settings,
or run one-off actions — all without leaving the keyboard.
Press a shortcut to open an app. Press it again to hide it. Use the same
muscle memory to mute audio, lock the screen, sample a color, OCR a screen
region, translate selected or on-screen text, convert and compress images, or
capture and record the screen
— and reach for clipboard history, window layouts, /etc/hosts profiles,
external-display brightness, a Hyper Key, and a Spotlight-style command palette
when you need them.
Features
App shortcuts
- Global hotkey per app — opens it when not running, activates it when
backgrounded, hides it when frontmost.
- Inline hotkey recorder with live modifier detection and conflict prompts.
- Drag to reorder shortcuts; toggle visibility per item.
Built-in system toggles
| Toggle |
What it does |
| Keep Awake |
Holds an IOPMAssertion to prevent display/system sleep |
| Mute Audio |
Mutes/unmutes the default Core Audio output device |
| Dark Mode |
Flips system appearance via AppleScript |
| Hide Desktop Icons |
Toggles Finder’s desktop icon visibility |
| Show Hidden Files |
Toggles AppleShowAllFiles in Finder |
| Hide Dock |
Toggles Dock auto-hide |
| Auto-hide Menu Bar |
Toggles _HIHideMenuBar |
| Keyboard Lock |
Drops all key events except registered hotkeys (cleaning mode) |
Built-in actions
- Lock Screen, Display Sleep, System Sleep
- Empty Trash, Flush DNS cache, Clear Notifications (clears banners, alerts, and everything listed in Notification Center)
- Restart Finder / Dock / SystemUIServer + ControlCenter
- OCR a screen region — Vision framework recognizes text and copies it
- Scan QR / barcode — decode a code on screen and copy its payload
- Pick Color — system color sampler captures HEX into the clipboard
- Translate text — open the translation window, translate the current
selection, or OCR a screen region and translate the recognized text
Screen capture
- One selection, one toolbar: a hotkey freezes the screen and shows a
pre-adjustable selection (resize handles, move, re-drag; restored from the
last selection) with an attached toolbar that switches tool on the fly —
region, window, fullscreen, timer, scrolling, and
recording.
- Region, window, fullscreen, and timed capture — each also bindable to its
own hotkey — over a freeze-screen overlay with a crosshair, live dimensions,
a magnifier loupe, and arrow-key nudge/resize across every connected display.
- Scrolling capture for content taller than the screen: an interactive,
CleanShot X-style session. You scroll the target — up or down — while AnyDoor
grabs and stitches frames live (overlap-aligned, pixel-exact) behind a growing
preview with a Done / Cancel bar; the session’s own windows never enter the
shot, and it reuses your last selection.
- Quick-access overlay docked in the bottom-left of the screen after a shot:
a drag-to-share thumbnail plus copy, save, edit, pin on screen, OCR,
re-capture, and delete (delete also drops it from clipboard history).
- Annotation editor: arrow, line, rectangle, ellipse, freehand,
highlighter, text, blur, pixelate, redaction bar, numbered step counters, and
non-destructive crop — with per-tool color / stroke / fill, undo/redo, and
export to copy / save / pin.
- Pin any capture on screen as an always-on-top floating reference.
- Capture settings: save location, filename template, auto-save / auto-copy,
timer-delay presets (3 / 5 / 10s), and quick-access overlay timeout.
Screen recording
- Record the full display or a selected region to MOV, MP4, or animated
GIF via AVFoundation, with a configurable frame rate and optional cursor
capture, microphone audio, a draggable webcam overlay, and an on-screen
keystroke display.
- A floating control bar shows elapsed time with pause / resume and stop; the
finished file is exported in the chosen format and revealed in Finder.
- System (application) audio is not captured — only the microphone.
Clipboard history
- Capture text, images, screenshots, files, colors, and QR codes in a
searchable Liquid Glass wall, then copy or paste any retained item.
- Search the full retained history, including copied text, OCR, decoded QR
values, file names and paths, and colors; narrow results by content type,
source app, tag, or favorites.
- History is encrypted at rest with a device-only key kept in the macOS
Keychain. The key is never synced or included in a backup.
- Optional on-device Automatic Image Text Indexing makes text in newly
captured images searchable; QR codes in new images are indexed
automatically.
- Keep history for 1 day, 7 days, 30 days, 3 months, 6 months, 1 year, or
Unlimited. Favorites and tagged entries are protected from automatic
expiry.
- Edit single text entries in place and see the history’s exact storage
footprint in Settings.
- Apple Passwords and Keychain Access are excluded by default. You can
exclude more apps or ignore new items arriving through Universal Clipboard
without affecting copies made on this Mac or existing history.
Translation
- Translate typed text, the current text selection, or text recognized from a
screen region.
- Run multiple services side by side: Apple on-device translation, Google,
Bing, DeepL / DeepLX, and OpenAI-compatible providers such as OpenAI,
DeepSeek, Qwen, Gemini, Kimi, GLM, OpenRouter, Ollama, or a custom endpoint.
- Configure default and fallback target languages; if source and target match,
AnyDoor automatically uses the second target language.
- Per-service API keys are stored in Keychain. Service definitions, ordering,
prompt templates, extra request body / headers, and manual-on-expand mode are
configurable from Settings.
- Apple translation can download required language packs from the Translation
settings tab on supported macOS versions.
- Translation history groups every provider result from the same run, supports
favorites, copy, re-translate, retention trimming, and clear-all.
- Text-to-speech can read the source or translated text, with optional
auto-speak for the first successful result.
- The selected-text fallback preserves the user’s full pasteboard contents and
suppresses AnyDoor’s temporary copy/restore writes from clipboard history.
Image conversion
- Ships as an installable plugin — enable it from Settings → Plugins.
- A dedicated workspace window — bindable to a hotkey, which also echoes the
current Finder selection into the basket — with a collapsible sidebar (⌘B)
holding the pending basket and conversion history, an original/result
comparison canvas, and a bottom control bar.
- Add images by drag & drop, ⌘O, or ⌘V (copied image files or a copied
bitmap).
- Format mode converts to PNG, JPEG, HEIC, AVIF, WebP, TIFF, GIF, BMP,
PDF, or ICO, with an exact live result preview — the same bytes a run would
produce — updating as the quality slider moves.
- Target Size mode compresses to a byte budget while keeping the source
format: JPEG / HEIC / AVIF / WebP via a bounded quality search, PNG by
scaling down, with scaling always available as a fallback (floored at a
640 px longest edge). WebP output is encoded by the bundled libwebp.
Already-fitting sources pass through byte-identical; an unreachable target
shows an explicit banner with a best-effort Save Anyway.
- Convert All asks where to save the outputs and remembers the folder; runs
are cancellable (⌘.).
- History records every conversion with its format, output file size, and
time, plus reveal-in-Finder and copy actions.
Window layout
- Tile the focused window to halves, thirds, two-thirds, quarters, center,
or maximize — each on its own optional hotkey.
- Move the focused window to the next / previous display.
- A Window Layout submenu in the panel exposes every arrangement.
External display brightness
- DDC/CI brightness control for external monitors over VCP
0x10, with an
on-screen OSD.
- Architecture-aware backend (Apple Silicon vs. Intel) and global
brightness up / down hotkeys.
Hosts management
- Ships as an installable plugin — enable it from Settings → Plugins.
- Edit
/etc/hosts from a built-in editor with multiple named profiles and
one-click switching.
- Writes go through a privileged XPC helper (an
SMAppService daemon),
falling back to an administrator-authorized AppleScript when the helper
is not installed.
Hyper Key
- Remap Caps Lock (or another trigger) to a Hyper modifier
(Control + Option + Command, optionally Shift) via
hidutil.
- A quick tap can emit its own action (none / Escape / the original key),
with a watchdog that re-applies the mapping and clears it on shutdown.
Scheduled shutdown
- Arm a one-shot shutdown after a chosen delay; it survives relaunch and is
re-validated after the Mac wakes from sleep.
- A cancelable warning panel appears before it fires; execution is graceful
(System Events) or forced (privileged helper).
Port Manager
- Submenu listing every listening port on the system.
- Search by port number or process name.
- Flat list and process-grouped tree views.
- Live refresh with retry on scan failure.
Command Palette
- A Spotlight-style launcher (global hotkey) that searches and runs any
command, app, built-in, or listening port from one place.
- Inline calculator: type a math expression and the result appears at the top
— press Return to copy it. Supports arithmetic, parentheses, powers (
^),
percentage literals (1234 * 8%), the constants pi / e, and scientific
functions (sqrt, sin, log, pow, …; trig in radians). Bare numbers
stay a port search; prefix with = to force calculation (e.g. =8080).
- Inline conversions: type a conversion and the answer appears on top — Return
copies it. Units (length, mass, temperature, data size, speed) via
3 ft to m
/ 72 f to c / 1 gb to mib; time zones via 3pm tokyo / 9am london to tokyo; currency via 100 usd to eur (also $ / € / £, colloquial names
like rmb / yuan / euro, and = as a connector), converted against ECB
rates cached daily from Frankfurter and usable offline. A currency-only footer
can force-refresh the rate table on demand.
- Inline developer tools:
base64, url, and md5 / sha1 / sha256 encode
or hash the rest of the query; pasting JSON pretty-prints / minifies it and a
Unix epoch renders local / UTC / ISO 8601. A Raycast-style scope badge turns a
keyword into a search-bar pill so the list stays exclusive to that tool.
- Script plugins add their own rows to the palette — searchable second-level
lists and paginated markdown detail pages included (see Plugins).
Quicklinks
- User-defined command-palette entries that open a web URL, a file or folder, an
app deeplink, or a search template with a
{query} placeholder. The editor’s
Type picker adapts the field hint per kind and offers a native folder / file
picker so a directory can be chosen without typing a path.
- Search Templates take inline arguments (
gh AnyDoor); typing a template’s
keyword and pressing Tab collapses it into a badge in the search field so you
type just the query next, and Backspace on the empty field sheds it.
- Assign a keyword for direct palette invocation or a global hotkey — plain
links open immediately, Search Templates summon argument mode.
- Pin an Open With app to override the default handler (falls back to the system
default if that app is gone); icons derive from the pinned app, file / folder
metadata, the deeplink handler, or a cached web favicon.
- Drag to reorder, toggle visibility, and the whole configuration participates
in backup / sync. A set of common templates (Google, GitHub, YouTube, Stack
Overflow, npm, MDN, Google Translate, ChatGPT) is seeded out of the box.
Plugins
Optional features are plugins, managed from Settings → Plugins, in two
kinds:
- Native plugins ship inside the app and toggle on and off — Image
Conversion and Hosts management today. Uninstalling removes every surface
(panel rows, palette commands, hotkeys) but keeps the plugin’s data, so
reinstalling restores it without a relaunch.
- Script plugins are packages you install yourself — authored in
TypeScript, run on the system JavaScriptCore, and confined to the
capabilities their manifest declares (no shell, no filesystem, no clipboard
read; runaway scripts are killed by a watchdog). They extend the command
palette with searchable rows, drill-in lists, and markdown detail pages.
Install from a zip or an
anydoor://install-plugin link; write your own
with pnpm create @anydoor-dev/plugin and iterate live via developer mode.
Installation steps, the full capability table, authoring guide, and design
records: docs/plugins.md.
- Click the menu bar icon to open a Liquid Glass panel listing every
enabled item with its current state and hotkey.
- Hover the App Shortcuts or Port Manager rows to open side popovers.
- Toast feedback for OCR / color picker results.
- In-panel update banner when a new release is available.
Settings
- Panel tab: drag-to-reorder (top-level items and app-shortcut /
window-layout children alike), per-item visibility, inline hotkey
recorder, type badges (toggle / action / submenu).
- Quicklinks tab: create / edit command-palette entries with a link type
picker, keyword, Open With override, hotkey, and visibility; drag to reorder.
- Clipboard tab: history monitoring, paste behavior (auto-paste or copy
only), retention with favorite / tag protection, automatic image text
indexing, source-app and Universal Clipboard exclusions, storage usage,
and history clearing.
- Screenshot tab: save location, filename template, auto-save /
auto-copy, timer-delay presets, quick-access overlay timeout, and
recording options.
- Translation tab: target languages, auto-speak, service ordering,
provider/API-key setup, Apple language-pack downloads, and history retention.
- Plugins tab: install / uninstall plugins, sideload script plugin
packages, and manage script-plugin developer mode.
- Sync tab: optional Config Sync through a shared folder or WebDAV, sync
status and setup documentation, and one-shot configuration backup /
restore.
- General tab: launch at login, language, menu bar icon style, Hyper
Key, command palette hotkey, scheduled shutdown, accessibility /
automation / screen-recording permission status with one-click request,
and auto-update controls.
Auto-update
- Sparkle integration with EdDSA-signed appcast.
- Configurable check frequency (daily / weekly / off) and manual check.
- Update banner surfaces new versions inside the menu bar panel.
Config sync
Point every Mac at one folder inside your cloud drive (Google Drive, Dropbox,
iCloud Drive, NAS…) — or at a WebDAV directory (Nextcloud, 坚果云,
Synology…) — and AnyDoor keeps app shortcuts, built-in preferences,
Quicklinks, and portable settings in sync — no account, no server, offline
gaps tolerated. Concurrent edits merge automatically: changes to different
items all survive, deletions hold everywhere, and cloud clients never see
conflicting writes because each Mac only writes its own state file. Optional
and off by default; machine-local state (helper approval, Script Plugins, the
folder choice itself) never travels.
Setup, what syncs, conflict semantics, and troubleshooting:
docs/config-sync.md.
Backup & restore
- Export app shortcuts, built-in preferences, Quicklinks, portable clipboard
settings (tags, category order, ignored sources, and the Ignore Universal
Clipboard preference), portable capture settings (save location, filename,
auto-copy, auto-save, sound, delay, and overlay timeout), translation
preferences and service definitions, the installed plugin set, and other
whitelisted general settings into a versioned snapshot, and import it on
another Mac.
- Clipboard history, translation history, API keys, and machine-specific keys
are excluded; app paths are re-resolved from bundle IDs on import, and
changes apply without a relaunch.
- For continuous multi-Mac convergence use Config sync
instead; backup stays the one-shot migration/sharing tool.
Security & permissions
- Runs as an
.accessory app (no Dock icon).
- Accessibility and Automation permission flows built into Settings with
live status indicators.
- CGEvent tap at HID level with a watchdog that restarts itself if macOS
disables it for exceeding the callback budget.
Requirements
- macOS 14 (Sonoma) or later
- Liquid Glass effects light up on macOS 26 (Tahoe); macOS 14–25 fall back
to a standard material surface.
- Swift 6.2
- Accessibility permission (System Settings → Privacy & Security → Accessibility)
Install
git clone https://github.com/ZingerLittleBee/AnyDoor.git
cd AnyDoor
make install
This builds the release binary and installs /Applications/AnyDoor.app with
the app bundle metadata and icon.
For a binary-only build, use:
make swift-release
The binary will be at .build/release/AnyDoor.
Usage
- Run AnyDoor — an icon appears in the menu bar
- Click the icon → Settings to open the settings window
- Click + to add a binding:
- Click the shortcut field and press your desired key combination
- Click Select… to choose the target app
- Click Save
- Press the shortcut to toggle the app (open/hide/activate)
Development
# Hot-reload dev mode (requires watchexec)
make
# Build
make build
# Release build only
make swift-release
Release Packaging
Releases are built, signed with Developer ID, notarized, packaged as a DMG and
Sparkle zip, and published to GitHub Releases with a signed appcast by GitHub
Actions. A maintainer only cuts the release locally:
# Print the plan (preflight, version, CHANGELOG and Info.plist changes, notes).
make release-dryrun
# Bump Info.plist, cut CHANGELOG, commit, tag, and push; Actions does the rest.
make release # next Stable, inferred from Info.plist
make release 4.3.0 # explicit Stable, from main
make release 4.3.0-beta.1 # Beta, from release/4.3-beta
The pipeline, its required settings and credentials, rehearsals, and recovery
are documented in Releasing on GitHub Actions. Channel and
branch policy is in the Beta release runbook.
Local builds
# Build the release binary only.
make swift-release
# Build and install /Applications/AnyDoor.app for local use.
make install
# Remove /Applications/AnyDoor.app.
make uninstall
make install signs with SIGNING_IDENTITY from a local .env (see
.env.example) when that certificate is in the keychain, so macOS keeps the
app’s permissions across rebuilds; otherwise it signs ad hoc.
How It Works
- CGEvent tap at HID level (
.cghidEventTap) intercepts keyboard events before any app
- SwiftData persists key bindings across launches
- AppKit menu bar — an
NSStatusItem plus a floating NSPanel (managed by
MenuBarController), not SwiftUI’s MenuBarExtra
- Privileged XPC helper writes
/etc/hosts after verifying the caller’s code signature
- Translation coordinator fans out requests to enabled providers, records
per-run history, and guards stale async results from superseded runs
- App runs as an accessory (no Dock icon)
Tech Stack
- SwiftUI views hosted in AppKit windows + AppKit menu bar (
NSStatusItem +
NSPanel)
- SwiftData
- JavaScriptCore for the script plugin runtime
- CGEvent tap (
.cghidEventTap)
- Privileged XPC helper for
/etc/hosts
- Vision OCR, Natural Language detection, AVFoundation speech, and Apple’s
Translation framework when available
- Swift Package Manager
Contributing
Contributions are welcome! See CONTRIBUTING.md for the
development setup, code conventions, and pull-request process. For larger
changes, please open an issue first to discuss the idea.
Acknowledgements
Bundled third-party code; full license texts in THIRD-PARTY-LICENSES.md.
- MonitorControl (MIT) — its
IntelDDC is vendored for DDC/CI brightness control of external displays on Intel Macs (itself adapted from @reitermarkus’s work).
- Sparkle (MIT) — application auto-update.
- AskForPermission (MIT) — macOS accessibility permission helper.
- libwebp (BSD-3-Clause) — WebP encoding for Image Conversion (via SDWebImage/libwebp-Xcode); macOS decodes WebP natively but cannot encode it.
License
MIT
评论