focusd — Free Open-Source Windows Screen Time Tracker
What is focusd?
focusd is a free, open-source screen time tracker for Windows that monitors which applications you use and for how long. Built in Go with native Win32 system calls, it runs as a lightweight background daemon (10-25 MB RAM) and displays analytics through a rich terminal user interface (TUI) and standard CLI commands.
All tracking data is stored locally in a SQLite database at %APPDATA%\focusd\focusd.db. No data ever leaves your computer — there are no cloud services, no accounts, and no telemetry. focusd is licensed under the MIT License.
How focusd Tracks Screen Time
focusd uses Windows API calls (GetForegroundWindow, GetWindowTextW, GetModuleBaseNameW) to detect which application is currently in the foreground. Every 5 seconds (configurable from 1-60 seconds), it samples the active window, records the application name, executable, and window title, and stores session data. Sessions are batched in memory and persisted to SQLite every 5 minutes for efficiency.
The daemon process (focusd_daemon.exe) runs headless in the background. The CLI/TUI (focusd.exe) communicates with it over a local TCP channel at 127.0.0.1:48321 using a simple text-line protocol. This two-binary architecture keeps the daemon silent and the CLI responsive.
Browser Tab Tracking
focusd automatically detects 18 built-in browsers — Chrome, Firefox, Edge, Brave, Opera, Vivaldi, Arc, Waterfox, Safari, Whale, Yandex, Thorium, LibreWolf, Chromium, Floorp, Zen, and Internet Explorer — plus custom browsers you can add. For browser windows, it reads the window title and classifies tabs using smart pattern matching for 70+ website categories including YouTube, GitHub, ChatGPT, Claude, Spotify, Netflix, Twitter/X, Reddit, LinkedIn, Stack Overflow, LeetCode, Notion, Figma, and more.
Unclassified tabs are grouped by their cleaned page title. The TUI displays browser usage with a tree-style breakdown showing total time per site category and individual tab details.
Screen Time Analytics and Dashboard
The focusd TUI provides a 5-tab interface: Dashboard, Stats, Focus, Limits, and Settings. The dashboard shows today's total screen time, top applications ranked by usage, a 24-hour activity heatmap, and a 7-day weekly trend chart. The Stats tab offers detailed breakdowns with date range selection (today, last 7 days, last 30 days, or custom range), sortable by duration, name, or open count.
The CLI provides focusd status for a quick summary and focusd stats for detailed usage tables with grouped browser categories.
Focus Timer and Productivity Features
focusd includes a built-in Pomodoro focus timer with configurable durations (1-180 minutes). When a session completes, a system notification appears. Break reminders can be enabled to alert you after N minutes of continuous use, with options to snooze or disable per session.
Daily app time limits let you set maximum usage per application. The daemon checks limits every 5 seconds and shows a Windows notification when you exceed them, with an option to disable the reminder for the snooze duration.
Privacy and Data Control
focusd is designed for privacy. All data stays on your local machine in a SQLite database. You control data retention (1-30 days, default 7 days). You can export data to CSV or JSON from the TUI Settings tab, or open the SQLite database directly. The "Wipe All Data" feature in Settings requires typing "DELETE" as confirmation before clearing everything.
Apps can be whitelisted to skip tracking entirely. The daemon respects the whitelist and does not record any data for those executables.
Installation and System Requirements
focusd requires Windows 10 or later. The installer (focusd_setup.exe) is under 12 MB and installs both binaries to %APPDATA%\focusd\. It automatically adds focusd to your PATH, registers for auto-start via the Windows Registry, and launches the daemon. No runtime dependencies, no CGO, no Electron.
Install via PowerShell: iwr "https://github.com/0xarchit/focusd/releases/latest/download/focusd_setup.exe" -OutFile focusd_setup.exe; ./focusd_setup.exe
CLI Commands
focusd provides 17 CLI commands: focusd (launch TUI), start, stop, status, stats, pause, resume, focus, limit, browser, retention, autostart, path, update, stop-timer, version, and help. Many commands support short aliases like s for status, st for stats, and p for pause.
Open Source
focusd is open source under the MIT License. The source code is available on GitHub at github.com/0xarchit/focusd. Contributions, bug reports, and feature suggestions are welcome.