LLM cost optimization plugin for Claude Code - Save up to 90% on AI costs
npm install @plexor-dev/claude-code-pluginLLM cost optimization plugin for Claude Code. Save up to 90% on AI costs through intelligent prompt optimization and multi-provider routing.
``bash`
npm install -g @plexor-dev/claude-code-plugin
This installs slash commands to ~/.claude/commands/.
1. Install the plugin (see above)
2. Open Claude Code and run:
``
/plexor-login
3. Follow the prompts to authenticate via browser
4. Set the gateway URL in your terminal:
`bash`
export ANTHROPIC_BASE_URL="https://api.plexor.dev/v1/gateway/anthropic"
5. Restart Claude Code - all prompts are now optimized!
| Command | Description |
|---------|-------------|
| /plexor-setup | First-time setup wizard |/plexor-login
| | Authenticate with Plexor API key |/plexor-logout
| | Sign out and clear credentials |/plexor-status
| | View usage stats and savings |/plexor-enabled
| | Enable/disable Plexor routing |
Plexor acts as an intelligent gateway between Claude Code and LLM providers:
``
Claude Code → Plexor Gateway → Best Provider (Anthropic/DeepSeek/Mistral/Gemini/OpenAI)
The gateway:
- Optimizes prompts to reduce token usage
- Routes requests to the most cost-effective provider
- Maintains quality based on your selected mode
- Tracks savings so you can see your ROI
| Mode | Savings | Best For |
|------|---------|----------|
| eco | 60-90% | Development, testing, iteration |
| balanced | 40-60% | Most production workloads |
| quality | 20-40% | Critical responses, customer-facing |
| passthrough | 0% | Debugging, comparison |
- Beta: $1/month (unlimited requests)
- Savings typically 10-100x the subscription cost
Settings are stored in ~/.plexor/config.json:
`json`
{
"version": 1,
"auth": {
"api_key": "plx_...",
"email": "user@example.com"
},
"settings": {
"enabled": true,
"mode": "balanced",
"preferred_provider": "auto"
}
}
`bash`
npm uninstall -g @plexor-dev/claude-code-plugin
To fully remove:
`bash``
unset ANTHROPIC_BASE_URL
rm -rf ~/.plexor
- Node.js 16+
- Claude Code CLI
- macOS, Linux, or Windows (WSL)
- Documentation: https://plexor.dev/docs
- Issues: https://github.com/plexor-ai/claude-code-plugin/issues
- Email: hello@plexor.dev
MIT