Package Exports
- opencode-copilot-usage-toast
- opencode-copilot-usage-toast/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (opencode-copilot-usage-toast) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
opencode-copilot-usage-toast
A plugin for OpenCode that displays your GitHub Copilot premium requests quota after each conversation.
Inspired by sst/opencode#768.
How it looks

Installation
Add to your opencode.json:
{
"plugins": ["opencode-copilot-usage-toast"]
}That's it. The plugin reads your Copilot authentication from OpenCode automatically.
How it works
- Listens for the
session.idleevent (when a conversation ends) - Checks if the last message came from
github-copilot - Reads your auth token from
~/.local/share/opencode/auth.json - Fetches quota from GitHub's internal Copilot API
- Displays a toast with usage info
Requirements
- OpenCode authenticated with GitHub Copilot (run
opencodeand sign in)
Troubleshooting
"Not authenticated with GitHub Copilot"
- Make sure you've signed in to GitHub Copilot in OpenCode
"Failed to fetch quota"
- Your auth token may have expired - re-authenticate in OpenCode
License
MIT