DevHours.fun VS Code Extension
Track your coding hours automatically and compete with developers worldwide!
🎯 Features
- ⏱️ Automatic Time Tracking - Tracks your active coding time per project and language
- 🎯 Smart Detection - Pauses automatically after 2 minutes of inactivity
- 💾 Offline Support - Stores data locally and syncs when online
- 📊 Real-time Stats - View your daily coding time in the status bar
- 🔒 Privacy First - Only tracks metadata (project, language, duration) - never your code
📦 Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Cmd/Ctrl + Shift + X)
- Search for "DevHours.fun"
- Click Install
From VSIX File
code --install-extension devhours-fun-0.1.0.vsix
🚀 Quick Start
- Install Extension - Get it from VS Code Marketplace
- Connect Account
- Run command:
DevHours: Connect Account (Cmd/Ctrl + Shift + P)
- Sign in at devhours.fun
- Copy your auth token
- Paste it in VS Code
- Start Coding - That's it! Your time is automatically tracked
🎮 Commands
Open Command Palette (Cmd/Ctrl + Shift + P) and type:
DevHours: Connect Account - Connect your DevHours.fun account
DevHours: Sync Now - Manually sync your data
DevHours: View Logs - View local tracking logs
DevHours: Disconnect Account - Disconnect your account
⚙️ Configuration
Access settings in VS Code Preferences → Extensions → DevHours
Available Settings
| Setting |
Description |
Default |
devhours.inactivityThreshold |
Seconds of inactivity before pausing |
120 |
devhours.syncInterval |
Seconds between automatic syncs |
600 |
devhours.apiEndpoint |
API endpoint URL |
https://devhours.fun/api |
Example Configuration
{
"devhours.inactivityThreshold": 180,
"devhours.syncInterval": 300,
"devhours.apiEndpoint": "https://devhours.fun/api"
}
📊 What Gets Tracked?
For each coding session, we track:
- Project name - From your workspace folder name
- Language - The programming language you're using
- Duration - Time spent actively coding (in minutes)
- Timestamp - When the coding session occurred
We NEVER track:
- Your actual code content
- File names or paths
- Keystrokes or specific edits
- Personal information
🔧 How It Works
- Detection - Extension detects when you're actively coding (typing, editing files)
- Tracking - Counts active coding time, automatically pausing after 2 minutes of inactivity
- Storage - Saves data locally in case you're offline
- Sync - Syncs to DevHours.fun every 10 minutes or when VS Code closes
- Display - Shows your daily total in the status bar
🚨 Troubleshooting
Extension Not Tracking
- Make sure you're connected (check status bar)
- Try running
DevHours: Sync Now
- Check VS Code output panel for errors
Sync Failing
- Check your internet connection
- Verify your auth token is still valid
- Try disconnecting and reconnecting your account
Status Bar Not Showing
- Restart VS Code
- Make sure the extension is enabled
- Check for VS Code updates
🔐 Privacy & Security
- No Code Collection - We never see your actual code
- Encrypted Transit - All data is sent over HTTPS
- Local First - Data is stored locally and only synced with your permission
- Open Source - View our code on GitHub
- Token Security - Auth tokens are stored in VS Code's secure storage (SecretStorage)
🏗️ Development
Setup
# Clone repository
git clone https://github.com/yourusername/devhours.fun-vscode
# Install dependencies
cd devhours.fun-vscode
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
Testing
Press F5 in VS Code to launch Extension Development Host.
Building
# Install VSCE
npm install -g @vscode/vsce
# Package extension
vsce package
# This creates devhours-fun-0.1.0.vsix
📁 Project Structure
devhours.fun-vscode/
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── tracker.ts # Activity tracking logic
│ ├── sync.ts # Supabase sync functionality
│ ├── auth.ts # Authentication handling
│ └── types.ts # TypeScript type definitions
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
📄 License
MIT License - See LICENSE file for details
🔗 Links
💬 Support
Need help?
Made with ❤️ by developers, for developers.