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

codex-equilibrium

v1.0.0

Published

Lightweight Hono-based Node.js service that balances multiple ChatGPT Codex OAuth accounts, persists tokens locally, and proxies /v1/* with SSE streaming.

Downloads

18

Readme

Codex Equilibrium

A lightweight Node.js service built with Hono for balancing multiple OpenAI Codex (ChatGPT) OAuth accounts. It implements the OAuth flow locally (including the callback), persists tokens to disk, and proxies /v1/* to the ChatGPT Codex backend with stream support.

Features

  • Local OAuth with PKCE, fixed redirect http://localhost:1455/auth/callback.
  • Persistent storage in auths/ (JSON file + sticky index).
  • Sticky account usage: keep using the same account until it fails. On 429 or other errors, retry once, then try a token refresh; if still failing, disable that account for 3 hours and move to the next by add order.
  • Simple web UI to start OAuth login and view accounts.
  • /v1/* proxy to https://chatgpt.com/backend-api/codex/* with SSE stream support.

Run

cd codex-equilibrium
npm install
npm run build
npm start

Open http://localhost:1456/ and click “Add OpenAI Account” to complete OAuth (or use the CLI login below). Tokens are saved to auths/codex_tokens.json.

CLI Login (headless server support)

You can add an account from a machine with a browser and import it into a remote server:

# On your laptop (with a browser):
npm run login -- --server http://<server-host>:1456

# After publishing, you can also use:
npx codex-equilibrium login --server http://<server-host>:1456

The CLI opens an OAuth URL and listens on http://localhost:1455/auth/callback locally to receive the code, then exchanges tokens and sends them to the server (POST /accounts/import). Ensure port 1455 is free on the client machine during login.

Using with Codex CLI

The following keys must appear at the very top of your ~/.codex/config.toml:

model_provider = "codex_equilibrium"
model = "gpt-5"
model_reasoning_effort = "high"

Point your Codex client to the /v1 proxy, for example:

# ~/.codex/config.toml
[model_providers.codex_equilibrium]
name = "codex_equilibrium"
base_url = "http://127.0.0.1:1456/v1"
wire_api = "responses"

Authentication is handled by this service via OAuth; an OPENAI_API_KEY is not required.

Management API

  • GET /accounts — list accounts: id, email, account_id, masked token, expire
  • DELETE /accounts/:id — remove an account
  • POST /accounts/:id/refresh — force refresh a token