pi-exa-rotate
Exa API key rotation and usage tracking for Pi coding agent
Package details
Install pi-exa-rotate from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-exa-rotate- Package
pi-exa-rotate- Version
1.0.0- Published
- Jun 9, 2026
- Downloads
- not available
- Author
- themuuln
- License
- MIT
- Types
- extension
- Size
- 13.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-exa-rotate
Exa API key rotation and usage tracking for Pi coding agent.
Automatically rotates between multiple Exa API keys when quotas are exhausted. Tracks usage per key and provides commands to manage keys.
Features
- Automatic rotation — switches keys when one exhausts (1,000/month limit)
- Usage tracking — monitors requests per key, resets monthly
- Status display — shows usage in footer status bar
- Key management — commands to list, add, remove keys
- Fallback support — works alongside Gemini Web fallback
Install
pi install npm:pi-exa-rotate
Setup
1. Create keys file
Create ~/.pi/exa-keys.json:
{
"keys": [
"exa-YOUR_FIRST_KEY",
"exa-YOUR_SECOND_KEY",
"exa-YOUR_THIRD_KEY"
],
"currentIndex": 0
}
2. Get Exa API keys
- Go to exa.ai
- Create account (get $10 free credits + 1,000 requests/month)
- Get API key at exa.ai/settings/api-keys
- Repeat for additional accounts
3. Reload Pi
/reload
Commands
| Command | Description |
|---|---|
/exa-keys list |
List all configured keys |
/exa-keys add <key> |
Add a new key |
/exa-keys remove <index> |
Remove a key by index |
/exa-keys current |
Show active key and usage |
/exa-status |
Show detailed usage status |
How It Works
- Tracks usage in
~/.pi/exa-usage.json - When count reaches 1,000 (monthly limit), rotates to next key
- Resets counter for new key
- Shows status in footer:
Exa: 45/1000 (955 left)
Quota Math
| Accounts | Free Tier | Credits | Total/Month |
|---|---|---|---|
| 1 | 1,000 | $10 (~1,400) | ~2,400 |
| 2 | 2,000 | $20 (~2,800) | ~4,800 |
| 3 | 3,000 | $30 (~4,200) | ~7,200 |
Config
Your ~/.pi/web-search.json should have:
{
"provider": "exa",
"exaApiKey": "exa-CURRENT_KEY"
}
The extension automatically updates exaApiKey when rotating.
License
MIT