convez.ai
MCP ServerDevOps & InfraestruturaIntermediário
Golden0Voyager

Kimi Code Usage: Rastreador de Cota de API

Golden0Voyager/kimi-code-usage

Monitore sua cota Kimi com precisão estética via CLI, MCP e VS Code

Ver no GitHub
InicialPluginScore · de 0 a 100

Toolchain completo (CLI, MCP Server e extensão VS Code) para monitorar em tempo real o uso de quota da API de Coding Plan do Kimi (Moonshot AI). Oferece painéis estéticos, integração com agentes MCP e indicadores de consumo na barra de status do VS Code.

Instalação

$npx convez-ai Golden0Voyager/kimi-code-usage

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
15
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 4 semanas
Versão
v0.1.1
Issues abertas
0
Contribuidores
1

Casos de uso

  • Rastrear consumo de cota de API em sessões de codificação
  • Integrar monitoramento de recursos em workflows de IA/agentes MCP
  • Alertas visuais sobre limites de cota semanal e de 5 horas
  • Análise de pacote econômico de Coding Plan vs. pricing padrão

Veredito

Ferramenta especializada e bem-polida para usuários do Kimi Coding Plan. A integração tripla (CLI + MCP + VS Code) oferece flexibilidade genuína, mas a utilidade limita-se ao ecossistema Moonshot AI — apenas relevante se você já usa Kimi.

README

A tradução para o português deste README ainda está na fila.

English · 中文

Kimi Code Usage: The Curated Toolchain

Manifesting your AI quota with aesthetic precision across CLI, MCP, and VS Code.

CLI & MCP (Python) Coverage VS Code Extension Coverage


🌟 Project Vision

In the era of "Vibecoding," transparency of resources is a prerequisite for flow. Kimi Code Usage is a meticulously crafted toolchain — three components, one soul.

Prerequisite: A Kimi Coding Plan API Key, set as KIMI_API_KEY in your environment or .env file.


⚡ CLI Reporter

A Rich-rendered panel in your terminal. Zero noise, pure signal.

Install & Run:

pip install kimi-code-usage
kimi-usage              # Aesthetic Rich panel
kimi-usage --json       # Machine-readable JSON
kimi-usage --plain      # Plain text output

Or run instantly without installing:

uvx kimi-code-usage

🔍 MCP Server

Exposes get_kimi_usage to any MCP-compatible AI Agent.

Compatible with Claude Code, Cursor, Windsurf, Hermes, and any MCP-enabled agent.

Add to your MCP config (e.g., ~/.claude/settings.json):

{
  "mcpServers": {
    "kimi-code-usage": {
      "command": "uvx",
      "args": ["--from", "kimi-code-usage", "kimi-mcp"],
      "env": {
        "KIMI_API_KEY": "YOUR_KEY"
      }
    }
  }
}

Note: The MCP server still needs --from because kimi-mcp is a separate command from the default kimi-code-usage entry point.

Then simply ask your AI: "Check my Kimi quota."


💎 VS Code Extension

A sleek status bar indicator with sensory color alerting.

Install: Search Kimi Code Usage in the VS Code Marketplace, or:

code --install-extension HainingYu.kimi-code-usage

Configure (Settings > Kimi Code Usage):

SettingDescriptionDefault
kimiCodeUsage.apiKeyAPI key (or reads KIMI_CODING_API_KEY/KIMI_API_KEY env)""
kimiCodeUsage.baseUrlAPI Base URL"https://api.kimi.com/coding/v1"
kimiCodeUsage.refreshIntervalMinutesAuto-refresh interval in minutes5
kimiCodeUsage.weeklyLowThresholdPercentWeekly low quota warning threshold (%)30
kimiCodeUsage.fiveHourLowThresholdPercent5-hour low quota warning threshold (%)15
kimiCodeUsage.showPaceIndicatorShow pace indicator (Fast/Normal/Slow)true
kimiCodeUsage.showPaceBarShow pace bar in status bartrue

Usage: Status bar shows 🌕 [===] Wee:96% 5Ho:99%. Hover for details. Cmd+Shift+P → Kimi: Refresh.


📊 Real-World Analysis

How much does a ¥199/mo Coding Plan actually cover? Real data from 5 months of heavy vibe coding, with a cost comparison against standard API pricing.

Full data → docs/kimi-code-usage.md

1. Profile

ItemDetail
PlanTier 3 Allegretto ($31/mo) → ¥199/mo
WorkflowClaude Code + kimi-for-coding, heavy vibe coding
Data Period2026-01 ~ 2026-05 full records (~3,152M tokens)

2. Token Composition

Component5-Month TotalShare
Input (Cache Miss)~154M4.9%
Cache Created~89M2.8%
Output~12M0.4%
Cache Read (Cache Hit)~2,896M91.9%
Total~3,152M100%

A 91.9% cache hit rate is the signature of vibe coding — long sessions where each turn carries full conversation history, and only the latest exchange is fresh.

3. Actual Monthly Burn

Based on continuous weekly sampling (3 days = 30% of weekly quota):

MetricValue
Weekly Burn~320M tokens
Monthly Burn≈ 1.37 ~ 1.5 billion tokens
Plan Cost¥199/mo
Effective Rate≈ ¥0.14 / million tokens

4. Cost Comparison

Priced against Kimi K2.6 standard API rates (input ¥6.50 / cache ¥1.10 / output ¥27.00 per million tokens):

ScenarioCost/MonthMultiple
Kimi Coding Plan (¥199)¥1991×
Pay-as-you-go (K2.6 standard)≈ ¥2,42012.2×
Pay-as-you-go BreakdownVolume/MonthRateCost
Input (Cache Miss)73.5M¥6.50/MTok¥478
Cache Read (Hit)1,378.5M¥1.10/MTok¥1,516
Output5.55M¥27.00/MTok¥150
Cache Created42.5M¥6.50/MTok¥276
Total1.5B¥2,420

5. Bottom Line

The Coding Plan saves heavy users ≈ ¥2,221/month (~92%). Cache reads account for 92% of total tokens; the plan bundles both cache and input into the subscription fee. Under pay-as-you-go, cache alone makes up 63% of the bill.

⚠️ Disclaimer

This analysis reflects one user's actual usage from 2026-01 to 2026-05 via ccusage. Token ratios and cost estimates are for reference only — actual results vary by session pattern, model choice, caching behavior, and API pricing. Rates sourced from platform.kimi.com as of 2026-05-24.


🎨 About the Curator

Crafted with ❤️ by Haining Yu, an Art Curator and Vibecoder. This toolchain is part of a curated collection designed to bridge the gap between aesthetic curation and intuitive, AI-powered coding.


Ver o original no GitHub

Bom para

Relacionados