A clean, command-line tool to check your Cursor account usage credits
Project description
Cursor Credits Checker
Version 0.2.0 - A clean, command-line tool to check your remaining "Fast" (GPT-4) request credits for your Cursor account directly from your terminal.
Features
- 🚀 Auto-Detection: Automatically detects your Cursor installation - no configuration needed!
- 📊 Usage Statistics: Shows your up-to-the-minute Fast (GPT-4) request usage with percentages.
- 🔐 Secure Authentication: Automatically extracts authentication tokens from Cursor's local database.
- 🌍 Cross-Platform: Works seamlessly on Windows, macOS, and Linux.
- 🎨 Clean Output: Color-coded, emoji-enhanced display for a pleasant user experience.
- ⚡ Fast & Reliable: Direct API integration with proper session token handling.
- 🛠️ Zero Configuration: Works out-of-the-box with standard Cursor installations.
Installation
You can install the tool directly from PyPI.
Prerequisites:
- Python 3.13+
piporuvfor installation.
# Using uv (recommended)
uv pip install cursor-credits
# Or using pip
pip install cursor-credits
Quick Start
Simply install and run - no configuration needed!
# Install
uv pip install cursor-credits
# Run
cursor-credits
Usage
Basic Usage
cursor-credits
Options
cursor-credits --help # Show help
cursor-credits --version # Show version
cursor-credits -v # Verbose output with debug info
Example Output
Normal output:
👤 User ID: user_01JYA111KEE9Q4PE54ZA6LR4SG
⭐ Fast: 46/500 (9.2%)
📝 Slow: Not available
With verbose flag:
cursor-credits -v
DEBUG: Found Cursor data at standard location
DEBUG: Token found in SQLite database
DEBUG: Created session token for user ID: user_01JYA111KEE9Q4PE54ZA6LR4SG
DEBUG: Successfully retrieved usage information
👤 User ID: user_01JYA111KEE9Q4PE54ZA6LR4SG
⭐ Fast: 46/500 (9.2%)
📝 Slow: Not available
Error cases:
❌ Error: Could not find Cursor authentication token.
Please make sure:
1. Cursor is installed and you're logged in
2. Cursor application has been opened at least once
Requirements
- Python 3.13+
- Cursor AI editor installed and configured
- Internet connection for API requests
Project Structure
src/cursor_credits/
├── __init__.py # Package initialization and version info
├── api.py # Handles communication with the Cursor API
├── auth.py # Manages token extraction from storage
├── cli.py # Command-line interface entry point
├── display.py # User-facing output formatting
├── main.py # Core application logic
└── paths.py # Cross-platform path discovery
tests/
├── __init__.py # Test package initialization
└── test_main.py # Main functionality tests
How It Works
The tool works by:
- Auto-Detection: Automatically detects your Cursor installation location based on your operating system
- Token Extraction: Extracts JWT authentication tokens from Cursor's SQLite database (
state.vscdb) - Token Processing: Converts JWT tokens into proper session tokens for API authentication
- API Requests: Makes authenticated requests to Cursor's usage API to fetch current usage statistics
- Display: Shows your Fast (GPT-4) request usage with clean, color-coded output
The tool only reads data and never modifies any files or account settings.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
- Clone the repository
- Install dependencies:
uv pip install -e .[dev] - Run tests:
uv run pytest - Run linting:
uv run ruff check
Changelog
See CHANGELOG.md for a detailed history of changes.
Disclaimer
This is an unofficial, third-party tool and is not affiliated with, endorsed, or supported by Cursor. It is intended for personal use only. The tool only reads local data and makes read-only requests to public APIs; it does not modify any of your files or account data. Use at your own risk.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cursor_credits-0.2.0.tar.gz.
File metadata
- Download URL: cursor_credits-0.2.0.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f27da60be23dd1818fddf31cf772989d39da72634c02520f2ab11b7b350dce74
|
|
| MD5 |
1b2f7e050c8a91df7ec238e0a74f1619
|
|
| BLAKE2b-256 |
4113ae557d5e2d792e83045b9475cbbf82a413a98800202129115fb082590dc1
|
File details
Details for the file cursor_credits-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cursor_credits-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddc9b7e8db60d22502c2c026649a0ead3d09b943e19d45512a116dde71053fc3
|
|
| MD5 |
df33f4e510c95d262775dc222f81489c
|
|
| BLAKE2b-256 |
9c60f8b9c0ee09bacd5ecfc1227eaec8d136a5003c472f545f48ad85018d02b7
|