prodex
Run multiple isolated Codex profiles on the same OpenAI account pool.
prodex is a small CLI for managing multiple Codex profiles without manually switching logins and local state.
It uses a simple model:
- One account = one profile
- Quota is checked before launch
- Fresh work can move to another ready profile
- Existing continuations stay with the profile that already owns them
Why prodex?
If you use multiple accounts, doing everything by hand gets old quickly.
A common case is having 2 or 3 separate $20 accounts instead of paying for a higher-tier plan. That works, but the workflow is annoying. You have to log in and out, switch homes, check quota manually, and remember which session belongs to which account.
prodex handles that setup by keeping profiles isolated, checking quota before launch, and keeping continuations on the profile that already owns them.
Requirements
Before using prodex, make sure you have:
- An OpenAI account, plus at least one logged-in Prodex profile
- Codex CLI, if you want to use
prodex - Claude Code (
claude), if you want to useprodex claude
Installing
@christiandoxa/prodexfrom npm also installs the Codex runtime dependency for you.
Claude Code is still a separate CLI and should already be available on yourPATHwhen you useprodex claude.
Install
npm
Cargo
The npm package version is kept in lockstep with the published crate version.
Update
Check your installed version:
The current local version in this repo is 0.2.133:
Dependency status in this repo:
- The npm runtime dependency is already at the latest published
@openai/codexrelease:0.118.0 cargo updatecurrently produces no Rust lockfile changes on the Rust1.94.1compatible graph used by this projectgeneric-arrayremains pinned transitively bycrypto-common, andsha2 0.11would require a wider RustCrypto compatibility jump than this release
Switching from a Cargo-installed binary to npm?
Quick Setup
If your shared Codex home already contains a login:
Or create a profile through the usual login flow:
If you want to name the profile first:
Check your profile pool and quota status:
Run Codex CLI or Claude Code through Prodex:
prodex without a subcommand is shorthand for prodex run.
Common Workflows
Create or import profiles
Inspect your pool
Run Codex with automatic profile selection
Resume an existing session on the correct profile
Run Claude Code through the same profile pool
For managed profiles, Prodex can seed Claude state from your existing ~/.claude and ~/.claude.json on first use, then keep Claude config and chat history in shared Prodex-managed state.
Command Reference
Profile & Login
Run with Codex CLI
|
Run with Claude Code
Export & Import Profiles
prodex profile export includes each exported profile’s auth.json.
By default, it exports every configured profile and asks whether the bundle should be password-protected.
Quota, Status & Debugging
If a runtime session looks stalled, inspect the latest runtime log:
That pointer path lives in /tmp only when you keep the default runtime log directory. If you override the runtime log directory through policy or environment, use prodex doctor --runtime --json to read the active log_path and live broker metrics.
Use prodex cleanup to remove stale local runtime logs, temporary login homes, dead broker leases and registries, plus old orphaned managed profile homes that are no longer tracked in state.
Advanced Runtime Configuration
If you want tighter control over runtime logging, secrets, or proxy behavior, you can pin local settings in $PRODEX_HOME/policy.toml or ~/.prodex/policy.toml.
= 1
[]
= "json"
= "runtime-logs"
[]
= "file"
# keyring_service = "prodex"
[]
= 16
= 128
= 96
= 5000
= 300000
Notes:
- Environment variables still win over
policy.toml prodex infoandprodex doctorshow the active policy file, selected secret backend, and effective runtime log mode- The default runtime log format remains
text; setlog_format = "json"orPRODEX_RUNTIME_LOG_FORMAT=jsonwhen you want machine-readable runtime logs - Secret backend selection can be overridden with
PRODEX_SECRET_BACKENDandPRODEX_SECRET_KEYRING_SERVICE prodex auditreads the local append-only audit log and supports--tail,--component,--action,--outcome, and--json
Hardening And Operational Notes
The current setup is still local-first, but it already includes:
- a secret-management abstraction for
auth.jsonand exported profile bundles - a stable live broker snapshot at
GET /__prodex/runtime/metrics - a Prometheus scrape target at
GET /__prodex/runtime/metrics/prometheus prodex infoandprodex doctor --runtime --jsonsurfacing live broker metrics targets and the selected secret backend- append-only audit logging for profile selection, rotation decisions, and admin-facing state changes
prodex auditas a local read-only CLI surface for browsing recent audit events
Current limitations:
- local
auth.jsonremains the compatibility source of truth for current Codex flows even when a non-file backend is selected - there is no keychain, Vault, or KMS-backed secret backend implementation yet
- audit logs follow the resolved runtime log directory by default, or
PRODEX_AUDIT_LOG_DIRwhen set - there is no central control plane, RBAC, SSO, or SCIM
prodex doctor --runtime --jsonis useful operationally, but it is not a full observability stack- the repo still assumes a per-host profile pool and local state ownership
- runtime-store modularization is still in progress, so persistence and audit/event handling remain implementation details rather than a public API
Notes
- Managed profiles share persisted Codex state through Prodex-owned shared storage
prodex quota --allrefreshes live by default- Use
--onceif you only want a one-shot snapshot
Learn More
For a longer walkthrough, see QUICKSTART.md.