Multi-account profile manager for OpenAI Codex CLI
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codex_profile_manager-0.1.0.tar.gz.
File metadata
- Download URL: codex_profile_manager-0.1.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9de4e0e4beaa98366dae8cb658c37a20bd155aab80f018d736319eb8fc6a78
|
|
| MD5 |
03da0bc89424b2dddfac8568a061fc68
|
|
| BLAKE2b-256 |
4e75178da2b26e453670819b91cfacd52ce8275113ffc3877c9ccd4ad65075aa
|
File details
Details for the file codex_profile_manager-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codex_profile_manager-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef9810d7f801657ee40c6a74adc3a1dff6fad3d5d682808b5b4a7e95a5243138
|
|
| MD5 |
c8faf2aa251dd5b87239c214d9bbfd7d
|
|
| BLAKE2b-256 |
4ca87834d973c966335c1f24798a69e274c913532b82cbfa5144fb57cee22a3b
|