JSPM

opencode-copilot-usage-toast

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q43643F
  • License MIT

OpenCode plugin that displays your GitHub Copilot premium requests quota after each conversation.

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

Copilot Usage Toast

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

  1. Listens for the session.idle event (when a conversation ends)
  2. Checks if the last message came from github-copilot
  3. Reads your auth token from ~/.local/share/opencode/auth.json
  4. Fetches quota from GitHub's internal Copilot API
  5. Displays a toast with usage info

Requirements

  • OpenCode authenticated with GitHub Copilot (run opencode and 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