A lightweight VS Code extension that monitors your Cursor AI usage directly in the status bar. This is a simplified version based on Cursor Stats by Dwtexe, focusing on core functionality for users who prefer a minimal approach.
This project is based on Cursor Stats by Dwtexe.
- Original Project: Cursor Stats
- Original Author: Dwtexe
- Original Repository: https://github.com/Dwtexe/cursor-stats
- Original License: GNU General Public License v3.0
- This Version: Simplified derivative focusing on core features
- Real-time Usage Tracking: Monitor your Cursor premium requests in the status bar
- Auto-refresh: Configurable refresh intervals (5-600 seconds)
- Clean Interface: Minimal, non-intrusive design that stays out of your way
- Manual Refresh: Click the status bar to refresh manually
- Color-coded Status: Visual indicators as you approach your limits
- Usage Details: Hover tooltip shows detailed usage information and refresh interval
- Status Bar:
π 150/500 $2.50
(graph icon, usage count, and cost if applicable) - Tooltip: Simple breakdown showing:
- Premium Requests: 150/500 (30%)
- Refresh Interval: 30 seconds
- Color Coding:
- Default: Normal usage (0-50%)
- π‘ Yellow (50-75%): Moderate usage
- π Orange (75-90%): High usage
- π΄ Red (90%+): Approaching limit
This lite version removes advanced features to focus on simplicity:
- Internationalization (multi-language support)
- Multi-currency support and conversion
- Progress bar visualizations
- Advanced notification system
- Team usage tracking
- Diagnostic reporting
- GitHub release checking
- Complex configuration options
- Spending alert thresholds
- Daily usage projections
- Weekend-aware calculations
- β Core usage monitoring
- β Status bar integration
- β Basic tooltips
- β Manual refresh
- β Auto-refresh with configurable intervals
- β Color-coded status indicators
For the full-featured version with advanced capabilities, use the original Cursor Stats.
- Download the latest
cursor-stats-lite.vsix
from releases - Open Cursor/VS Code
- Press
Ctrl+Shift+P
(orCmd+Shift+P
on Mac) - Type "Extensions: Install from VSIX"
- Select the downloaded
.vsix
file
# Clone the repository
git clone https://github.com/darzhang/cursor-stats-lite.git
cd cursor-stats-lite
# Install dependencies and build
npm install
npm run build
# Install the extension
npm run install-local
Configure the extension through VS Code settings:
{
"cursorStatsLite.refreshInterval": 30
}
- refreshInterval: Auto-refresh interval in seconds (5-600, default: 30)
- Go to
Settings > Extensions > Cursor Stats Lite
- Or edit your
settings.json
directly
- Install and Activate: The extension activates automatically when Cursor starts
- View Usage: Check the status bar on the bottom right
- Hover for Details: Hover over the status bar item for detailed information
- Manual Refresh: Click the status bar item to refresh immediately
- Adjust Refresh: Change refresh interval in extension settings
- Node.js (v14 or higher)
- npm
- VS Code or Cursor
# Clone the repository
git clone https://github.com/darzhang/cursor-stats-lite.git
cd cursor-stats-lite
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
# Clean previous builds
npm run clean
# Build everything
npm run build
# Install locally for testing
npm run install-local
# Development workflow (build + install)
npm run dev-install
cursor-stats-lite/
βββ src/
β βββ extension.ts # Main extension entry point
β βββ statusBar.ts # Status bar UI management
β βββ api.ts # Cursor API integration
β βββ database.ts # Token storage and retrieval
β βββ types.ts # TypeScript type definitions
βββ out/ # Compiled JavaScript output
βββ package.json # Extension manifest and scripts
βββ tsconfig.json # TypeScript configuration
βββ LICENSE.md # GPL 3.0 License
βββ ATTRIBUTION.md # Attribution to original work
- Extension activation and lifecycle management
- Auto-refresh setup and configuration handling
- Single refresh command registration
- Status bar UI creation and updates
- Simple tooltip generation with usage and refresh interval
- Color coding based on usage percentage
- Cursor API communication
- Usage data fetching and parsing
- Error handling for API calls
- Cursor authentication token retrieval from local database
- Cross-platform database path handling
The extension currently provides one command:
- Refresh Cursor Usage (
cursor-usage.refresh
): Manually refresh usage data
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Test your changes thoroughly
- Update documentation as needed
- Ensure compatibility with both VS Code and Cursor
- Keep the UI minimal and non-intrusive
- Respect the GPL 3.0 license requirements
Script | Description |
---|---|
npm run compile |
Compile TypeScript to JavaScript |
npm run watch |
Watch for changes and auto-compile |
npm run clean |
Remove build artifacts |
npm run package |
Create .vsix package |
npm run build |
Clean, compile, and package |
npm run install-local |
Install extension locally |
npm run dev-install |
Build and install (development workflow) |
Extension not showing in status bar:
- Ensure you're signed in to Cursor
- Check if the extension is activated in the Extensions panel
- Try reloading the window (
Ctrl+Shift+P
β "Developer: Reload Window")
"No Cursor token found" error:
- Sign in to your Cursor account
- Restart Cursor after signing in
- Check your internet connection
High refresh rates causing performance issues:
- Increase refresh interval in settings
- Recommended: 30-60 seconds for optimal performance
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.
This is a derivative work of Cursor Stats by Dwtexe, also licensed under GPL 3.0.
This derivative work complies with GPL 3.0 requirements by:
- Using the same GPL 3.0 license as the original
- Providing full source code
- Clearly attributing the original work
- Documenting changes made from the original
- Primary acknowledgment to Dwtexe for creating the original Cursor Stats extension
- Built for the Cursor community
- Inspired by the need for simple, effective usage monitoring
- Thanks to all contributors and users
- Author: Darren Zhang
- Repository: https://github.com/darzhang/cursor-stats-lite
- Issues: GitHub Issues
- Original Work: Cursor Stats by Dwtexe
Simplified version of Cursor Stats, made with β€οΈ for the Cursor community