slkiser/opencode-quota

OpenCode quota & tokens usage with zero context window pollution. Supports OpenCode Go, Cursor, GitHub Copilot, OpenAl, Kimi Code, Alibaba Coding Plan, Chutes Al, Google Antigravity, Z.ai Coding Plan and more.

OpenCode Quota – Quick Overview

What it is – A plugin for the OpenCode AI‑coding assistant that shows you how much of each model provider’s quota you’ve used, how much is left, and the cost of the tokens you’ve spent. It works inside the OpenCode UI (sidebar, toast, status line) and from the terminal via npx commands.

Why it matters – When you work with many LLM providers (OpenAI, Anthropic, Google, Chinese services, etc.) it’s easy to lose track of daily or monthly limits and unexpected charges. OpenCode Quota gathers usage data from each provider’s API (or local estimates) and presents it in a clear, real‑time view, letting you avoid hitting limits and plan your token budget.

Key features

  • In‑app UI: sidebar panel, popup toast, and status‑line display inside OpenCode.
  • CLI: npx @slkiser/opencode-quota show works even when OpenCode is closed.
  • Slash commands in OpenCode chat (/quota, /tokens_today, /tokens_between …).
  • Support for many providers – pre‑configured US and Chinese services, plus custom providers you can add.
  • Automatic retry after a quota reset (configurable).
  • Export & integration – JSON reports, metrics, and external‑integration hooks.
  • Configurable appearance – style, reset‑estimate, inline vs popup TUI.

How to get started

# Install and initialise the plugin (requires OpenCode 2.0.16+ and Node 22+)
npx @slkiser/opencode-quota init

Restart OpenCode, then type /quota to see your current usage. You can also run npx @slkiser/opencode-quota@latest show from any terminal.

Supported providers – The plugin automatically pulls quota data for a long list of services (OpenAI, Anthropic Claude, Google AGY, Cursor, GitHub Copilot, Ollama Cloud, etc.) and distinguishes personal vs business plans. For providers that need extra steps (e.g., Anthropic Claude, Cursor, Gemini CLI) the README links to setup guides.

Updating – Run the provided update command; it never touches your secret keys.

Who it’s for – Anyone using OpenCode who wants transparent token‑usage tracking across multiple LLM providers, from hobbyists to teams managing enterprise quotas.


Fields

  • Name: OpenCode Quota
  • Category: OpenCode plugin / token‑usage dashboard
  • Primary language: TypeScript/JavaScript (distributed via npm)
  • License: MIT
  • Installation: npx @slkiser/opencode-quota init
  • Key commands: /quota, /tokens_today, npx … show, npx … provider add
  • Documentation: README sections and linked docs in the repo.

Related

  • Project
  • Project
  • Project
  • Project
  • Project