A native macOS application that provides a graphical interface for the OpenAI Codex CLI. CodexUI enables AI-assisted coding with seamless Xcode integration.
CodexUI.mp4
CodexUI spawns the Codex CLI as a subprocess:
- Subprocess Communication: Executes Codex via
/bin/zshand communicates through stdin/stdout pipes - Real-time Streaming: Responses stream as they're generated
- Session Persistence: Uses
--resume-last-sessionto maintain conversation context across turns - Xcode Integration: Reads your active Xcode file and selection via the Accessibility API, providing context to Codex automatically
npm install -g @openai/codexcodex authThis creates the required configuration files in ~/.codex/.
Required for Xcode integration. Grant access at:
System Settings > Privacy & Security > Accessibility > CodexUI
This allows CodexUI to read your Xcode workspace." or "This enables access to your Xcode workspace.
CodexUI comes with pre-built profiles that control sandbox and approval behavior:
| Intent | Flags | Effect |
|---|---|---|
| Safe read-only browsing | --sandbox read-only --ask-for-approval on-request |
Codex can read files and answer questions. Requires approval to make edits, run commands, or access network. |
| Read-only non-interactive (CI) | --sandbox read-only --ask-for-approval never |
Reads only; never escalates |
| Let it edit the repo, ask if risky | --sandbox workspace-write --ask-for-approval on-request |
Codex can read files, make edits, and run commands in the workspace. Requires approval for actions outside the workspace or for network access. |
| Auto (preset; trusted repos) | --full-auto |
Codex runs sandboxed commands that can write inside the workspace without prompting. It escalates only when it must leave the sandbox. |
| YOLO (not recommended) | --dangerously-bypass-approvals-and-sandbox |
No sandbox; no prompts |
See Codex sandbox documentation for more details.
Users can also create their own profiles
Configure global feature toggles that apply to all Codex sessions, regardless of the selected profile. These settings are stored in ~/.codex/config.toml under the [features] section.
Standard Features:
- View Image Tool - Allow viewing images in responses (default: enabled)
- Web Search - Search the web for up-to-date information (default: disabled)
Advanced Features (hidden by default):
- Unified Exec, Rust MCP Client, Apply Patch Freeform, Sandbox Command Assessment, Ghost Commit
Access these settings via the Settings panel in CodexUI.
Easy access to your Codex sessions, initiated in CodexUI
CodexUI reads local Codex CLI configuration from ~/.codex/ via CodexConfigService.
What it reads
config.toml:modelandmodel_reasoning_effortversion.json:latest_version(used as the displayed CLI version)auth.json:tokens.id_token(JWT payload) foremailandchatgpt_plan_type
When it updates
CodexConfigServiceloads on app start and can be refreshed withrefresh()to re-read the files.
CodexUI includes experimental voice input powered by CodeWhisper.
Important: Voice mode requires a separate OpenAI API key for speech-to-text transcription (Whisper API). This is not the same as your Codex CLI credentials - you need to provide an OpenAI API key separately.
- Long-press the voice button (waveform icon) in the chat input area
- Enter your OpenAI API key in the CodeWhisper settings
- Grant microphone permission when prompted
- When the text field is empty, a voice button appears instead of the send button
- Tap to start recording, tap again to stop
- Your speech will be transcribed and sent as a message
- Clone the repository
- Open
CodexUI.xcodeprojin Xcode - Build and run the
CodexUItarget
- CodexSDK - Codex CLI execution client
- Down - Markdown rendering
- highlightswift - Syntax highlighting
- SQLite.swift - Session persistence
- KeyboardShortcuts - Global keyboard shortcuts
- CodeWhisper - Voice input (STT)
CodexUI/
├── Chat/
│ ├── ViewModels/ # ChatViewModel, SessionManager, ContextManager
│ ├── Views/ # ChatScreen, ChatInputView, SettingsView
│ ├── Models/ # ChatMessage, CodexProfile, FileAttachment
│ └── Services/ # CodexConfigService, ProfileManager
├── Services/
│ ├── AccessibilityService/ # Xcode UI reading
│ ├── XcodeObserverService/ # Live Xcode monitoring
│ └── TerminalService/ # Process execution
└── CodexUIApp.swift # App entry point
- Fork the repository
- Create a feature branch
- Submit a pull request