Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Developer Activity TrackerNew to Visual Studio Code? Get it now.
Developer Activity Tracker

Developer Activity Tracker

Kishan Singh

|
2 installs
| (0) | Free
Track your coding activity and sync with backend APIs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Coding Activity Tracker - VS Code Extension

A VS Code extension that tracks your coding activity and syncs it with a backend API for analytics and reporting.

Features

  • Line Tracking: Monitors lines of code added/removed in real-time
  • Commit Tracking: Automatically detects and tracks Git commits
  • Active Time Tracking: Measures your active coding time vs idle time
  • Real-time Status Bar: Shows current stats in the status bar
  • Detailed Statistics: View comprehensive stats in a webview panel
  • Automatic Sync: Syncs data with backend API every 10 minutes
  • Multi-project Support: Tracks activity across different projects

Status Bar Display

The extension shows real-time stats in the VS Code status bar:

$(pencil) +120/-30 | $(git-commit) 2 | ⏱ 1h 15m
  • Lines: Shows lines added/removed (net change)
  • Commits: Number of commits made today
  • Time: Active coding time in hours and minutes

Commands

  • Coding Activity: Show Coding Stats - Opens the detailed stats view
  • Coding Activity: Configure Activity Tracker - Configure API settings

Configuration

The extension can be configured through VS Code settings:

{
  "codingActivityTracker.apiUrl": "https://gitxlogbackend.onrender.com/api",
  "codingActivityTracker.syncInterval": 10,
  "codingActivityTracker.idleTimeout": 5
}

Settings

  • apiUrl: Backend API URL (default: https://gitxlogbackend.onrender.com/api)
  • syncInterval: Sync interval in minutes (default: 10)
  • idleTimeout: Idle timeout in minutes (default: 5)

Installation

Development Installation

  1. Clone this repository
  2. Install dependencies:
    npm install
    
  3. Compile the extension:
    npm run compile
    
  4. Open the project in VS Code
  5. Press F5 to run the extension in a new Extension Development Host window

Production Installation

  1. Package the extension:
    npm install -g vsce
    vsce package
    
  2. Install the generated .vsix file in VS Code

Backend Requirements

This extension requires a backend API with the following endpoints:

Authentication

  • POST /api/coding-activity/token - Generate JWT token for machine

Data Sync

  • POST /api/coding-activity/sync - Sync activity data

Statistics

  • GET /api/coding-activity/stats/:userId - Get user stats for a date
  • GET /api/coding-activity/stats/:userId/range - Get user stats for a date range

Data Structure

Sync Payload

{
  "date": "2025-01-19",
  "project": "my-project",
  "lines": {
    "added": 120,
    "removed": 30,
    "net": 90
  },
  "commits": [
    {
      "hash": "abc123",
      "message": "fix: login bug",
      "branch": "main",
      "timestamp": "2025-01-19T13:45:00Z"
    }
  ],
  "time": {
    "activeMinutes": 75,
    "idleMinutes": 10
  }
}

Privacy

  • All data is stored locally and synced to your backend
  • Machine ID is generated from system information for unique identification
  • No data is sent to third-party services
  • You control your own backend and data storage

Troubleshooting

Extension not tracking activity

  1. Check that the extension is activated
  2. Verify backend API is running and accessible
  3. Check VS Code output panel for error messages

Authentication issues

  1. Ensure backend API is running
  2. Check API URL configuration
  3. Verify network connectivity

Git tracking not working

  1. Ensure Git extension is installed and active
  2. Check that you're in a Git repository
  3. Verify Git repository has commits

Development

Project Structure

src/
├── extension.ts          # Main extension entry point
├── activity-tracker.ts   # Core activity tracking logic
├── api-client.ts         # Backend API communication
├── status-bar-manager.ts # Status bar display
├── stats-view-provider.ts # Webview for detailed stats
└── utils.ts             # Utility functions

Building

npm run compile    # Compile TypeScript
npm run watch      # Watch for changes and recompile
npm run lint       # Run ESLint

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions:

  1. Check the troubleshooting section
  2. Review VS Code output panel for error messages
  3. Open an issue on GitHub with detailed information
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft