Project Timer is a lightweight VS Code extension that tracks the time you spend on your projects. It provides detailed insights into your productivity by analyzing your coding activity by dates, programming languages and specific files.
- Privacy-first Storage: Stores data locally in VS Code; synchronization happens only through Settings Sync if enabled.
- Cross-device synchronization: Optionally, you can enable synchronization across multiple devices using VS Code Settings Sync.
- Real-time Status Bar Timer: Displays a timer in the VS Code status bar showing your progress in real-time. The display format is customizable.
- Smart Idle Detection: Automatically pauses the timer when you are inactive for a configurable duration.
- Visual Statistics: Provides a comprehensive webview with charts and insights into your coding habits.
Simply open a folder or workspace, and Project Timer will begin tracking. The timer will appear in the status bar. Hover over the status bar item to see a preview of today's time tracking. Click on the status bar item to quickly open the statistics view.
Note: On the first launch of this version, you will be prompted to choose whether to enable synchronization.
This extension contributes the following settings:
project-timer.statusBar.enabled: Enable or disable the status bar timer.project-timer.statusBar.displayPrecision: Set time precision tosecond,minute,hour, orauto.project-timer.statusBar.displayProjectName: Toggle the visibility of the project name in the status bar.project-timer.statusBar.displayTimeMode: Set the display mode totoday,total, orboth.project-timer.timer.pauseWhenUnfocused: Automatically pause the timer when VS Code is not the active window.project-timer.timer.unfocusedThreshold: Set the threshold (in minutes) for unfocused pause. If the window is unfocused for longer than this threshold, the timer will pause.project-timer.timer.pauseWhenIdle: Automatically pause the timer when user is idle.project-timer.timer.idleThreshold: Set the idle time threshold (in minutes) after which the timer pauses. Set to0to disable.project-timer.synchronization.enabled: Enable or disable data synchronization via VS Code Settings Sync.project-timer.synchronization.syncedProjects: The list of projects that are tracked for synchronization.
Project Timer: Open Statistics: View your project's time tracking dashboard.Project Timer: Export Data: Save your tracking history to a JSON file.Project Timer: Import Data: Load tracking history from a previously exported JSON file.Project Timer: Delete All Storage: Clear all local tracking data, both current device and remote devices (requires confirmation).Project Timer: Rename Project: Rename the current project.Project Timer: Disable Sync For Current Project: Disable synchronization for the current project.Project Timer: Enable Sync For Current Project: Enable synchronization for the current project.
- Project Timer in VS Code Marketplace
- Project Timer github repository
- Download VSIX
- Project Timer icon
- clone repository
git clone https://github.com/kunlinglio/project-timer.git cd project-timer - install dependencies
npm install
- debug extension
Press F5 to toggle debug mode. - build VSIX
npm run build
- run checks (compile, lint, test)
npm run pretest npm run test - release
- release on github
git tag vX.X.X git push origin vX.X.X # Toggle github action to release - release on marketplace
Then manually upload to Marketplace.
npm run build -- -o project-timer_vX.X.X.vsix
- release on github
- Support data synchronization across multiple devices.
- Support more identifiers to recognize project, e.g. workspace name / workspace folder / git repo url...
- Support project name customization.
- Support VS Code remote window (e.g. SSH, Dev Containers).
- Support upgrade workspace folder to multi-root workspace.
- Support time period statistics (weekly/monthly reports).
- Support viewing statistics for all projects on device instead of current project only.
Distributed under the terms of the Apache 2.0 license.
- Enhanced Data Sync Reliability: Implemented an exponential backoff strategy for data synchronization to ensure more consistent and accurate data display after extension startup.
- Improved Log Messages: Log messages now include module-specific information, making it easier to identify and debug issues in the VS Code Output panel.
- UI Clarity Updates: Updated the badge text in the statistics view from "best day" to "longest day" for clearer representation of time-based achievements.
- Added support for VS Code remote windows: Now tracks time seamlessly in Remote SSH, Dev Containers, and WSL sessions.
- Fixed an issue where the description for
project-timer.multiRootWorkspace.warningMessage.enablewas displayed incorrectly in settings.
- Improved multi-root workspace UX: the warning dialog now offers "Ok" and "Don't show again" actions.
- Added configuration: project-timer.multiRootWorkspace.warningMessage.enable to enable/disable that warning.
- Removed stray console logs when not in debug mode.
- Fixed an activation crash caused by reaching max stack size.
- Enhanced the "Top Files" panel in the statistics view: you can now click on a file path to jump directly to the corresponding file in the editor.
- Fixed a bug where the statistics webview might remain in a
loadingstate after refreshing the window or reloading the extension.
- Improved the statistics view by grouping languages outside the top 5 into a new
othercategory for better clarity. - Refined activity detection: window focused and unfocused events are no longer treated as user activity, preventing the timer from starting unexpectedly.
- Optimized internal logic sequence to slightly improve extension performance.
- Bundled the ECharts library within the extension package. This ensures the statistics dashboard works reliably offline and eliminates dependencies on external CDNs.
- Restored data synchronization service by default, resolving previous consistency concerns with a more robust implementation.
- Introduced per-project sync controls: You can now use commands to Enable or Disable synchronization for specific projects as needed.
- A dded a new management configuration project-timer.synchronization.syncedProjects that provides a readable overview of all projects currently participating in sync.
- UI Accessibility Improvements:
- Added a vertical scrollbar to the Statistics Page to ensure full accessibility on low-resolution or smaller screens.
- Refined the overall layout of the dashboard for better visual balance and clarity.
- Resolved a issue on the Windows platform where the extension failed to activate due to parent path parsing errors.
- Error messages and stack traces are now correctly logged to the VS Code
Outputpanel for easier troubleshooting. - Temporarily disabled the synchronization feature to prevent potential data consistency issues.
- Improved UI responsiveness: The status bar and menus now refresh immediately after data management operations (Delete, Import, Rename).
- Updated extension icon color to a blue theme (#007FD4).
- Force-refreshes all cached data 5 seconds after startup to ensure the Git remote URL is resolved correctly.
- Added diagnostic logging to the VS Code Output panel.
- Redesigned statistics dashboard with an improved layout and new insights:
- KPI strip showing Total, Today, Avg / Day, and Best Day.
- Activity chart with 7d / 30d / 90d / All range tabs; the All view fills the complete calendar range including gap days.
- Languages and Top Files panels auto-fit to available space, with a coloured progress bar per entry.
- Devices panel appears automatically when data from multiple devices is detected.
- Responsive layout that stacks panels vertically on narrow viewports.
- Fixed an issue where the Git remote URL could not be retrieved correctly.
- Fixed incorrect refresh frequency when
displayTimeModeis set toBoth. - Further reduced background CPU usage by lowering refresh frequency for the status bar, hover menu, and time calculator.
- The
todayvalue in the status bar and hover menu now consistently reflects local device data only.
- Performance enhancement: Implemented caching and reduced refresh frequency to reduce power consumption (approx. 50% reduction in idle state).
- Increased status bar item priority.
- Resolved latency in status bar icon refreshes.
- Fixed multi-project record display issues.
- Fixed time calculation to use local time instead of UTC for accurate daily statistics.
- Added Git remote URL matching for more accurate cross-device project recognition.
- Added support for customizing project display names.
- Optimized status bar performance with a new caching layer.
- Introduced Storage cache system to improve performance.
- Fixed timer remaining at 0/1s when multiple windows were open simultaneously.
- Fixed issue where statistics were incorrectly merged when multiple project folders existed under the same parent directory.
- Introduced V2 data storage structure with automatic migration from V1.
- Added synchronization support via VS Code Settings Sync.
- Added a one-time prompt to choose synchronization preference on startup.
- Refined Import, Export, and Delete command behaviors for multi-device data management.
- Fixed a bug where the status bar timer failed to refresh periodically.
- Improved time tracking precision with new setting items.
- Refactored status bar display modes for better customization.
- UI refinements and optimized default configurations.
- Initial release of Project Timer.
- Automatic time tracking with idle detection and focus awareness.
- Visual statistics dashboard.
- Data export/import and management tools.

