npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arandevcode/opencode-quota-extended

v0.1.1

Published

OpenCode plugin: quota usage cards with progress bars (5h / weekly / monthly) for OpenAI, GitHub Copilot and OpenCode Go in the TUI sidebar.

Readme

@arandevcode/opencode-quota-extended

🇪🇸 Also available in Spanish

Quota usage cards for the TUI sidebar — per-window progress bars with traffic-light colors for OpenAI, GitHub Copilot, and OpenCode Go.

  • Progress bar for each quota window (5h rolling, weekly, monthly, code review...)
  • Shows when it resets — time remaining and exact date
  • Color-coded health indication (green = ok, orange = warning, red = critical)
  • OpenCode Go capable!

Heavily inspired by @slkiser/opencode-quota. Both coexist without conflict.

Install

opencode plugin @arandevcode/opencode-quota-extended

Or install from GitHub source to follow latest development:

// ~/.config/opencode/opencode.json
{
  "plugin": [
    "https://github.com/arandevcode/opencode-plugins/tree/main/opencode-quota-extended"
  ]
}

CLI

View quota from the terminal without opening the TUI:

npx opencode-quota            # run via npm (no install)
opencode-quota                # if installed globally
node bin/quota.mjs            # from the repo directory (no build needed)
npm run quota                 # from the repo directory

Traffic-light colors: green (ok), orange (warning), red (error).

Configuration

Optional sidecar at ~/.config/opencode/opencode-quota-extended.json:

| Field | Type | Default | Description | |---|---|---|---| | enabledProviders | string[] | ["openai","github-copilot","opencode-go"] | Providers to fetch | | refreshIntervalMs | int | 60000 | Polling interval | | cardsSidebar.order | int | 145 | Sidebar position (lower = higher) |

More Information

How it works

Registers a TUI plugin that renders a sidebar_content panel at order 145, showing quota cards for every enabled provider. Each provider fetches quota data independently from its own API.

| Provider | Windows | Auth source | |---|---|---| | OpenAI | 5h rolling, Weekly, Code Review | auth.jsonopenai / chatgpt entry | | GitHub Copilot | Premium requests (single window) | auth.jsongithub-copilot entry | | OpenCode Go | 5h, Weekly, Monthly | Config file or env vars |

Traffic-light colors: ≥50% green (accent), 25-49% yellow (warning), <25% red (error).

Authentication

Reads credentials from OpenCode's runtime auth file (~/.local/share/opencode/auth.json). Does not store, prompt for, or distribute secrets.

OpenCode Go requires additional setup — it's a bit tricky because there's no official API yet.

Create ~/.config/opencode/opencode-quota/opencode-go.json:

{
  "workspaceId": "wrk_abc123...",
  "authCookie": "Fe26.2..."
}

| Field | Description | How to get it | |---|---|---| | workspaceId | Your OpenCode workspace ID | Log in at opencode.ai/go. The URL is https://opencode.ai/workspace/wrk_XXX/go — copy the wrk_XXX part. | | authCookie | Session cookie for auth | Open DevTools (F12) → Application → Cookies → opencode.ai → find the auth cookie (starts with Fe26.2...). Or run this in the console: document.cookie.match(/(?:^\|;\s*)auth=([^;]+)/)?.[1] |

Automated setup (recommended):

npm run setup

This prompts for both values and creates the file for you. It also prints a bookmarklet you can drag to your bookmarks bar and click while on opencode.ai to extract the auth cookie with one click.

Tip: keep a browser tab logged into opencode.ai while using this plugin — the auth cookie may expire.

Relationship with @slkiser/opencode-quota

No dependency. Both plugins fetch quota independently and render their own sidebar panels. You can have one, both, or none — they do not interfere.

Troubleshooting

  • Panel doesn't appear: grep '@arandevcode/opencode-quota-extended' ~/.local/share/opencode/log/*.log
  • OpenCode Go shows "skipped": confirm sidecar file or env vars are set
  • Old @opentui/solid pinning bug: update to ^0.4.1 and clean-install (rm -rf node_modules && npm ci)

Development

npm run build        # compile TS + copy TUI assets
npm run build:watch  # watch mode
npm test             # vitest
npm run typecheck    # type-check without emitting

Project structure

src/
  index.ts            # Plugin module (server entry)
  server.ts           # Server plugin (minimal, no tools)
  tui.tsx             # TUI plugin: sidebar_content slot
  config/             # defaults, schema, loader
  lib/                # types, auth, http, formatting, credential resolver
  providers/          # openai.ts, copilot.ts, opencode-go.ts, registry.ts
  ui/                 # SidebarPanel, cards, progress-bar
tests/                # vitest unit tests

License

MIT