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.

[SYSTEM] Copied to clipboard
C:\Users\You>

C:\Users\You> Download Installer

iwr "https://github.com/0xarchit/focusd/releases/latest/download/focusd_setup.exe" -OutFile focusd_setup.exe; ./focusd_setup.exe

C:\Users\You> Or via CMD

curl -L -o focusd_setup.exe "https://github.com/0xarchit/focusd/releases/latest/download/focusd_setup.exe" && focusd_setup.exe

Run the installer. Adds focusd to PATH automatically. Open Terminal and type 'focusd' to launch.

C:\Users\You> focusd --features

[PRIVACY]

All data stored locally in SQLite at %APPDATA%\focusd\. No cloud, no accounts, no telemetry. MIT licensed and open source.

[TUI DASHBOARD]

5-tab terminal UI: Dashboard, Stats, Focus Timer, Limits, and Settings. Mouse and keyboard navigation.

[BROWSER TRACKING]

Tracks time per browser tab by page title. Smart grouping for 70+ sites (YouTube, GitHub, ChatGPT, Spotify, Netflix, etc).

[POMODORO TIMER]

Built-in focus sessions with system notifications. Configurable 1-180 minute durations and break reminders.

[APP LIMITS]

Set daily time limits per application. Get notified when limits are exceeded with snooze option.

[PERFORMANCE]

Written in Go with native Win32 syscalls. CLI + silent daemon under ~12MB total. ~10-25MB RAM idle. No CGO, no runtime dependencies.

[BREAK REMINDERS]

Configurable reminders after N minutes of continuous use. Snooze or disable per session.

[DATA CONTROL]

Configurable retention (1-30 days). Export to CSV or JSON. Open SQLite directly. Wipe data anytime.

[AUTO-START]

Daemon registered in HKCU\...\Run on install. Runs silently in background. Toggle via focusd autostart.

[WHITELIST]

Add executables that should never be tracked. Whitelisted apps are skipped entirely by the poller.

[AUTO-UPDATE]

focusd update checks GitHub Releases, verifies SHA-256 checksum, and runs installer silently with UAC elevation.

[ACTIVITY HEATMAP]

24-hour bar chart showing usage density across the day. Identify your most and least productive hours.

C:\Users\You> focusd --help

COMMAND ALIAS DESCRIPTION
focusdOpen interactive TUI menu
focusd startStart background tracking daemon
focusd stopStop tracking daemon gracefully
focusd statussShow tracking status and today's summary
focusd statsstDetailed usage breakdown
focusd focus [mins]Start Pomodoro focus timer
focusd limit [app] [mins]Set daily app time limit
focusd browserAdd/remove custom tracked browsers
focusd pausepPause tracking temporarily
focusd resumerResume tracking
focusd retentionretManage data retention (status/set/reset)
focusd autostartautoManage auto-start (status/enable/disable)
focusd pathManage PATH (status/enable/disable)
focusd stop-timerStop running Pomodoro timer
focusd updateCheck for updates from GitHub
focusd version-vShow version
focusd helphShow built-in help

C:\Users\You> cat roadmap.txt

[PLANNED] WEB UI

Localhost web interface with charts and visualizations.

[PLANNED] GAMIFICATION

Daily productivity streaks and focus scores.

C:\Users\You> git commit -m "suggestion"

Have an idea? [SUGGEST A FEATURE]