Latch is a local-first macOS focus blocker built with Electron.
It blocks distracting sites with a privileged helper, keeps blocklists on-device, and optionally uses a Chromium extension for a friendlier blocked-page experience.
Download the latest macOS build from the GitHub Releases page then run: xattr -cr /Applications/Latch.app.
For the friendlier blocked-page experience, also download the Latch-chrome-extension.zip asset from the same release.
To load the extension in Chrome, Edge, or another Chromium browser:
- download
Latch-chrome-extension.zipfrom GitHub Releases - unzip it
- open
chrome://extensions - enable Developer mode
- click Load unpacked
- select the extracted
chromefolder
If you already installed the desktop app, the packaged app bundle also includes the extension under extensions/chrome.
- macOS-only
- local-first, no accounts, no cloud sync
- timed sessions and always-on blocking
- local domain blocklists
- one-time privileged helper install
- Chromium extension bridge for blocked pages
- crash recovery for interrupted sessions
- menu bar support
- macOS 12+
- Node.js 20+
- pnpm 9+
- Xcode command line tools / Swift toolchain for packaging
pnpm install
pnpm typecheck
pnpm test
pnpm build:macUseful commands:
pnpm dev
pnpm lint
pnpm build:macpnpm build:mac prepares and packages:
- the Electron desktop app
- the macOS helper
- the Chromium extension bundle
- the native messaging host
On first launch, Latch prompts once to install the helper. The app bundle includes the unpacked Chromium extension under extensions/chrome.
- install and launch the DMG build
- confirm the helper install prompt appears once
- confirm
/var/run/latch.sockis reachable after setup - load the Chromium extension from the app bundle
- start a session and verify
/etc/hostsmarkers are written - restart the app during an active session and verify recovery
- uninstall the helper from the app and verify cleanup
If you want to contribute:
- install dependencies with
pnpm install - run
pnpm typecheck && pnpm test && pnpm lint - keep diffs small and macOS-focused
- verify
pnpm build:macbefore proposing release-affecting changes
- smoother first-run setup
- better packaged-app smoke coverage
- continued simplification of the macOS-only distribution flow
MIT