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

opencode-codex-status

v0.1.2

Published

OpenCode TUI plugin that shows Codex quota in the sidebar.

Downloads

58

Readme

opencode-codex-status

An OpenCode TUI plugin that shows your ChatGPT Codex quota in the session sidebar.

It reads your usage from the Codex CLI's own endpoint using credentials that opencode already stores. Checking quota does not consume any of your quota.

Installation

Install the plugin into your global OpenCode TUI config:

npx opencode-codex-status install

For project-local testing, install it into ./.opencode/tui.json instead:

npx opencode-codex-status install --project

Restart OpenCode after installing.

Usage

It reads the OpenAI auth token from opencode's default auth file (~/.local/share/opencode/auth.json on Linux/macOS, %APPDATA%/opencode/auth.json on Windows). No extra auth setup is needed.

Once loaded, the quota display appears in the TUI sidebar. Run /codex-status to force a refresh, or /codex-status-toggle to show/hide the display on the fly.

Configuration

The installer writes a plugin entry in tui.json. To change options, edit that entry:

{
  "plugin": [["opencode-codex-status", { "pollMs": 60000 }]]
}

| Option | Default | Description | | ------------ | -------- | ------------------------------------------------------------------------------------------------ | | pollMs | 300000 | Polling interval in milliseconds | | retryCount | 1 | Retries on transient failure | | authPath | (auto) | Path to the auth JSON file | | enabled | true | Start with the sidebar display hidden when false; toggle at runtime via /codex-status-toggle |

How it works

The plugin fetches your Codex usage data on startup and periodically every 5 minutes (configurable). It also refreshes after each step completes.

Each quota window shows a label, a progress bar, remaining percent, and estimated time until reset. Error states and stale data are displayed inline.

Project structure

src/
  tui.tsx      – TUI plugin entrypoint and View component
  client.ts    – Auth reading and API fetch
  config.ts    – Plugin option parsing
  format.ts    – Text formatting for bars, times, labels
  manual.ts    – /codex-status command handler
  quota.ts     – Type definitions
  refresh.ts   – Polling and activity-triggered refresh loop
  store.ts     – Solid signal store for quota state
test/
  ...          – Vitest tests covering all modules