AttentionLab
Local-first attention tracker · macOS

An instrument for your attention.

AttentionLab records where your attention actually goes all day — every app, site, and idle stretch — in a local database that never leaves your Mac. No account, no cloud, no tracking.

More than a chart of your hours: a reading of your focus, tuned to you. Connect an agent you already use — Claude Code, Codex, or your own API key — for focus sessions, app-blocking, and a score that learns what deep work means for you.

Rust · Tauri · SQLite · MCP · local-first · bring your own agent or key
Steps 1–3 run entirely on their own, on your Mac. Step 4 only happens if you connect your own agent — Claude Code, Codex, or an API key.
The principle

Most trackers judge everyone by the same rule. Yours shouldn't.

A YouTube tutorial on color grading is real work when you're deep in a video edit — and a rabbit hole when you're not. Same site, opposite meaning. A fixed rule that scores every minute the same way is wrong before it starts. AttentionLab ships no verdict: group your work into benches and connect your own agent, and it learns your patterns — what's real work for you, what a context-switch costs, when your focus actually holds. The reading is yours, not the average's.

The optional layer · bring your own agent or key

Three pieces the agent works with.

Tracking your time is the always-on floor. This part is opt-in: a small vocabulary you set once, plus an agent you connect — Claude Code, Codex, or your own API key — that reads the live record and works with all three.

Bench

A bench is one kind of work

Group the apps and sites that belong to one task. Hopping between them isn't a distraction — AttentionLab knows the difference between working a problem and wandering off.

design → Figma · Linear · staging
Protocol

A rule you hold yourself to

Commit to how you want to work — "under 20 min on social every 2 hours," "90 minutes of deep work before noon." AttentionLab measures it against your real activity and tells you, honestly, whether you held it or drifted.

≤ 20 min on x.com · every 2h → held
Agent

Your agent, or your key

Connect an agent you already use — Claude Code or Codex over a local MCP link — or paste your own API key. Either way it reads the record and runs your benches and rules: opening focus sessions, holding focus. Nothing leaves your Mac unless you turn it on.

limited to 4 actions · every one logged
Capture

The record

Foreground app, window title, idle, and lock events, read through the macOS Accessibility API and written to local SQLite. Nothing to start. Nothing to tag.

Calibrate

Learns your patterns

Connect an agent and it reads the whole record to learn the shape of your work — which apps are deep work, which are noise. Fitted to you, not a template.

Read out

Answers in plain language

Ask where the day went and get a measured answer: time in focus, number of switches, this week against your own baseline.

Bring your own

Bring your own agent or key

Use an agent you already have — Claude Code or Codex over a local MCP link — or paste your own API key. Nothing leaves your Mac except through the agent or account you bring. No middleman, no markup.

Enforce

Focus mode

A declared session, enforced — apps hidden through NSWorkspace, sites blocked through a declarativeNetRequest extension. For as long as you set. 

Logbook

The long arc

Days roll up into weeks. The calendar of your attention surfaces the patterns you can't feel in the moment — drift, streaks, the slow shape of a quarter.

Trace

Focus depth, all day

Example day. Attention sampled as a signal — drawn against your focus threshold, the sage held area above it, and your typical 7-day band. The filament dot is now.

The trace
Focus depth, sampled
Threshold · 60
Your protocol band
Median band
Typical 7-day range
Held
Time above threshold
focus threshold · depth 6010060200FOCUS DEPTHDeep workcoding · 88Midday lullsocial · 14Best blockwriting · 85070911131517now

07:00 → now · focus depth 0–100 · threshold 60 · sampled on-device

Install

Two parts, a few minutes.

The macOS app does the tracking; the browser extension gives it the tab context. Both run entirely on your machine.

01 · the app

Download for macOS

  1. Download the .dmg and drag AttentionLab into Applications.
  2. Open it from Applications and confirm the first-run prompt — the build is Developer-ID signed and notarized.
  3. Grant Accessibility access when asked; that's how it reads the active app and window.
↓ Download for macOS
Universal · Apple Silicon + Intel · notarized & stapled
02 · the browser

Add the Chrome extension

  1. Download and unzip attentionlab-extension.zip.
  2. Open chrome://extensions and turn on Developer mode (top-right).
  3. Click Load unpacked and select the unzipped folder.
↓ Get the extension
Talks only to the app on 127.0.0.1 — never reads page content.
Private by default
— nothing leaves your Mac Nothing phones home

Local servers bind to 127.0.0.1 with bearer-token auth. No outbound connection unless you turn one on, explicitly.

— hardened Security-reviewed

Argon2id credentials, strict CSP, parameterized SQL, plus CSRF and DNS-rebinding defenses on every local server.

— never captured What it doesn't see

No keystrokes, screenshots, clipboard, page contents, or private-tab activity. Ever.