This project helps you check your JetBrains AI Assistant quota usage information. It provides both manual methods and scripts to easily view your current quota status.
This project is for educational and informational purposes only.
- This tool is not officially affiliated with or endorsed by JetBrains.
- Users must comply with JetBrains' terms of service and usage policies when using this tool.
- Do not use this project for any commercial purposes or in ways that violate applicable laws or regulations.
- The authors are not responsible for any misuse of this tool or any consequences resulting from its use.
- Use this project at your own risk. The authors make no warranties about the accuracy or reliability of the information provided.
- This tool is designed to help users understand their quota usage, not to circumvent any limitations or restrictions.
This project now includes a command-line version of the JetBrains AI Assistant Quota Analyzer. This tool provides an easy way to analyze your quota usage, track historical data, and filter records by path.
- Auto-find quota files across your system
- Analyze quota information from XML files
- Track historical usage in a SQLite database
- Filter history by file path
- Interactive mode with a user-friendly menu
- Command-line arguments for batch operations
- Standalone executable for easy deployment
- Download the latest release from the Releases page
- Extract the archive
- Run the executable directly - no installation required!
- Clone this repository
- Install the required dependencies (Python 3.6+ required)
- Run the script using Python
JetBrainsAIQuotaAnalyzer_CLI.exe -A --all # Auto-find and analyze all quota files
JetBrainsAIQuotaAnalyzer_CLI.exe -i # Run in interactive mode
JetBrainsAIQuotaAnalyzer_CLI.exe --help # Show help information./JetBrainsAIQuotaAnalyzer_CLI -A --all # Auto-find and analyze all quota files
./JetBrainsAIQuotaAnalyzer_CLI -i # Run in interactive mode
./JetBrainsAIQuotaAnalyzer_CLI --help # Show help informationOn macOS, you can also double-click the .app bundle to run the application.
python JetBrainsAIQuotaAnalyzer_CLI.py -ipython JetBrainsAIQuotaAnalyzer_CLI.py -A --allpython JetBrainsAIQuotaAnalyzer_CLI.py -a /path/to/AIAssistantQuotaManager2.xmlpython JetBrainsAIQuotaAnalyzer_CLI.py -H -l 20 # Show last 20 recordspython JetBrainsAIQuotaAnalyzer_CLI.py -f /path/to/AIAssistantQuotaManager2.xml -l 5 # Show last 5 records for specific fileIf you want to build the executable yourself:
- Install PyInstaller:
pip install pyinstaller - Run the build script:
# On macOS/Linux chmod +x build_executable.sh ./build_executable.sh # On Windows build_executable.bat
- The executable will be created in the
distdirectory
%APPDATA%\JetBrains\<IDE>\options\AIAssistantQuotaManager2.xml
~/Library/Application Support/JetBrains/<IDE>/options/AIAssistantQuotaManager2.xml
~/.config/JetBrains/<IDE>/options/AIAssistantQuotaManager2.xml
Where <IDE> can be:
- PyCharm2024.1
- IntelliJIdea2024.1
- WebStorm2024.1
- CLion2024.1
- Etc.
The tool will display information about your JetBrains AI Assistant quota, including:
- Type: The type of quota (usually "Available")
- Current Value: Your current quota amount
- Maximum Value: The maximum quota amount
- Usage Percentage: How much of your quota you've used
- Valid Until: The expiration date of your quota
- Refill Information: Details about when and how your quota will be refilled
You can directly check your AI Assistant quota usage by examining the AIAssistantQuotaManager2.xml file.
- Windows:
%APPDATA%\JetBrains\<IDE>\options\AIAssistantQuotaManager2.xml - macOS:
~/Library/Application Support/JetBrains/<IDE>/options/AIAssistantQuotaManager2.xml - Linux:
~/.config/JetBrains/<IDE>/options/AIAssistantQuotaManager2.xml
Where <IDE> is your specific JetBrains IDE (e.g., IntelliJ IDEA 2025.1, WebStorm 2025.1, etc.)
You can override the locations by creating .check_quota_cached_quota_file_path and .check_quota_logs_cached_log_path with the full paths to the related files.
You can also check the quota refresh logs in the IDE log file by searching for the keyword "QuotaManager2".
- Windows:
%APPDATA%\JetBrains\<IDE>\system\log\idea.log - macOS:
~/Library/Logs/JetBrains/<IDE>/idea.log - Linux:
~/.cache/JetBrains/<IDE>/log/idea.log
This project provides scripts to help you check your quota information for both Unix/Linux/macOS (bash) and Windows (cmd):
On MacOS and Linux the paths are stored in .check_quota_cached_quota_file_path and .check_quota_logs_cached_log_path after the first time use.
./scripts/check_quota.sh <IDE_BASE_PATH>scripts\check_quota.cmd <IDE_BASE_PATH>Example:
./scripts/check_quota.sh /path/to/your/JetBrains/IDENote: Please provide the base path to your JetBrains IDE installation. For example, if your quota file is at /path/to/IDE/config/options/AIAssistantQuotaManager2.xml, then provide /path/to/IDE as the argument.
./scripts/check_quota_logs.sh [-n 200] <IDE_BASE_PATH>-n flag is optional and overrides the default 200 limit.
scripts\check_quota_logs.cmd <IDE_BASE_PATH>Example:
./scripts/check_quota_logs.sh /path/to/your/JetBrains/IDENote: The scripts expect the following structure:
- Quota file at:
<IDE_BASE_PATH>/config/options/AIAssistantQuotaManager2.xml - Log file at:
<IDE_BASE_PATH>/system/log/idea.log
When you run the quota check script, you'll see output similar to this:
Analyzing AI Assistant quota usage from: /path/to/JetBrains/IDE/config/options/AIAssistantQuotaManager2.xml
------------------------------------------------------
Current Quota Status:
---------------------
Quota Status: Available
Current Usage: 1000000.0000 tokens
Maximum Quota: 2000000 tokens
Valid Until: 2026-06-01T00:00:00Z
Percentage Used: 50.00%
Next Quota Refill:
-----------------
Refill Type: Known
Next Refill Date: 2025-06-01T00:00:00.000Z
Refill Amount: 2000000 tokens
Refill Duration: PT720H
------------------------------------------------------
Note: This information is based on the local cache and may not reflect real-time usage.
The quota information includes:
- Quota Status: Current status of your quota (Available, Exhausted, etc.)
- Current Usage: Your current usage quota in tokens
- Maximum Quota: Your maximum quota limit in tokens
- Valid Until: The expiration date of your current quota
- Percentage Used: How much of your quota has been used
- Next Refill Date: When your quota will be refreshed
- Refill Amount: How many tokens will be added on refresh
- Refill Duration: How long the refreshed quota will last
The log information shows:
- When quota updates were requested
- New quota states
- Refresh schedules
- Bash shell (for Unix/Linux/macOS) or Command Prompt (for Windows)
- xmllint (for XML parsing in bash script)
- grep (for log searching in bash script)
- PowerShell (for Windows scripts, used for HTML entity decoding)
- Windows Scripts: The Windows command scripts (.cmd) have not been extensively tested. Please report any issues you encounter when using them.
This project was developed with assistance from Windsurf.