meridian/

attention intelligence

Most focus tools block a fixed list of sites on a fixed schedule, so they nag you at the wrong moments and go quiet right when you start to drift. I wanted the opposite: something that learns the shape of my own attention and steps in a few minutes before it fragments, not after. It all runs, and stays, on the machine.

what it does

It watches honestly

Every visit gets logged with how long it lasted and how much you actually touched it, mouse and scroll and keys, not just how long the tab sat open. All of it is bucketed by time of day and weekday in a local IndexedDB.

It learns you

The predictor is a logistic regression I wrote from scratch, no ML library. It starts from rough priors and updates its weights one session at a time, drifting from a generic guess toward the actual you.

It steps in early

Every five minutes it scores your live focus. When it reads like you are about to fragment, distracting domains get held back on a calm page, with a one-tap ten-minute override for when you really mean it.

It reports back

Every Sunday it writes you a short attention report, generated locally with Ollama if you have a model installed, or a plain template if you do not. Nothing leaves the device.

the dashboard
focus-scorefocused
72/100
today
4h 12mtracked
2h 48mfocused
3.1switch/hr
how it works
  1. Observe. Tab and window events open and close each session, and the content script watches whether you are actually interacting. Idle or a blurred window pauses the clock, so time spent away never counts as focus.
  2. Featurize. Each finished session turns into a handful of features: the time-of-day bucket, the weekday, how much you were switching, how long you stayed, how engaged you were, and how much of the recent context was distracting.
  3. Label and learn. A simple heuristic labels the session (long, engaged, low-switching, on a productive site reads as focused), and the classifier takes one gradient step from it. The learned weights are visible and resettable in the settings.
  4. Predict. Every five minutes it turns the last half hour of context into a live focus probability, shown as a badge on the toolbar and an optional pill on the page.
  5. Adapt. Below your threshold, declarativeNetRequest quietly redirects distracting domains to a hold page. Above it, the rules lift on their own.
  6. Reflect. Once a week it pulls all of it together and writes the report. The same summary feeds a local model, or the built-in template when there is not one.
install
  1. git clone https://github.com/hadimoumeni/meridian.git
  2. Open chrome://extensions and enable Developer mode.
  3. Load unpacked → select the meridian/ folder.
  4. Pin it. The badge shows your live focus score; click for the dashboard.

Optional, if you want the AI reports: install Ollama and pull a small model with ollama pull llama3.2. Meridian uses whatever you have installed, and without one you still get a full template report, so nothing breaks.

privacy

It is all local. No servers, no accounts, no analytics. The only network call Meridian can make is to a local Ollama instance on localhost, and only if you choose to run one. Export the whole database as JSON, or delete all of it, whenever you want.