
Codex Profiles
FreeIsolate Codex environments for multiple accounts and projects.
Free · Opens the source repo
What Codex Profiles does
Codex Profiles is a skill designed for users who need to manage multiple Codex CLI or Codex Desktop environments on a single machine. By creating isolated CODEX_HOME directories, this tool allows users to maintain separate configurations, authentication tokens, and project states for different accounts or projects. This is particularly useful for developers or designers who work across various contexts, such as personal projects, client work, or academic tasks, without the risk of cross-contamination between environments.
The skill simplifies the process of switching between profiles by providing commands that wrap around Codex's native support for multiple home directories. Users can easily create, select, and manage profiles without manually adjusting environment variables or risking the exposure of sensitive information. With commands to check the status of profiles, log in, and execute tasks within a specific context, Codex Profiles enhances operational safety and efficiency.
While this tool is not an official OpenAI project, it offers a practical solution for those needing to switch contexts frequently. It is important to note that the skill does not provide full OS-level isolation, meaning that users should be aware of the limitations regarding other tools and applications that may still share state across profiles. Therefore, it is best suited for users who primarily require Codex-specific isolation rather than a complete sandboxing solution.
Overall, Codex Profiles is an essential tool for developers and designers who want to streamline their workflow by managing multiple Codex environments efficiently, ensuring that each context remains distinct and organized.
When to use it
Use Codex Profiles when you need to keep different Codex accounts or project contexts separate without manually exporting environment variables.
When not to use it
This tool is not suitable for users needing full OS-level isolation or those who expect it to manage state for other applications outside of Codex.
What you can build with it
Managing Work and Personal Accounts
Use Codex Profiles to switch between work and personal Codex accounts without risking credential overlap.
Project-Specific Contexts
Create isolated profiles for different projects, ensuring that configurations and states do not interfere with each other.
Testing and Debugging
Quickly switch profiles to test different configurations or debug issues related to specific accounts or projects.
How to install Codex Profiles
View source1. Install with the skills CLI
npx skills add sickn33/agentic-awesome-skills/codex-profiles --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by sickn33Codex Profiles
Overview
Use codex-profiles when a user wants separate Codex CLI or Codex Desktop contexts for work, personal, school, client, or project-specific activity. The tool wraps Codex's CODEX_HOME support so each profile has its own Codex home directory for auth, config, sessions, connectors, plugins, caches, logs, and local state.
This skill is for profile selection and operational safety around that boundary. It is not an official OpenAI project, and it does not provide full OS-level isolation.
When to Use This Skill
- Use when the user wants to keep multiple Codex accounts or project contexts separate on one machine.
- Use when a workflow needs a different
CODEX_HOMEwithout manually exporting environment variables. - Use when diagnosing which Codex profile is active or whether profiles are logged in.
- Use when the user asks about Codex account switching without copying
auth.json. - Use when launching Codex Desktop from a profile, only after confirming the user accepts app/process disruption.
How It Works
Step 1: Confirm Scope and Installation
First check whether the user wants CLI-only profile switching or Codex Desktop profile launching. Desktop operations can quit, launch, clone, or rebuild app instances, so get explicit approval before running them.
If the tool is already installed, inspect the live command surface:
codex-profile --help
codex-profile doctor
codex-profile list
codex-profile status
If it is not installed, prefer package-manager installs the user can inspect and control:
npm install -g codex-profile
brew install Ducksss/tap/codex-profile
Do not run remote install scripts automatically. If the user asks for a source install, clone the repository and inspect its install instructions first.
Step 2: Create or Select a Profile
Create a new isolated Codex home only when the user names the intended profile:
codex-profile init work
codex-profile path work
Ask the user to log in once per profile when needed:
codex-profile login work
Do not copy, parse, print, or migrate auth.json tokens between profiles.
Step 3: Run Codex CLI With a Profile
Use the CLI profile wrapper for ordinary agent work:
codex-profile cli work
codex-profile cli work exec "run tests and summarize failures"
For one-off shell sessions, prefer the tool's environment or shell activation commands after checking --help:
codex-profile env work
codex-profile shell-init --help
Step 4: Use Desktop Profile Commands Carefully
Codex Desktop launch flows can affect running app state. Before running them, state which profile, app mode, and workspace will be used, then wait for approval.
codex-profile app work ~/Dev/project
codex-profile app work --instance ~/Dev/project
Use --instance only when the user wants side-by-side Desktop profiles and accepts the additional local app clone and separate Electron user-data boundary.
Examples
Example 1: Read-Only Profile Audit
codex-profile list
codex-profile status
codex-profile doctor
Use this before changing profile state. It should not expose token contents.
Example 2: CLI Task in a Work Profile
codex-profile cli work exec "inspect this repository and run its test suite"
Confirm the profile name is intentional before running long tasks.
Example 3: Manual CODEX_HOME Equivalent
If the wrapper is unavailable, explain the underlying boundary instead of improvising token movement:
CODEX_HOME="$HOME/.codex-work" codex
CODEX_HOME="$HOME/.codex-work" codex exec "review this change"
Best Practices
- Keep profile names explicit and boring, such as
work,personal,client-a, orschool. - Use
status,list, anddoctorbefore destructive or Desktop actions. - Treat each profile as a separate local Codex home, not as a full sandbox.
- Keep secrets inside the account/profile that owns them; do not copy auth files between profiles.
- Prefer CLI profile commands for routine work and reserve Desktop app commands for user-approved context switches.
- Verify behavior against the installed
codex-profile --help, because command flags can change.
Limitations
codex-profilesis community-maintained and is not an official OpenAI tool.- It isolates Codex state through separate
CODEX_HOMEdirectories; it does not isolate the operating-system user, shell history, SSH keys, browser cookies, GitHub CLI auth, or unrelated application state. - Desktop profile launch behavior is macOS-focused and can change with Codex Desktop releases.
- Existing Codex sessions may still contain project context from before a profile strategy was adopted.
- The tool does not replace backups for important Codex state.
Security & Safety Notes
- Never copy, print, parse, or migrate
auth.jsontokens as a shortcut. - Do not run Desktop launch, app clone, rebuild, remove, or profile deletion commands without explicit user approval.
- Use
codex-profile removeonly after confirming the exact profile path and whether the user needs a backup. - Do not assume profile isolation protects credentials outside
CODEX_HOME. - Avoid remote install scripts in automated agent runs; prefer inspectable package-manager or source-install steps.
Common Pitfalls
-
Problem: A user expects profile switching to isolate GitHub CLI, SSH, or browser state. Solution: Explain that
codex-profilesisolates Codex home state only; check and switch other tools separately. -
Problem: A Desktop command disrupts an active session. Solution: Ask before Desktop operations and prefer CLI commands when the user only needs isolated command-line work.
-
Problem: A profile exists but is logged out or missing connectors. Solution: Run
codex-profile statusand have the user log in or configure connectors inside that profile.
Related Skills
@environment-setup-guide- Use when installing or documenting local development tools.@codex-maintenance- Use when maintaining local Codex Desktop, MCP, plugin, or cache surfaces.@filesystem-context- Use when reasoning about local files, config paths, and workspace boundaries.
Frequently asked questions about Codex Profiles
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
