Syntax highlight code in CLI

Resolved 💬 18 comments Opened Aug 29, 2025 by haonans Closed Feb 22, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

<img width="1129" height="445" alt="Image" src="https://github.com/user-attachments/assets/f11bc14a-98e9-4d16-a5c7-993248ba5412" />

I am using Codex CLI to help me navigate throw the code, without syntax highlight, I still want to open VS Code.

Are you interested in implementing this feature?

_No response_

Additional information

_No response_

View original on GitHub ↗

18 Comments

looper200 · 10 months ago

readability issue they should style that so they help us read its hard to read

JonathanAquino-NextRoll · 9 months ago

Claude Code has syntax highlighting

<img width="796" height="373" alt="Image" src="https://github.com/user-attachments/assets/8af596ee-b2ef-43db-90b6-52b0706c9622" />

JonathanAquino-NextRoll · 9 months ago

Cursor CLI also has some nice syntax highlighting.

<img width="892" height="490" alt="Image" src="https://github.com/user-attachments/assets/dc0238a0-2903-43d5-82aa-e4c1e7004ad3" />

trinanda · 9 months ago

That's right, Codex appearance looks raw, hopefully Codex have styling beautiful as Claude's code with elegant textbox, responses, and syntax highlighting

<img width="1920" height="1053" alt="Image" src="https://github.com/user-attachments/assets/7a034d54-6575-4a2d-9a57-a55f5a4441c5" />

<img width="1920" height="1048" alt="Image" src="https://github.com/user-attachments/assets/8f65f802-5dc5-4db3-b3ae-2eb98bd7252a" />

Wan9xy · 8 months ago

After switching to GPT-5.1, the model's responses have become extremely long, which has resulted in very poor readability. Looking at the plan makes my eyes hurt.

cjbottaro · 7 months ago

Oofa, just started using Codex CLI and yeah... this was a disappointment.

SamSaffron · 6 months ago

I am not a Rust programmer and I just engineered this with Gpt 5.2 codex high

https://github.com/SamSaffron/codex/commit/707f356f37f6c40ecd32db7bc8c72be745ce0f50

The result though is quite nice.

<img width="1560" height="1918" alt="Image" src="https://github.com/user-attachments/assets/1c6e2fa7-cdc6-4bd1-ba2e-555b75619d7b" />

I feel like it is quite significant in that it makes the experience much more polished for Codex users.

Wan9xy · 6 months ago
I am not a Rust programmer and I just engineered this with Gpt 5.2 codex high SamSaffron@707f356 The result though is quite nice. <img alt="Image" width="1560" height="1918" src="https://private-user-images.githubusercontent.com/5213/532685343-1c6e2fa7-cdc6-4bd1-ba2e-555b75619d7b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njc3Njg5OTgsIm5iZiI6MTc2Nzc2ODY5OCwicGF0aCI6Ii81MjEzLzUzMjY4NTM0My0xYzZlMmZhNy1jZGM2LTRiZDEtYmEyZS01NTViNzU2MTlkN2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDEwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMDdUMDY1MTM4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWQxYjQ5Y2JhNWI3MGYxOGIyMGQ4ZTI0Nzg0YmRkMzFjMWYyNjk5ZDhkYzkxZTU3OWQ4NDU0ZGRmYTQ1NDNkZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.dejSv7yZTD1AcvK2rjPpMAmK3YSI-i5X1wT0A1ahkkM"> I feel like it is quite significant in that it makes the experience much more polished for Codex users.

I think the issue isn't just with the code rendering; the Markdown used for the planning phase isn't very readable either.

Agent-Hellboy · 6 months ago
I think the issue isn't just with the code rendering; the Markdown used for the planning phase isn't very readable either.

exactly

Wan9xy · 5 months ago
> I think the issue isn't just with the code rendering; the Markdown used for the planning phase isn't very readable either. exactly

I've switched to OpenCode, and it works very well with GPT.

Sure-Will · 5 months ago

I can’t believe this issue still hasn’t been resolved after half a year.

etraut-openai contributor · 5 months ago

@Sure-Will, we generally prioritize features based on community upvotes. If you'd like to see this feature, please add a thumbs-up reaction. That will move it higher in the priority list.

Eriz1818 · 5 months ago

I implemented syntax highlighting in my fork, xCodex (xcodex), and shipped it in v0.3.5.

What it does:

  • Syntax-highlights fenced code blocks in the transcript (themeable).
  • Also supports diff highlighting in the transcript (separate toggle).

Languages supported (v0.3.5):
Bash (bash/sh/zsh), C, C++, CSS, Go, HTML, Java, JavaScript, JSON, Python, Ruby, Rust, TypeScript, YAML.

How to try:

  • Install: npm i -g @eriz1818/xcodex
  • Toggle in TUI: /settings transcript syntax-highlight toggle

(or config.toml: [tui] transcript_syntax_highlight = true)

  • or via /settings menu

Docs:

<img width="2056" height="1153" alt="Image" src="https://github.com/user-attachments/assets/f8e4cac5-9c00-4281-be08-ed64c893f009" />

joshka-oai contributor · 5 months ago

For this I'd like to see us use Arborium https://fasterthanli.me/articles/introducing-arborium

The main blocker on this might be release artifact size - it's about 30mb of deps, but due to the way we package for npm right now (I think) we produce a single npm artifact for all targets rather than one per target. I could be wrong about that (haven't looked at it in a while.

Wan9xy · 5 months ago

<img width="1855" height="1849" alt="Image" src="https://github.com/user-attachments/assets/57695087-6214-47c6-9ab7-f2f43918dd58" />

In fact, a very similar issue has been ranked number 4 for a long time. #

@Sure-Will, we generally prioritize features based on community upvotes. If you'd like to see this feature, please add a thumbs-up reaction. That will move it higher in the priority list.
etraut-openai contributor · 5 months ago

@Wan9xy, yes this features will rise in the priority list as we close other features that had even more upvotes. This feature (syntax highlighting) is distinct from #1618.

etraut-openai contributor · 4 months ago

This will be included in the next release!

Sure-Will · 4 months ago
This will be included in the next release!这将在下一个版本中包含!

Thanks for your hard work!