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

codx-hub-cli

v2.0.4

Published

Manage Codex CLI profiles, hooks, sessions, and providers

Readme

codx

A lightweight CLI for managing OpenAI Codex CLI profiles, hooks, sessions, and provider proxies.

codx is shaped like cc-hub but tailored for Codex CLI. Its provider proxy subsystem is inspired by cc-switch and supports multiple concurrent provider proxies — one per profile — so you can run Kimi on one port and Qianwen on another at the same time.

Features

  • Profile management — add, update, list, remove, and switch Codex CLI profiles.
  • Per-profile provider proxy — each profile gets its own port; run multiple proxies simultaneously.
  • Provider adapters — Kimi and Qianwen (DashScope) with OpenAI-compatible request/response transforms.
  • Prompt cache routing — injects prompt_cache_key for the OpenAI Responses API when enabled.
  • Failover and circuit breakers — automatic failover between providers with per-provider circuit breaker protection.
  • Usage logging — request/token logs written to ~/.codex/codx/usage.jsonl.
  • Shell completion — bash/zsh/powershell completions (via Codex CLI style command).

Install

npm install -g codx-cli

Requires Node.js 18+.

Quick start

# Add a profile that routes to Kimi
codx profile add kimi-dev \
  --provider kimi \
  --model kimi-k2 \
  --token $KIMI_API_KEY \
  --proxy-port 15721

# Start its dedicated proxy
codx proxy start kimi-dev

# Launch Codex CLI through the proxy
codx run kimi-dev

Commands

Profiles

codx profile add <name> [options]
codx profile update <name> [options]
codx profile list
codx profile view <name>
codx profile remove <name>
codx profile rename <old> <new>

Common profile options:

  • -p, --provider <kimi|qianwen> — primary provider type
  • -m, --model <model> — model ID (can be used up to 3 times)
  • -t, --token <token> — API key / token
  • -u, --url <url> — base URL override

Providers

codx provider list

Run

# Launch Codex CLI with the default profile
codx run

# Launch with a specific profile
codx run kimi-dev

# Forward extra flags to Codex CLI
codx run kimi-dev -- --approval-mode full-auto

When you run a profile, codx automatically starts its provider proxy and points Codex CLI at OPENAI_BASE_URL=<proxy url>.

Provider configuration

Provider presets are stored in ~/.codex/codx/providers.json. Built-in presets:

  • kimi — https://api.kimi.com/coding (model kimi-k2-5-coding)
  • qianwen — https://dashscope.aliyuncs.com/compatible-mode/v1 (model qwen-max)

You can override base URL and API key per profile.

Prompt caching

For /v1/responses, the proxy injects a stable prompt_cache_key derived from the Codex session ID or from the profile/provider/model tuple. Prompt cache routing is always enabled for Kimi and Qianwen to maximize token savings.

Model picker (/model)

Codex's /model picker renders a bundled OpenAI catalog and never queries custom providers, so codx generates a model catalog for each profile at sync time (~/.codex/codx/catalogs/<profile>.models.json) and points the profile config at it via model_catalog_json. The catalog lists only the models explicitly configured for the profile (first model is the default). It replaces the bundled OpenAI list entirely and is read at Codex startup — codx run always launches a fresh Codex process, so changes apply on the next run.

Development

npm install
npm run dev        # watch build
npm test           # Vitest
npm run build      # tsup
npm run test:build # tests + build

License

MIT