My Code Activity Extension
Track your coding activity automatically and build a comprehensive history of your development journey. This VS Code extension seamlessly records your coding sessions and commits them to a GitHub repository, helping you maintain a detailed log of your programming activities.
✨ Key Features
🚀 Visual Analytics Dashboard
The extension now includes a powerful web-based dashboard for visualizing your coding activity:
📊 Interactive Analytics
- Real-time activity tracking with daily/weekly/monthly views
- Project distribution visualization with doughnut charts
- Language usage breakdown with time percentages
- Hourly activity heatmap showing peak coding times
🌈 Dashboard Features
- Modern, GitHub-inspired interface
- Dark/Light theme support matching VS Code preferences
- Responsive design for all screen sizes
- Real-time data updates
- Export capabilities (coming soon)
📈 Available Charts
- Activity timeline with trend analysis
- Project distribution pie charts
- Language usage breakdown
- Hourly activity heatmap
- Detailed statistics cards
To access the dashboard:
- Open VS Code Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Search for "Code Activity: Open Dashboard"
- The dashboard will open in your default browser
🚀 Example Usage
Here's an example of the enhanced activity summary that gets generated:
Activity Summary
Overall Statistics
Stat |
Value |
Lines Added (➕) |
3,847 |
Lines Removed (➖) |
1,256 |
Net Change (↕) |
+2,591 |
Active Time (⌚) |
6 hours 45 minutes |
Functions Modified |
24 |
Languages Used |
TypeScript, SCSS, SVG |
Code Changes
Modified Files
- src/features/dashboard/components/AnalyticsChart.tsx (+856, -234)
- Functions: updateChartData, calculateMetrics
- src/api/activityTracker.ts (+745, -122)
- Functions: trackChanges, aggregateStats
- src/hooks/useActivityMetrics.ts (+523, -89)
- Functions: useMetrics, processData
Visualizations
By File Type (Lines Changed)
pie showData
title Lines changed by file type
".tsx" : 1090
".ts" : 2147
".scss" : 523
".svg" : 254
".md" : 323
".json" : 343
By Hour (Activity Heatmap)
pie showData
title Coding activity by hour (count of changes)
"09h" : 450
"10h" : 785
"11h" : 923
"13h" : 654
"14h" : 589
"15h" : 446
🚀 Getting Started
- Install the extension from the VS Code Marketplace
- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run
Sign in with GitHub
to authenticate
- Start coding! The extension will automatically track your activity
⚙️ Configuration
Access settings through VS Code's settings (Ctrl+,):
```json
{
// Minutes between activity commits
"codeTracker.commitInterval": 5,
// Custom Git remote URL (optional)
"codeTracker.customRemoteUrl": "",
// Git branch name for tracking data
"codeTracker.branchName": "main",
// Enable AI-generated commit messages
"codeTracker.enableAiCommits": false,
// Ollama server URL
"codeTracker.ollamaUrl": "localhost:11434",
// Ollama model for commit messages
"codeTracker.ollamaModel": "codellama"
}
```
AI Commit Messages
The extension can generate meaningful commit messages using AI:
- Install Ollama on your system
- Pull the codellama model:
ollama pull codellama
- Enable AI commits in VS Code settings
- The extension will now generate context-aware commit messages
Example AI-generated commit message:
```
feat(tracking): update dashboard components and analytics
- Modified functions: updateChartData, calculateMetrics
- Files: AnalyticsChart.tsx, activityTracker.ts
- Activity duration: 15 minutes
- Function changes: 2 added, 1 modified
```
📊 Enhanced Tracking Details
The extension now tracks:
Code Changes
- Lines added/removed
- Function-level modifications
- Language-specific changes
- Project context
Time Analytics
- Active coding time
- Time per project
- Peak activity hours
- Language usage time
Project Metrics
- Project-specific statistics
- Language distribution
- Most modified files
- Function change frequency
🔧 System Requirements
- VS Code 1.75.0 or higher
- Git installed on your system
- GitHub account (or custom Git repository)
- Internet connection for syncing
- Ollama (optional, for AI commit messages)
🤝 Contributing
We welcome contributions! Please see our CONTRIBUTING.md guide for details on:
- Development setup and workflow
- Code style guidelines
- Pull request process
- Testing requirements
- Available scripts and commands
- Extension configuration
- Community guidelines
Before contributing:
- Fork and clone the repository
- Install dependencies:
npm install
- Create a feature branch
- Make your changes following our guidelines
- Submit a pull request
For detailed instructions, see CONTRIBUTING.md.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
Note: Your activity data is stored in a Git repository that you control. The extension never shares your coding activity without your explicit permission.