Skip to content

fm1randa/oc-plugin-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oc-plugin-usage

oc-plugin-usage

Provider quota usage in the OpenCode sidebar.

Install

Add to your opencode.json:

{
  "plugin": ["oc-plugin-usage"]
}

Providers

  • Codex — rolling windows (5H, 7D)
  • GitHub Copilot — monthly quota
  • z.ai — token and MCP quota

Environment Variables

Credentials are resolved from OpenCode's auth store first, falling back to:

Variable Provider Required
OPENBAR_CODEX_ACCESS_TOKEN Codex yes*
OPENBAR_CODEX_ACCOUNT_ID Codex no
OPENBAR_COPILOT_TOKEN Copilot yes*
OPENBAR_ZAI_API_KEY z.ai yes*

* Only if OpenCode doesn't already hold credentials for that provider.

Optional endpoint overrides: OPENBAR_CODEX_USAGE_URL, OPENBAR_COPILOT_USAGE_URL, OPENBAR_ZAI_API_HOST, OPENBAR_ZAI_QUOTA_URL.

License

MIT

About

CodexBar within opencode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors