OpenAI Codex App Installation and Configuration Quickstart (macOS / Windows)
Posted March 4, 2026 by XAI Tech TeamΒ βΒ 5Β min read

This guide is based on official OpenAI documentation and is designed to help general users install and configure Codex App as quickly as possible. All information was verified against official docs on 2026-03-05.
Quick Summary (1 Minute)
- macOS: Download the
.dmgpackage and follow this guide's configuration steps to start using Codex App quickly. - Windows: Install from Microsoft Store. PowerShell works by default; if your workflow depends on Linux tooling, switch the Agent to WSL.
- Config file: The core setup is in
~/.codex/config.toml, with optional project overrides in.codex/config.toml. - Recommended flow: Configure
~/.codex/config.tomlandXAI_API_KEYfirst, then open your project and start. Use in-app sign-in only when a custom provider/key is not configured.
Official Support and Plans
According to the official Codex App docs:
- Codex App supports macOS (Apple Silicon) and Windows.
- ChatGPT Plus / Pro / Business / Edu / Enterprise plans include Codex capabilities.
1) macOS Installation and First Use
1. Download and Install
Official macOS download link:
Open the downloaded file and drag Codex to Applications.
2. Open the App (Recommended: Use Config First)
If you have already configured ~/.codex/config.toml and set XAI_API_KEY, you can usually open a project and start directly without choosing an extra sign-in flow in the app.
If a custom provider/key is not configured, follow the official login flow with a ChatGPT account or an OpenAI API key.
3. Select a Project Folder
After launch, choose the code repository folder you want Codex to work on.
4. Send Your First Prompt
Keep the target in Local mode and start with tasks like:
- "Explain this repository structure."
- "Find likely issues and suggest fixes."
- "Add tests for this function."
2) Windows Installation and First Use

1. Install from Microsoft Store
Official Windows entry:
2. Update Method
The official recommendation is to update through Microsoft Store:
- Open Microsoft Store.
- Go to
Downloads. - Click
Check for updates.
3. Default Runtime Mode
On Windows, Codex App uses Windows Native Agent by default:
- Commands run in PowerShell by default.
- The app uses Windows sandboxing.
4. Switch to WSL (Optional, Recommended for Linux-Centric Workflows)
If your development setup relies on Linux tooling (for example bash, GNU tools, Linux Node/Python ecosystems), switch the Agent to WSL.
Path in the app (per official docs):
- Open
Settings. - Find the Agent runtime mode.
- Switch from Windows Native to WSL.
- Restart the app to apply changes.
Note: Agent runtime and integrated shell can be configured independently. You can run the Agent in WSL while keeping the shell in PowerShell, or vice versa.
3) Understand config.toml in 1 Minute
Official configuration basics:
- User-level config:
~/.codex/config.toml - Project-level config:
<project>/.codex/config.toml - Priority (high to low): CLI args > Profile > Project config > User config > System config > Built-in defaults
In practice: keep global defaults in ~/.codex/config.toml, and override per project when needed.
4) Example Configuration (Ready to Reuse)
Here is a practical example configuration:
model_provider = "xai"
model = "gpt-5.3-codex"
model_reasoning_effort = "xhigh"
plan_mode_reasoning_effort = "xhigh"
model_reasoning_summary = "detailed"
model_verbosity = "high"
approval_policy = "never"
sandbox_mode = "danger-full-access"
[model_providers.xai]
name = "xai"
base_url = "https://api.xairouter.com"
wire_api = "responses"
requires_openai_auth = false
env_key = "XAI_API_KEY"Key Fields Explained
model_provider/model: Choose provider and default model.approval_policy: Whether high-risk operations require your confirmation.sandbox_mode: Permission boundary for local command execution.base_url: Provider API endpoint.env_key: The environment variable name used for your API key.
Security Recommendation (For General Users)
This example uses high-permission settings:
approval_policy = "never"sandbox_mode = "danger-full-access"
For safer defaults, use:
approval_policy = "on-request"
sandbox_mode = "workspace-write"5) Environment Variable Setup (XAI_API_KEY)
Because the example uses:
env_key = "XAI_API_KEY"Your system needs XAI_API_KEY.
macOS / Linux
macOS uses zsh by default, so write to ~/.zshrc first:
echo 'export XAI_API_KEY="your_key"' >> ~/.zshrc
source ~/.zshrcIf you are on Linux with bash, use ~/.bashrc:
echo 'export XAI_API_KEY="your_key"' >> ~/.bashrc
source ~/.bashrcWindows (PowerShell)
Current session:
$env:XAI_API_KEY = "your_key"Persist it for your user:
setx XAI_API_KEY "your_key"Reopen terminal/app after setting it.
6) Common GUI Settings
1. Default Open-In Editor
You can set a default editor in settings (VS Code / Visual Studio / others).
2. Integrated Shell
Common options on Windows: PowerShell, Command Prompt, Git Bash, WSL.
Note: Shell changes usually apply to new sessions. Restart the app if needed.
7) Quick Troubleshooting
1. PowerShell Execution Policy Error
A common fix from official docs:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned2. Git Not Available on Windows
Install native Git first:
winget install Git.Git3. Fast Environment Validation
Run these tasks in the app to confirm things are working:
- "Explain this repository structure."
- "Run a safe command and explain output (for example
git status)." - "Modify a small function and summarize the changes."
Official Docs and Download Links
- Codex App overview: https://developers.openai.com/codex/app/
- Windows page: https://developers.openai.com/codex/app/windows/
- App settings: https://developers.openai.com/codex/app/settings/
- Configuration basics: https://developers.openai.com/codex/config-basic
- Authentication and sign-in: https://developers.openai.com/codex/auth
- macOS download (official): https://persistent.oaistatic.com/codex-app-prod/Codex.dmg
- Windows download (official store): https://apps.microsoft.com/detail/9plm9xgg6vks?hl=en-US&gl=US