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

@christiandoxa/prodex

v0.104.0

Published

Safe multi-account auto-rotate for Codex CLI with isolated CODEX_HOME profiles

Readme

prodex

prodex is a multi-account Codex wrapper with auto-rotation.

Use multiple Codex accounts from one command line. When the active account runs out of quota, prodex can route the next work to another available account.

Contents

Why prodex

Use prodex if you want to:

  • use multiple Codex accounts from one CLI
  • rotate to another account when quota runs out
  • keep profile credentials separated
  • keep sessions attached to the profile that created them
  • run Codex, Caveman mode, Super mode, and Claude Code through the same wrapper

If you only use one Codex account and do not need quota rotation, you probably do not need prodex.

Requirements

You need at least one logged-in Prodex profile.

| Tool | Used by | |---|---| | Codex CLI | prodex, prodex run, prodex caveman, prodex super | | Claude Code | prodex claude | | Claude-Mem | mem variants | | RTK | rtk variants and prodex s / prodex super |

Installation

npm

npm install -g @christiandoxa/prodex

Source checkout

cargo install --path .

If you install from source, make sure the codex binary in your PATH is already installed and up to date.

Optional tools

prodex can run without Claude-Mem, RTK, SQZ, token-savior, claw-compactor, or llm-min docs.

Install them only if you want to use commands such as:

prodex caveman mem
prodex caveman mem rtk
prodex rtk
prodex sqz
prodex tokensavior
prodex clawcompactor
prodex llmmin
prodex s
prodex super
prodex claude mem
prodex claude caveman mem

Claude-Mem is used by the mem variants.

Recommended install:

npx claude-mem install

Then follow the interactive prompts.

You can also install it from inside Claude Code:

/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem

After installation, restart Claude Code or your coding CLI.

Do not use npm install -g claude-mem as the main install method. That installs the SDK/library only; it does not register the plugin hooks or start the worker service.

RTK is used by the rtk variants and by my daily prodex s / prodex super workflow.

Homebrew

brew install rtk

Linux/macOS quick install

curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh

If it installs to ~/.local/bin, make sure that directory is in your PATH:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

For Zsh:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc

Cargo

cargo install --git https://github.com/rtk-ai/rtk

Verify RTK

rtk --version
rtk gain

If rtk --version works but rtk gain fails, you may have installed a different package named rtk.

Remove it and reinstall from the Git URL:

cargo uninstall rtk
cargo install --git https://github.com/rtk-ai/rtk

Initialize RTK

For Codex:

rtk init -g --codex

For Claude Code:

rtk init -g

Then restart your coding tool.

Quick start

Import your current Codex login

If your current Codex home is already logged in:

prodex profile import-current main

Or create profiles from scratch

prodex login
prodex profile add second
prodex login --profile second

Check profiles and quota

prodex profile list
prodex quota --all
prodex session list

Start Codex through Prodex

prodex

Or run a one-off prompt:

prodex exec "review this repo"
prodex profile import copilot
prodex profile import copilot --name copilot-main --activate

When you import a Copilot profile, Prodex does not move the Copilot token into Prodex-managed storage. It only records the provider identity and API endpoint in its own metadata.

Daily command: prodex s

For daily work, I use:

prodex s

prodex s is an alias for:

prodex super

This is the mode I tune and use myself every day.

It combines:

  • Caveman mode
  • Claude-Mem transcript watching
  • RTK shell-command guidance
  • full-access launch mode
  • Smart Context Autopilot in the runtime proxy
  • deterministic/local accommodation for sqz, token-savior, claw-compactor, and llm-min.txt-style low-token workflows
prodex s
prodex s exec "review this repo"

prodex super expands to:

prodex caveman mem rtk sqz tokensavior clawcompactor llmmin --full-access

Full access maps to Codex's sandbox-bypass launch flag. Use it only when you intentionally want Codex to run without the normal approval and sandbox protections.

Super's built-in optimization stack is deliberately local and deterministic. It preloads the existing Caveman, Claude-Mem, and RTK pieces, auto-registers sqz-mcp and token-savior MCP servers when those binaries are already on PATH or in a managed prodex-optimizers checkout, then uses Smart Context Autopilot plus low-token workflow accommodations for targets such as claw-compactor and llm-min.txt.

RTK and SQZ split the token work across different sides of the flow:

  • RTK works upstream/input-side. Use rtk <cmd> for noisy terminal commands before their output enters the model context, such as git diff, cargo test, npm test, build logs, and package-manager output.
  • SQZ works downstream/context-side through the auto-registered prodex-sqz MCP server. Use it for repeated workspace reads, large text blobs, and long-session context reuse instead of emitting the same full content again.

