FocusGate Bridge

The small Anki add-on used by the Block Sites Until I Complete ANKI Chrome extension.

⬇ Download

⬇ focusgate_bridge.ankiaddon

For Anki desktop (Windows, macOS, Linux). A .ankiaddon file is a small ZIP of two Python files — you can open it and read every line.
You probably don't need this page. The add-on already ships inside the extension. Open Settings → Study & Unlock → 🖥️ Anki window and press ⬇ Add-on, or Save file only if you'd rather install it by hand. That copy is built from the extension's own bytes, so it always matches the version the extension expects. This page is only here for when it's easier to grab the file on another computer.

Install it

  1. In Anki: Tools → Add-ons → Install Add-on from File…
  2. Pick the downloaded focusgate_bridge.ankiaddon.
  3. Press Install, then restart Anki.
  4. Back in the extension's Settings, the row next to ⬇ Add-on should turn Add-on connected.

What it does, and what it doesn't

Chrome has no way to see which desktop application is in front of you. The extension needs that, otherwise "study Anki for 30 minutes" could be satisfied by leaving Anki open behind a game. So Anki reports it itself.

The add-on runs a small server on 127.0.0.1:8766 — your own machine only, never reachable from the internet — and answers three kinds of question:

It never reads your cards, decks or notes, and nothing is uploaded anywhere. It reports window state and nothing else.

It also registers a focusgate-anki:// link with your user account on Windows, which is what lets the extension start Anki when Anki isn't running. Chrome cannot launch a program; it can open a link.

Also needed: AnkiConnect

Separate, third-party, and what the extension uses to read your card count.

  1. Tools → Add-ons → Get Add-ons…, paste 2055492159, restart Anki.
  2. Tools → Add-ons → AnkiConnect → Config: make sure webCorsOriginList contains "*", then restart Anki again.