Skip to main content

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 ~/.codex as the "default" account (optional)
  • Adds shell functions for codex, codex-accounts, codex-projects, and codexpm

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_profile_manager-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_profile_manager-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

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

Hashes for codex_profile_manager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ad9de4e0e4beaa98366dae8cb658c37a20bd155aab80f018d736319eb8fc6a78
MD5 03da0bc89424b2dddfac8568a061fc68
BLAKE2b-256 4e75178da2b26e453670819b91cfacd52ce8275113ffc3877c9ccd4ad65075aa

See more details on using hashes here.

File details

Details for the file codex_profile_manager-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codex_profile_manager-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef9810d7f801657ee40c6a74adc3a1dff6fad3d5d682808b5b4a7e95a5243138
MD5 c8faf2aa251dd5b87239c214d9bbfd7d
BLAKE2b-256 4ca87834d973c966335c1f24798a69e274c913532b82cbfa5144fb57cee22a3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page