Managed optimizer checkouts are discovered from PRODEX_OPTIMIZERS_HOME, $XDG_DATA_HOME/prodex-optimizers, then ~/.local/share/prodex-optimizers.

Commands

prodex
prodex s
prodex exec "review this repo"
prodex quota --all
prodex profile list
prodex session list
prodex
prodex run
prodex run --profile main
prodex run --dry-run
prodex exec "review this repo"
prodex s
prodex s exec "review this repo"
prodex super
prodex super --profile main
prodex super --dry-run
prodex quota --all
prodex quota --all --once
prodex quota --all --auth no-auth --once
prodex session list
prodex session current
prodex session current --include-subagents
prodex update --help

prodex update passes through to codex update directly. It does not use Prodex profile selection, quota preflight, or the local runtime proxy.

prodex run 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
printf 'context from stdin' | prodex run exec "summarize this"

Unknown top-level Codex subcommands remain managed Codex launches.

For example:

prodex remote-control

is equivalent to:

prodex run remote-control

unless Prodex explicitly owns that command.

Modes

| Mode | Command | Description | |---|---|---| | Normal Codex | prodex or prodex run | Managed Codex launch with profile selection and quota routing. | | Caveman | prodex caveman | Runs Codex with a temporary overlay CODEX_HOME. | | Super | prodex s or prodex super | Daily mode with Caveman, Claude-Mem, RTK guidance, full access, and deterministic/local token optimizations. | | Claude Code | prodex claude | Runs Claude Code through Prodex-managed state. |

prodex
prodex run
prodex run --profile main
prodex exec "review this repo"
prodex caveman
prodex caveman mem
prodex caveman mem rtk
prodex rtk
prodex sqz
prodex tokensavior
prodex clawcompactor
prodex llmmin
prodex caveman --dry-run
prodex caveman --profile main
prodex caveman exec "review this repo in caveman mode"
prodex caveman 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9

prodex caveman runs Codex with a temporary overlay CODEX_HOME, so the base profile home stays unchanged after the session ends.

If you use the mem variant, Prodex points an existing Claude-Mem Codex setup to the active Prodex session path instead of the default ~/.codex/sessions.

Add optimizer prefixes before Codex args when you want Prodex to inject a specific launch overlay for that session: mem, rtk, sqz, tokensavior, clawcompactor, or llmmin. Top-level shortcuts such as prodex rtk and prodex sqz map to prodex caveman <prefix>.

RTK is still an external binary. Install it separately if rtk gain is unavailable.

prodex s
prodex s exec "review this repo"
prodex super
prodex super --profile main
prodex super --dry-run
prodex super 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9

prodex s is the short alias for prodex super.

This is my daily mode. It is the path I keep tuning for normal work: Caveman enabled, Claude-Mem transcript watching enabled, RTK guidance enabled, full access available, and context handling handled by the runtime proxy.

Super mode uses Prodex's slim Claude-Mem Codex schema by default to avoid storing full assistant/tool output in recall context.

Use --mem-super-slim to store prompt summaries/references instead of full prompt bodies:

prodex super --mem-super-slim

Use --mem-full when you need the full transcript schema:

prodex super --mem-full

Super also enables Smart Context Autopilot in the runtime proxy.

It keeps exact pass-through for continuation-sensitive requests. When safe, it uses adaptive token budgeting, artifact-backed large tool outputs, duplicate suppression, blob/noise detection, stable cache-friendly context framing, and critical-signal self-checks to reduce token load without dropping failure details.

The Super optimization stack is meant to stay deterministic and local by default. It auto-registers sqz-mcp and token-savior MCP servers when those binaries are already on PATH or in a managed prodex-optimizers checkout, and accommodates claw-compactor and llm-min.txt-style workflows with local compaction, stable references, and lower-token context shaping rather than hidden remote summarization.

RTK handles upstream/input command output before it enters the context window. SQZ handles downstream/context reuse after content is already in the session, using prodex-sqz when the MCP server is available.

Managed optimizer checkouts are discovered from PRODEX_OPTIMIZERS_HOME, $XDG_DATA_HOME/prodex-optimizers, then ~/.local/share/prodex-optimizers.

