G-001 · Official-docs reviewed

Codex TUI Theme Guide: Change /theme and config.toml

Start Codex, enter /theme, preview a theme, and confirm. Codex saves your syntax-highlighting choice as tui.theme in config.toml.

Change your Codex TUI theme

  1. Start an interactive session with codex.
  2. Enter /theme in the Codex composer.
  3. Preview a theme, then confirm your selection.

The choice is saved to tui.theme in $CODEX_HOME/config.toml. Codex uses it for fenced Markdown code blocks and file diffs.

Where is the theme setting?

The default user configuration is ~/.codex/config.toml. Replace the example name below with the name saved by your picker:

[tui]
theme = "your-theme-name"

If your file already has a [tui] table, edit its theme entry instead of adding another table. Continue with the configuration scope guide.

Add a custom .tmTheme

Put the TextMate theme file in $CODEX_HOME/themes, then select it with /theme. The default directory on macOS or Linux is ~/.codex/themes.

Inspect its palette and scopes with the local .tmTheme inspector, and use the custom theme checklist.

Why is my Codex theme not working?

See theme troubleshooting, or prepare other documented TUI options with the config composer.

Codex TUI theme FAQ

What is Codex TUI?

TUI means terminal user interface: the interactive Codex session opened by running codex.

Does /theme save my choice?

Confirming a theme saves the syntax-highlighting choice as tui.theme in config.toml.

Can I use a custom theme?

Place a .tmTheme file in $CODEX_HOME/themes and select it from the picker.

How can I switch back?

Open /theme and select your previous theme.

Evidence and limitations

Applies to
Codex CLI TUI
Version evidence
Current official documentation
Evidence sources
Official CLI customization, command and configuration documentation.
Evidence observed
2026-10-04
Verification
Official-docs reviewed; not manually tested in every terminal environment.
Rights / permission reference
Original editorial text by CodexSkin.space; external sources are linked for evidence.
Asset hosting
external-original-only; cited third-party assets are not rehosted.
Last reviewed
2026-10-04

Independent notice

CodexSkin.space is an independent community guide site and is not affiliated with, endorsed by, or sponsored by OpenAI. “OpenAI,” “Codex,” and “ChatGPT” may be trademarks of their respective owners.

External links are source links for evaluation. This guide does not certify safety, security, compatibility, quality, rights, or suitability.

Risk notes

Theme colors depend on your terminal and the selected theme. This setting controls syntax highlighting in code blocks and diffs.

Rollback

Open /theme again and select your previous theme. If you edited config.toml manually, restore its previous tui.theme value.

Primary source links

Continue with the next evidence question.

Corrections and rights reports

For corrections or rights-related reports, contact contact@codexskin.space.