CodeTrackr for VS Code
Track your coding activity automatically and level up your productivity!
CodeTrackr is a powerful VS Code extension that automatically tracks your coding time, files edited, languages used, and lines of code written. All your data syncs securely with your CodeTrackr account.

✨ Features
- ⏱️ Automatic Time Tracking: Tracks coding time in real-time as you work
- 📊 Detailed Analytics: See your daily activity, language breakdown, and project stats
- 🔒 Secure Authentication: API key-based authentication for maximum security
- 🎯 Goal Setting: Set and track your coding goals
- 🏆 Leaderboards: Compete with other developers globally
- 👥 Team Collaboration: Join teams and track group progress
- 🚀 Zero Configuration: Auto-starts tracking once API key is set
- 📈 Line Counter: Tracks lines added and removed in real-time
🚀 Getting Started
1. Install the Extension
Install this extension from the VS Code marketplace or manually:
- Open VS Code
- Press
Ctrl+Shift+X (or Cmd+Shift+X on Mac)
- Search for "CodeTrackr"
- Click Install
2. Get Your API Key
- Go to CodeTrackr Dashboard (or your hosted instance)
- Sign in with Google
- Navigate to Profile page
- Copy your API key
The extension will automatically prompt you to enter your API key on first use. Alternatively:
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Type "CodeTrackr: Setup API Key"
- Paste your API key
- Press Enter
That's it! Your coding activity will now be tracked automatically.
📋 Commands
Access these commands via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
- CodeTrackr: Setup API Key - Configure or update your API key
- CodeTrackr: Show Connection Info - View your current connection status
- CodeTrackr: Start Tracking - Manually start tracking (usually automatic)
- CodeTrackr: Stop Tracking - Pause tracking temporarily
- CodeTrackr: Flush Now - Immediately send buffered activity to server
⚙️ Settings
Configure the extension in VS Code settings (File > Preferences > Settings or Ctrl+,):
codetrackr.apiKey (Required)
Your CodeTrackr API key. Get it from your dashboard profile page.
Example:
{
"codetrackr.apiKey": "your-api-key-here"
}
codetrackr.apiBase
Backend API URL. Default: http://127.0.0.1:5050
For production, update to your hosted backend:
{
"codetrackr.apiBase": "https://api.codetrackr.com"
}
codetrackr.flushIntervalSeconds
How often to check and send activity data. Default: 30 seconds
codetrackr.minFlushMinutes
Minimum activity time before sending data. Default: 0.5 minutes
🔒 Privacy & Security
- API Key Authentication: Your API key is stored securely in VS Code's settings
- Local Processing: Activity tracking happens locally on your machine
- Encrypted Transmission: All data sent via HTTPS (in production)
- No Passwords: Uses secure API keys instead of passwords
- You Control Your Data: Delete your account anytime from the dashboard
📊 What's Tracked?
The extension tracks:
- Time: Duration of active coding sessions
- Files: Names of files you're working on
- Languages: Programming languages used
- Projects: Project/workspace names
- Lines: Lines of code added and removed
- Timestamps: When you're coding
Not tracked:
- File contents or code
- Keystrokes
- Personal information
- Passwords or secrets
🆕 What's New in v2.0.0
Major Changes
- ✅ API Key Authentication: Now uses secure API keys instead of username
- ✅ Improved Onboarding: Guided setup process for new users
- ✅ Better Error Handling: Clear messages when API key is invalid
- ✅ Auto-Setup Prompts: Automatic prompts to configure API key
- ✅ Connection Status: New command to check connection status
- ✅ Updated Endpoint: Uses new
/api/extension/track endpoint
- ✅ Enhanced Security: All requests authenticated via API key
Breaking Changes
codetrackr.userId setting is deprecated and no longer used
- Old endpoint
/api/user-activity replaced with /api/extension/track
- API key is now required for tracking to work
🐛 Troubleshooting
Extension not tracking?
- Check if API key is configured: Run "CodeTrackr: Show Connection Info"
- Verify API key is valid: Copy it from your dashboard profile
- Check backend is running: Visit your API base URL in browser
- Restart VS Code
"Invalid API key" error?
- Go to your CodeTrackr dashboard profile page
- Copy your API key (make sure no extra spaces)
- Run "CodeTrackr: Setup API Key" and paste it
- If still fails, try regenerating your API key on the profile page
Activity not showing in dashboard?
- Run "CodeTrackr: Flush Now" to send buffered data immediately
- Refresh your dashboard
- Check backend logs for errors
- Ensure
apiBase URL is correct in settings
🤝 Contributing
Found a bug or have a feature request?
📝 License
MIT License - see LICENSE file for details
🙏 Acknowledgments
Created with ❤️ by:
🔗 Links
Happy Coding! 🚀
This is the VS Code extension for CodeTrackr, a time-tracking tool for developers. This extension automatically tracks your coding activity in Visual Studio Code and sends it to your CodeTrackr backend.
Features
- Automatic Time Tracking: Tracks your coding time without any manual start/stop commands.
- Language Detection: Automatically detects the language you are using.
- Offline Support: Caches your activity locally and sends it to the backend when you are online.
- Customizable: Configure the API endpoint, user ID, and other settings.
Prerequisites
Usage
- Install the extension from the Visual Studio Marketplace.
- Configure the extension in your VS Code settings. You will need to set the
codetrackr.apiBase to your CodeTrackr backend URL.
- Start coding! The extension will automatically track your activity.
Repository
The source code for this extension is available on GitHub at https://github.com/Soham-Official/CodeTrackr.
Author
Contributing
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
Changelog
See the CHANGELOG.md file for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
For more detailed instructions on how to publish this extension, see PUBLISHING_GUIDE.md.