prodex claude -- -p "summarize this repo"
prodex claude mem -- -p "recall past work on this repo"
prodex claude caveman
prodex claude caveman mem
prodex claude caveman -- -p "summarize this repo briefly"
prodex claude caveman mem -- -p "summarize this repo briefly"
prodex claude --profile second caveman -- -p "review the latest diff briefly"
prodex claude --profile second -- -p --output-format json "show the latest diff"

prodex claude uses the normal Claude Code flow while keeping state under Prodex-managed configuration.

prodex claude caveman enables Caveman for that session while keeping state under the Prodex-managed CLAUDE_CONFIG_DIR, not the global ~/.claude.

prodex claude caveman mem combines Caveman and Claude-Mem.

prodex claude is only supported with the default OpenAI/Codex provider.

Profiles

prodex profile list
prodex profile add second
prodex profile import-current main
prodex login --profile second
prodex use --profile main
prodex logout --profile main
prodex profile import copilot
prodex profile export
prodex profile remove second
prodex profile remove --all

Local model support

Prodex can launch Super mode against a local OpenAI-compatible server:

prodex super --url http://127.0.0.1:8131

You can use this with a local server such as llama-server.

By default, Prodex:

  • injects a temporary prodex-local Codex provider
  • appends /v1 when the URL has no path
  • disables non-function native tools that local servers commonly reject
  • advertises a conservative 16k local context window
  • skips quota/proxy routing for that launch

The default local model id is:

unsloth/qwen3.5-35b-a3b

Override it with --model:

prodex super --url http://127.0.0.1:8131 --model local/qwen

Use --context-window and --auto-compact-token-limit if your local server is configured with a larger context window.

See LOCAL.md for self-hosted model setup and testing.

Utilities and diagnostics

prodex info
prodex doctor --runtime
prodex doctor --bundle ./prodex-doctor.json --redacted
prodex context audit
prodex context compress ~/.codex/AGENTS.md --dry-run
git diff | prodex context compact-output --kind git-diff

| Command | Description | |---|---| | prodex info | Shows effective runtime tuning values after environment, policy, and default resolution. | | prodex doctor --runtime | Runs runtime diagnostics. | | prodex doctor --bundle PATH --redacted | Writes a shareable JSON diagnostic bundle without stored auth tokens or headers. | | prodex context audit | Reports approximate token weight for shared instruction and memory files. | | prodex context compress | Compresses Markdown/text context files and writes an .original.md backup. | | prodex context compact-output | Compacts copied command output such as git status, git diff, rg, grep, find, tree, or long logs. |

For full policy keys, environment overrides, and runtime log path resolution, see docs/runtime-policy.md.

Advanced behavior

Managed Prodex profiles keep account credentials isolated per profile, but Codex-owned shared state uses the native Codex home by default.

On Unix-like systems, this is usually:

~/.codex

In practice, profile history.jsonl, sessions, config.toml, environments.toml, plugins, skills, and related shared files link to the same Codex home that direct Codex uses.

This matches direct Codex behavior: logging out or switching accounts does not hide chat history.

Older Prodex state from $PRODEX_HOME/.codex is merged into the native Codex home on the next managed-profile launch.

Set PRODEX_SHARED_CODEX_HOME only when you intentionally want a different shared Codex root.

Auto-rotate and quota checks apply to supported OpenAI/Codex profiles.

If a profile's config.toml sets model_provider to a non-OpenAI backend such as amazon-bedrock, prodex run and prodex caveman launch Codex directly without quota preflight or the local auto-rotate proxy.

Bedrock quota, credentials, regions, and provider errors are handled by Codex and the upstream provider, not by Prodex.

prodex quota is not available for those profiles.

Prodex respects system and environment proxy settings for upstream OpenAI quota, auth, and runtime HTTP by default, including:

HTTP_PROXY
HTTPS_PROXY
NO_PROXY

Runtime WebSocket upstream connections also honor HTTPS_PROXY and https_proxy via HTTP CONNECT and respect NO_PROXY and no_proxy.

The local Codex-to-Prodex broker connection always receives NO_PROXY entries for:

127.0.0.1
localhost
::1

This prevents a user proxy from intercepting the local runtime proxy.

Use --no-proxy on prodex run, prodex caveman, prodex super, or prodex claude only when you explicitly want Prodex upstream requests to bypass proxy settings.

This repository is a Cargo workspace.

The binary crate stays at the root, while reusable leaf crates live under crates/ to reduce rebuild scope when those components change.

Contributor testing guidance lives in docs/testing.md, including the fast/serial split and runtime parallel-safety assumptions.

Documentation

Support

If you find prodex useful and want to support its development, you can donate here: