Codex Profile Manager
Manage multiple OpenAI Codex accounts on a single machine. Each account has isolated CODEX_HOME, credentials, settings, and usage tracking.
Install
bash install.sh
source ~/.bashrc # or ~/.zshrc
The installer:
- Creates a Python virtual environment
- Installs the CLI and wrapper
- Imports existing
~/.codexas the "default" account (optional) - Adds shell functions for
codex,codex-accounts,codex-projects, andcodexpm
Quick Start
# Create an account
codex-accounts add work
# Login to the account
codex-accounts login work
# Use the account
codex -u work
# Set as default
codex-accounts default work
codex # uses work account
Account Management
codex-accounts list # List all accounts
codex-accounts add <name> # Create account
codex-accounts bootstrap [name] # Import ~/.codex as account
codex-accounts remove <name> # Remove account
codex-accounts rename <old> <new> # Rename account
codex-accounts default [name] # Get/set default
codex-accounts info [account] # Show details
codex-accounts info [account] --json # JSON output
codex-accounts login [account] # Authenticate
codex-accounts logout [account] # Remove credentials
codex-accounts next # Switch to next available account
Billing/Renewal Tracking
codex-accounts set-renewal work 2024-05-01 --cycle monthly
codex-accounts clear-renewal work
The wrapper shows a banner before launch with renewal date and usage status.
Project Ledger
Track activity across accounts per project:
codex-projects status [path] # Show project info
codex-projects history [path] # Show activity log
codex-projects list # List tracked projects
codex-projects handoff --to-account backup --reason "rate limit"
Handoff creates a note with git status, recent history, and resume instructions.
Replication
Export accounts to another machine:
# Source machine
codexpm replicate export ~/codex-bundle.tgz --include-auth --include-projects
# Target machine
git clone <repo> codex-profile-manager && cd codex-profile-manager
bash install.sh && source ~/.bashrc
codexpm system install-codex
codexpm replicate import ~/codex-bundle.tgz --overwrite
System Management
codexpm system status # Show npm/codex versions
codexpm system install-codex # Install @openai/codex globally
codexpm system upgrade-codex # Upgrade to latest
Documentation
codexpm docs # List topics
codexpm docs getting-started # View topic
codexpm docs replication --path # Show file path
Data Layout
~/.local/share/codex-profile-manager/
.venv/ # Python environment
src/codex_profile_manager/ # Typer CLI app
accounts/<name>/home/ # Isolated CODEX_HOME per account
accounts/<name>/meta.json # Account metadata
projects/<project-id>/ # Cross-account project ledger
codex-profile-manager.sh # Shell wrapper
Uninstall
Remove the source line from ~/.bashrc or ~/.zshrc and delete ~/.local/share/codex-profile-manager/.
Requirements
- Linux or macOS
- Bash or Zsh
- Python 3.10+
- Node.js/npm (for @openai/codex)
Metadata
Release files for codex-profile-manager 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codex_profile_manager-0.1.0.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codex_profile_manager-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.2 kB
Release files / codex_profile_manager-0.1.0.tar.gz
| Download URL | codex_profile_manager-0.1.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad9de4e0e4beaa98366dae8cb658c37a20bd155aab80f018d736319eb8fc6a78
|
|
BLAKE2b-256 checksum How to use checksums |
4e75178da2b26e453670819b91cfacd52ce8275113ffc3877c9ccd4ad65075aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / codex_profile_manager-0.1.0-py3-none-any.whl
| Download URL | codex_profile_manager-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef9810d7f801657ee40c6a74adc3a1dff6fad3d5d682808b5b4a7e95a5243138
|
|
BLAKE2b-256 checksum How to use checksums |
4ca87834d973c966335c1f24798a69e274c913532b82cbfa5144fb57cee22a3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|