AI Consumption Tracker (aiconsomer)PortuguêsAI Consumption Tracker (aiconsomer) é uma extensão premium para o Visual Studio Code projetada para ajudar desenvolvedores a monitorarem o uso de APIs de IA (OpenAI, Gemini, Claude, Antigravity, Grok) diretamente da barra de status e de um lindo painel lateral. Acompanhe seu consumo em tempo real, veja os custos em dólares (USD) e convertidos para reais (BRL) com cotação atualizada automaticamente. 🚀 Funcionalidades1. 📊 Indicadores de Custo na Barra de StatusMonitore seus gastos de forma discreta no rodapé do VS Code. A extensão exibe indicadores individuais com cores de alerta:
As cores indicam o status do seu orçamento mensal: 🟢 (Seguro), 🟡 (Próximo ao limite), 🔴 (Orçamento estourado). 2. 💎 Painel Lateral Premium (Dashboard)Clique em qualquer item da barra de status para abrir o painel lateral com:
🔌 Integração com CLIs Externas (Servidor de API Local)Para tornar a extensão compatível com qualquer ferramenta de CLI de IA externa (como Cline, Roo Code, Cursor ou seus próprios scripts de terminal), a extensão roda um servidor HTTP local na porta Registrar consumo da CLI no VS Code (POST
|
| Configuração | Tipo | Descrição | Padrão |
|---|---|---|---|
aiConsumptionTracker.openaiApiKey |
string |
Chave de API do OpenAI para buscar dados reais. | "" |
aiConsumptionTracker.geminiApiKey |
string |
Chave de API do Gemini. | "" |
aiConsumptionTracker.claudeApiKey |
string |
Chave de API do Claude. | "" |
aiConsumptionTracker.antigravityApiKey |
string |
Chave de API do Antigravity. | "" |
aiConsumptionTracker.grokApiKey |
string |
Chave de API do Grok. | "" |
aiConsumptionTracker.monthlyBudget |
number |
Limite de orçamento mensal em USD. | 50 |
aiConsumptionTracker.refreshInterval |
number |
Intervalo de atualização em minutos. | 15 |
English
AI Consumption Tracker (aiconsomer) is a premium Visual Studio Code extension designed to help developers monitor their AI API usage (OpenAI, Gemini, Claude, Antigravity, Grok) directly from their status bar and a beautiful sidebar dashboard.
Track your consumption in real-time, see costs in USD and converted to BRL using live exchange rates, and manage your budget.
🚀 Features
1. 📊 Status Bar AI Cost Indicators
Keep a subtle but constant eye on your spending. The extension displays individual, color-coded indicators for each active AI provider right in your VS Code status bar:
- 🤖 OpenAI:
$1.25 - ♊ Gemini:
$0.15 - 🧠 Claude:
$0.40 - 🛸 Antigravity:
$0.05 - 🌌 Grok:
$0.00 - 💵 Total Cost:
R$ 9.60(converted using real-time currency API)
Color codes indicate your budget status: 🟢 (Safe), 🟡 (Approaching budget limit), 🔴 (Limit exceeded).
2. 💎 Premium Sidebar Dashboard
Click any status bar item to open a sleek, glassmorphic sidebar panel containing:
- Real-Time Exchange Rate: Live USD to BRL conversion.
- Interactive Graphs: View your consumption history over 7, 15, or 30 days in a beautiful Canvas line chart.
- Detailed Token Breakdown: Monitor input (context) and output (generated) tokens separately.
- Performance Metrics: View generation speed (tokens per second) and average response latency (ms).
- Budget Progress Bars: Visual representations of how much of your monthly budget limit you have consumed.
🔌 CLI & External Agent Integration (Local API Server)
To make it compatible with external AI CLI tools (like Cline, Roo Code, Cursor, or custom terminal scripts), the extension runs a lightweight local HTTP server at http://localhost:18500.
Log external consumption (POST /log):
curl -X POST http://localhost:18500/log \
-H "Content-Type: application/json" \
-d '{"providerId": "gemini", "tokens": 15000, "cost": 0.03}'
Fetch current stats (GET /status):
curl http://localhost:18500/status
⚙️ Configuration
Open your VS Code Settings (Ctrl+, or Cmd+,) and search for AI Consumption Tracker:
| Setting | Type | Description | Default |
|---|---|---|---|
aiConsumptionTracker.openaiApiKey |
string |
Your OpenAI API key to fetch real usage data. | "" |
aiConsumptionTracker.geminiApiKey |
string |
Your Gemini API key. | "" |
aiConsumptionTracker.claudeApiKey |
string |
Your Claude API key. | "" |
aiConsumptionTracker.antigravityApiKey |
string |
Your Antigravity API key. | "" |
aiConsumptionTracker.grokApiKey |
string |
Your Grok (xAI) API key. | "" |
aiConsumptionTracker.monthlyBudget |
number |
Monthly budget limit in USD to trigger alerts. | 50 |
aiConsumptionTracker.refreshInterval |
number |
Interval in minutes to pull new data. | 15 |