Project Time Tracker
A VS Code extension that tracks how much time you actually spend on each project — across editor
files, integrated terminals (CLI tools like Claude Code included), and other apps (Teams, Slack,
browser tabs, Word docs) via a local ActivityWatch instance.
Why
Most time trackers only see the editor. This one also catches:
- Terminal focus time — a CLI session (e.g. chatting with an AI coding assistant) counts as
real project time, not a black hole between editor events.
- Everything else, merged in from ActivityWatch and matched to a project by keyword: Teams
meetings and chats, Slack channels, browser tabs, even an externally-opened Word doc — as long
as its window title contains one of your project's configured keywords.
Everything is broken out by category (Files / Terminal / Other apps) so you can see not just
how much time went to a project, but where.
Features
- Per-project, per-day and per-month totals, broken down as Files / Terminal / Other apps.
- A dashboard webview (
Time Tracker: Dashboard) with a date picker — browse any day, not just
today.
- Status bar item showing today's total for the current project.
- Merges in ActivityWatch window/AFK data every 2 minutes (and immediately whenever you open the
dashboard), matching window titles against configurable per-project keywords.
- Idle/AFK-aware: only counts time ActivityWatch's AFK watcher considers active.
Requirements
- ActivityWatch running locally (
http://localhost:5600 by
default) if you want the "Other apps" category populated. Editor and terminal tracking work
without it.
Settings
| Setting |
Default |
Description |
projectTimeTracker.projectName |
"" |
Override the auto-detected project name (defaults to the workspace folder name). |
projectTimeTracker.idleThresholdMinutes |
2 |
Gap after which activity stops counting toward elapsed time. |
projectTimeTracker.mergeActivityWatch |
true |
Whether to merge in ActivityWatch data at all. |
projectTimeTracker.projectKeywordAliases |
[] |
Extra whole-word keywords that count as the CURRENT workspace's project when matching ActivityWatch window titles. |
projectTimeTracker.otherProjects |
{} |
Additional projects to detect regardless of which workspace is open, e.g. {"MyProject": ["MyProject", "MP"]}. |
projectTimeTracker.activityWatchUrl |
http://localhost:5600 |
Base URL of the local ActivityWatch server. |
projectTimeTracker.excludeTitleContains |
[] |
Window titles containing any of these substrings are never recorded — use for privacy. |
Commands
Time Tracker: Dashboard — the main webview, with the date picker.
Time Tracker: Show Today / Time Tracker: Show This Month — quick report panels.
Time Tracker: Show All Projects — totals across every tracked project.
Time Tracker: Sync Other Apps Now — force an immediate ActivityWatch merge.
Time Tracker: Open Data File — jump straight to the underlying JSON data file.
Time Tracker: Show Log — the extension's own output channel, for troubleshooting.
Where data lives
<VS Code global storage>/local.project-time-tracker/time-data.json — one shared file across
every VS Code window on the machine. Use Time Tracker: Open Data File to find it directly.
Install
Not on the Marketplace yet, so build and install it as a .vsix:
git clone https://github.com/salma-w/project-time-tracker.git
cd project-time-tracker
npm install
npm run compile
npx @vscode/vsce package --no-dependencies
code --install-extension project-time-tracker-*.vsix
Then reload the VS Code window. No configuration is required to get started — it auto-detects
the current project from your workspace folder name and tracks editor + terminal time
immediately. ActivityWatch is optional (see Requirements); without it, the
"Other apps" category just stays empty and everything else still works.
Development
npm install
npm run compile # or: npm run watch
npx @vscode/vsce package --no-dependencies # produces a .vsix you can install locally
License
MIT — see LICENSE.