Give it a descriptive name (e.g., "VS Code Coding Tracker")
Select the following scopes:
repo (Full control of private repositories)
Copy the generated token (you won't be able to see it again!)
Setup
Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
Type "Start Code Tracking" and press Enter
When prompted, paste your GitHub Personal Access Token
The extension will:
Create a private repository (default name: code-tracking-stats)
Start tracking your coding time
Show a countdown timer in the status bar for the next commit
Configuration
You can customize the extension's behavior in VS Code settings:
Open VS Code Settings (Ctrl+, or Cmd+,)
Search for "Code Productivity Tracking"
Available settings:
codeTracking.repositoryName: Name of your private statistics repository (default: "code-tracking-stats")
codeTracking.commitInterval: Time between commits in milliseconds (default: 1800000 - 30 minutes)
Usage
Start Tracking
Ctrl+Shift+P / Cmd+Shift+P
Type "Start Code Tracking"
Watch your coding time in the status bar!
Stop Tracking
Ctrl+Shift+P / Cmd+Shift+P
Type "Stop Code Tracking"
A final commit will be made with your session statistics
Understanding Your Statistics
The extension creates a JSON file in your private repository containing:
{
"totalTime": 3600, // Total coding time in seconds
"sessions": [
{
"date": "2025-01-10T12:00:00.000Z", // Session timestamp
"duration": 1800, // Session duration in seconds
"totalTime": 1800 // Cumulative total at this point
},
// ... more sessions ...
]
}
Privacy
All statistics are stored in your private GitHub repository
Your GitHub token is stored securely in VS Code's global state
No data is sent to any third-party servers
Contributing
Found a bug or have a feature request? Please open an issue on the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you find this extension helpful, please consider: