# Show HN: Vigil – open-source TimeTracker with steroids

> Source: <https://github.com/Brokenwatch24/vigil>
> Published: 2026-07-12 15:45:09+00:00

**The self-hosted, privacy-first productivity tracker I always wanted.**

Your focus, your breaks, your data — tracked locally, owned entirely by you, shared with no one unless you say so.

Most productivity/focus trackers ask you to hand your screen time over to someone else's server. Vigil doesn't.
Everything it tracks — every app session, every break, every streak — lives in a single SQLite file on your own
machine. Nothing leaves your computer unless you explicitly turn on a feature that does (like AI Insights, and
even then, only aggregate numbers ever leave, using **your own** API key).

It's a desktop app (Windows + Mac) built with Electron, React, and TypeScript, and it's fully open source — read it, change it, self-host it, fork it.

**Automatic app/window tracking**— polls the focused app every 1-2 seconds and records sessions to a local SQLite database. No manual start/stop.** Idle & break detection**— a working → idle → on-break state machine with two independent streaks (a work-goal streak and a break-goal streak), so taking real breaks is rewarded, not penalized.**Focus score**— a configurable, weighted score of how "deep" your day was, computed from tracked categories.** Pomodoro-style Focus Sessions**— start a timed session and Vigil automatically soft-blocks anything categorized as a distraction for the duration, no rule setup required.**Category goals & streaks**— cap a category (e.g. "max 30 min/day of Distraction") and track a streak for staying under it, alongside the built-in work/break streaks.

**Today**— active time, break time, daily-goal ring, a live timeline, an hourly activity bar chart, top apps (with real extracted app icons), and — if you've paired the browser extension — top visited websites.**Weekly / Monthly / Compare / Yearly Recap**— every range view with a heatmap ↔ bar-chart toggle, streaks, and a "Wrapped"-style annual recap.** Brain Graph**— a live, force-directed graph (drag nodes, zoom, pan — like Obsidian's graph view) of how your attention actually flows between apps, weighted by time and transition frequency, with a category-aggregate mode.**Shareable PNG export**— turn Today, Weekly Recap, or Yearly Recap into a clean, on-brand image you can post wherever you want.

**Soft app blocking**— schedule-based or Focus-Session-triggered blocking that's*never*a process kill — just a gentle (or hard, your choice) focus-steal-back with a configurable grace period and daily override cap.**Reminders & to-dos**— one shared recurrence model (once/daily/weekly/monthly/custom) powers both, plus a minute-resolution scheduler.** A floating widget**— draggable, always-on-top (configurable), shows your current session/break state at a glance without opening the full dashboard.**Global keyboard shortcuts**— pause/resume tracking or toggle a break from anywhere, no window focus needed.

**Categories**— default set (Work, Communication, Creative, Distraction) plus your own; drag any not-yet-categorized app onto a category, search, or browse your filesystem to add one directly.**Theming**— dark, light, and high-contrast presets, plus a fully custom token editor, pushed live to every window at once.** Data export & backup**— a one-click full database snapshot, or a CSV/JSON export of raw sessions for any date range. It's your data; take it with you whenever you want.

**AI Insights (bring your own key)**— fully opt-in. Pick a provider (Anthropic, OpenAI, or Gemini), paste your own API key (encrypted at rest via your OS's own keychain, never stored in plaintext), pick a model (including cheaper mini/nano tiers), and generate natural-language insights about your week or month. Vigil only ever sends*aggregate*stats — app names, totals, focus score, streaks — never window titles or raw activity, and only on that explicit click.**Browser extension**— a thin, self-contained Manifest V3 extension (see) that tracks which`apps/browser-extension`

*domain*is active in your browser and feeds hostname + time totals into Vigil's own local API. It has no UI of its own — the breakdown lives in Vigil's Today screen, not a browser popup.**Local REST API + OpenAPI spec**— a`127.0.0.1`

-only, dynamically-ported, bearer-token-authenticated API (discovery file at`%APPDATA%/vigil/api.json`

) exposing categories, stats, streaks, reminders, tasks, and block rules. Full spec at`/api/openapi.json`

once Vigil is running.**MCP server**— a standalone stdio MCP wrapper around that same API, so Claude (or any other MCP-aware agent) can read your stats and manage reminders/tasks/block-rules on your behalf.

Electron · React 18 · TypeScript (strict) · Zustand · better-sqlite3 · Fastify · Zod · d3-force/d3-drag/d3-zoom ·
electron-vite · electron-builder · vitest — all in a pnpm workspace (`packages/shared`

, `packages/db`

,
`apps/electron`

), plus a standalone `apps/browser-extension`

.

```
vigil/
  packages/
    shared/   -- types, IPC contract, pure logic (recurrence, streaks, focus score, category goals, date math)
    db/       -- SQLite schema/migrations, repositories, query layer (shared by IPC and the REST API)
  apps/
    electron/ -- the desktop app: main process (tracking, blocking, scoring, scheduler, API, MCP, AI),
                 preload bridges, and the React renderers (dashboard + floating widget)
    browser-extension/ -- the standalone tab-tracking bridge (see its own README)
```

Requires Node 20+ and [pnpm](https://pnpm.io).

```
git clone <this-repo-url>
cd vigil
pnpm install
pnpm dev
```

`pnpm dev`

rebuilds the native `better-sqlite3`

module for Electron automatically, then launches the app with
hot reload. On first run, Vigil walks you through a short onboarding flow.

```
pnpm typecheck
pnpm test
php
pnpm build:win   # -> release/ (NSIS installer + unpacked app), Windows
pnpm build:mac   # -> release/ (dmg), macOS -- needs to actually run on a Mac to build/verify
```

See [ apps/browser-extension/README.md](/Brokenwatch24/vigil/blob/master/apps/browser-extension/README.md) — load it unpacked via

`chrome://extensions`

, then pair it with Vigil's local API from **Settings → Browser extension**.

- Everything Vigil tracks lives in one SQLite file (
`%APPDATA%/vigil/vigil.db`

on Windows) — no account, no cloud sync, no telemetry. - The local REST API only ever listens on
`127.0.0.1`

, never your network. - AI Insights is off by default and strictly opt-in per the description above.
- The browser extension only ever records a hostname and a duration — never a full URL, never page content.
- Export your entire database or raw sessions at any time from
**Settings → Export & backup**.

- This project has been developed and tested on Windows. The Mac-specific tracking/idle-detection backend and
`.dmg`

packaging are implemented to spec but unverified — they need a real Mac (or a`macos-latest`

CI runner) before release. - The Chrome extension is currently distributed unpacked (not published to the Chrome Web Store).

[MIT](/Brokenwatch24/vigil/blob/master/LICENSE) — do whatever you'd like with it.

Built with a lot of iteration, and a little help from Claude Code.
