{"slug": "show-hn-vigil-open-source-timetracker-with-steroids", "title": "Show HN: Vigil – open-source TimeTracker with steroids", "summary": "Vigil is an open-source, self-hosted time tracker that runs locally on Windows and Mac, storing all data in a SQLite file on the user's machine. It offers automatic app tracking, break detection, focus scores, and optional AI insights using the user's own API key, with a focus on privacy and data ownership.", "body_md": "**The self-hosted, privacy-first productivity tracker I always wanted.**\n\nYour focus, your breaks, your data — tracked locally, owned entirely by you, shared with no one unless you say so.\n\nMost productivity/focus trackers ask you to hand your screen time over to someone else's server. Vigil doesn't.\nEverything it tracks — every app session, every break, every streak — lives in a single SQLite file on your own\nmachine. Nothing leaves your computer unless you explicitly turn on a feature that does (like AI Insights, and\neven then, only aggregate numbers ever leave, using **your own** API key).\n\nIt'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.\n\n**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.\n\n**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.\n\n**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.\n\n**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.\n\n**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`\n\n*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`\n\n-only, dynamically-ported, bearer-token-authenticated API (discovery file at`%APPDATA%/vigil/api.json`\n\n) exposing categories, stats, streaks, reminders, tasks, and block rules. Full spec at`/api/openapi.json`\n\nonce 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.\n\nElectron · React 18 · TypeScript (strict) · Zustand · better-sqlite3 · Fastify · Zod · d3-force/d3-drag/d3-zoom ·\nelectron-vite · electron-builder · vitest — all in a pnpm workspace (`packages/shared`\n\n, `packages/db`\n\n,\n`apps/electron`\n\n), plus a standalone `apps/browser-extension`\n\n.\n\n```\nvigil/\n  packages/\n    shared/   -- types, IPC contract, pure logic (recurrence, streaks, focus score, category goals, date math)\n    db/       -- SQLite schema/migrations, repositories, query layer (shared by IPC and the REST API)\n  apps/\n    electron/ -- the desktop app: main process (tracking, blocking, scoring, scheduler, API, MCP, AI),\n                 preload bridges, and the React renderers (dashboard + floating widget)\n    browser-extension/ -- the standalone tab-tracking bridge (see its own README)\n```\n\nRequires Node 20+ and [pnpm](https://pnpm.io).\n\n```\ngit clone <this-repo-url>\ncd vigil\npnpm install\npnpm dev\n```\n\n`pnpm dev`\n\nrebuilds the native `better-sqlite3`\n\nmodule for Electron automatically, then launches the app with\nhot reload. On first run, Vigil walks you through a short onboarding flow.\n\n```\npnpm typecheck\npnpm test\nphp\npnpm build:win   # -> release/ (NSIS installer + unpacked app), Windows\npnpm build:mac   # -> release/ (dmg), macOS -- needs to actually run on a Mac to build/verify\n```\n\nSee [ apps/browser-extension/README.md](/Brokenwatch24/vigil/blob/master/apps/browser-extension/README.md) — load it unpacked via\n\n`chrome://extensions`\n\n, then pair it with Vigil's local API from **Settings → Browser extension**.\n\n- Everything Vigil tracks lives in one SQLite file (\n`%APPDATA%/vigil/vigil.db`\n\non Windows) — no account, no cloud sync, no telemetry. - The local REST API only ever listens on\n`127.0.0.1`\n\n, never your network. - AI Insights is off by default and strictly opt-in per the description above.\n- The browser extension only ever records a hostname and a duration — never a full URL, never page content.\n- Export your entire database or raw sessions at any time from\n**Settings → Export & backup**.\n\n- This project has been developed and tested on Windows. The Mac-specific tracking/idle-detection backend and\n`.dmg`\n\npackaging are implemented to spec but unverified — they need a real Mac (or a`macos-latest`\n\nCI runner) before release. - The Chrome extension is currently distributed unpacked (not published to the Chrome Web Store).\n\n[MIT](/Brokenwatch24/vigil/blob/master/LICENSE) — do whatever you'd like with it.\n\nBuilt with a lot of iteration, and a little help from Claude Code.", "url": "https://wpnews.pro/news/show-hn-vigil-open-source-timetracker-with-steroids", "canonical_source": "https://github.com/Brokenwatch24/vigil", "published_at": "2026-07-12 15:45:09+00:00", "updated_at": "2026-07-12 16:05:12.748652+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-ethics"], "entities": ["Vigil", "Electron", "React", "TypeScript", "Anthropic", "OpenAI", "Gemini"], "alternates": {"html": "https://wpnews.pro/news/show-hn-vigil-open-source-timetracker-with-steroids", "markdown": "https://wpnews.pro/news/show-hn-vigil-open-source-timetracker-with-steroids.md", "text": "https://wpnews.pro/news/show-hn-vigil-open-source-timetracker-with-steroids.txt", "jsonld": "https://wpnews.pro/news/show-hn-vigil-open-source-timetracker-with-steroids.jsonld"}}