JetBrains Plugin
The ctok JetBrains plugin adds a ctok tool window and two editor actions to any JetBrains IDE: IntelliJ IDEA, Android Studio, WebStorm, PyCharm, GoLand, and Rider.
Install
- Open Settings / Preferences → Plugins → Marketplace
- Search ctok
- Click Install and restart the IDE
Or install from disk: Plugins → ⚙ → Install Plugin from Disk… using the .zip from GitHub Releases.
Requirements
- JetBrains IDE 2024.3+
ctokCLI on PATH (npm i -g ctok)
Actions
Find these under Tools → ctok or via Find Action (Ctrl+Shift+A / Cmd+Shift+A):
| Action | Description |
|---|---|
| Check Token Count | Estimates tokens for the selection (or full file) and shows results in the tool window |
| Refine Prompt | Runs the 7-pass refiner on the selection; updates the tool window and replaces the selection with the refined text |
Tool window
Open via View → Tool Windows → ctok.
The panel shows:
- Token estimate (input range, output range)
- Cost at the recommended model
- Model + effort recommendation
- Reduction suggestions
- Prompt area - edit and re-check inline
Configuration
Set your plan in the ctok tool window settings (⚙ icon), or run:
ctok config set plan max20x