RescueTime notes which app and site is in front and for how long, then sorts the minutes into categories with a productivity score. A small daemon that samples the active window every few seconds, notices idle time and writes spans to SQLite does that in one sitting for one operating system, with a page of charts and a rules file for categories. What you give up is the same tracking on your phone and a second computer, website blocking during Focus Sessions, and per-site detail unless you add a browser extension. If you would rather not build it, ActivityWatch already tracks for free.
Before you buildCheck RescueTime Lite first: it tracks automatically and shows the last two weeks with one goal. If you only want to see where the day goes, it may be enough. ActivityWatch tracks locally for free.
Build me a personal computer-time tracker to replace RescueTime. Requirements: - Python 3.12: a tracker daemon and a FastAPI + HTMX dashboard on http://localhost:4760, driven by a Typer CLI: `timetrack run` starts the daemon, `timetrack serve` the dashboard. - Tracker: every 5 seconds record the frontmost app, its window title and whether the machine is idle (no input for 120 seconds, configurable). On macOS use `pyobjc`: NSWorkspace for the app, Quartz for idle time, the Accessibility API for the title. Put it behind a WindowProvider interface and add a Windows implementation (`pywin32`, `psutil`) as the second one. - Storage: sqlite3 in ./data/time.db. Merge raw samples into spans (app, title, start, end). A categories.yaml of ordered rules (match on app, title regex or URL host) gives each span a category and a productivity score from -2 to +2; `timetrack recategorize` reapplies it to history. - Browser URLs: a Manifest V3 extension posts the active tab's host to the daemon on localhost:4761 with a token from .env. With no extension connected, fall back to the window title. - Dashboard: day, week and month views with time per category, a productivity pulse from 0 to 100 (time-weighted average of the scores), top 10 apps and sites, an hourly timeline and a list of uncategorised items with a one-click form that appends a rule to categories.yaml. - Goals: goals.yaml with limits such as "Social under 90 minutes a day" or "Work at least 4 hours"; send a macOS notification (`osascript`) when a limit is crossed. - Focus: `timetrack focus 50m` shows a countdown in the menu bar (`rumps`) and tags the spans in that window so the dashboard can total focus hours. It blocks nothing. - Export: CSV of spans and of daily totals, and JSON for any date range. - Single user. No accounts, no telemetry, local-first, no outbound calls. Window titles can hold private text, so create the database with chmod 600. - Out of scope: website and app blocking, phone tracking, multi-device sync, teams, screenshots. - README: a launchd plist that starts the daemon at login and where to grant Accessibility permission in System Settings. Say plainly that the Windows provider is untested if you're on a Mac.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own RescueTime.
Add a weekly report to the tracker in this folder. Requirements: - A command `timetrack report` that builds last week's totals per category and per day, the productivity pulse and how it moved against the previous week, plus the five apps that grew most. - Send it as an HTML email through SMTP (`smtplib`; SMTP_HOST, SMTP_USER, SMTP_PASSWORD and REPORT_TO in .env), with a small inline bar chart rendered by `matplotlib` as a PNG attachment. - A launchd plist and a cron line in the README to send it Monday at 08:00. - Update the README.
Add website blocking to the tracker in this folder. Requirements: - `timetrack focus 50m --block` adds the hosts listed in blocklist.yaml to /etc/hosts for the duration, pointing them at 127.0.0.1, through a small root helper started with `sudo`. - Always remove the entries when the session ends, on Ctrl-C and on the next start of the daemon if the helper was killed; mark the entries with a comment so only ours are touched. - Show the blocked sites and the time left in the menu bar, and count blocked attempts if the helper can see them. - Update the README with the sudo step and a warning that browsers with DNS over HTTPS can bypass this.
Add offline time from a calendar to the tracker in this folder. Requirements: - Read events from one CalDAV calendar (`caldav`; CALDAV_URL, CALDAV_USER and CALDAV_PASSWORD in .env) for the last 7 days every hour. - Turn each event that overlaps idle time into an "Offline: <title>" span with category Meetings, and ignore events marked free or declined. - Show offline spans in the timeline with a different colour; never double-count time with an active span. - Update the README.
Add a RescueTime importer to the tracker in this folder. Requirements: - A command `timetrack import-rescuetime --key KEY --from YYYY-MM-DD` that calls RescueTime's Analytic Data API (`/anapi/data`: activity-level rows at hourly resolution, as CSV; take the parameter names from the API reference at rescuetime.com/developers) in one-week windows until today, with a one-second pause between calls and a retry on errors. - Map each row (activity, category, productivity) to a span flagged source="rescuetime"; keep RescueTime's category names as tags and map productivity -2..2 straight across. - Make a second run a no-op and show the dashboard with imported data in a lighter colour. - Update the README with where to create an API key.
People pay because tracking works only when you never have to start it: it runs from login, the data covers every device, and the weekly summary arrives whether or not you remember to look. Blocking and alerts turn the report into a nudge. A homemade tracker that quietly stops after an update teaches you nothing about the week it missed.
Estimate · Runs on your machine with no outside calls, so there is no running cost. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Lite | $0 | $0 | Activity reports and weekly summaries for the past two weeks, 1 goal; no alerts, Focus Sessions, offline time tracking or iOS app. |
| Solo | $9 | $7 | Automatic tracking on web, mobile and desktop, idle detection, Focus Sessions with distraction blocking, offline activity, goals and alerts, daily highlights, searchable reports and unlimited report history. |
| Solo+ | $15 | $12 | Everything in Solo plus timesheets. |
| Team | $12/user | $10/user | The Solo feature set for a team. |
| Team+ | $18/user | $16/user | Team plus timesheets. |
Lite is free and keeps two weeks of data with one goal, no alerts, no Focus Sessions and no iOS app.
Yes. An AI coding agent such as Claude Code, Codex or Cursor can build a usable personal version in one session with the prompt on this page, running on your own machine.
About $9 a month on the Solo plan, $108 a year (checked 2026-10-19).
The same tracking on your phone and on every computer you use; Website and app blocking during Focus Sessions; Searchable reports and alerts that nag you when you slip; Years of history if you export nothing before cancelling; Timesheets and team dashboards on the higher plans. If any of those matter to you, keep paying.
Yes: ActivityWatch (open source), Dayflow (open source), Tockler (open source).