One-click RTL rendering fix for Codex through ChatGPT Desktop on Windows. Arabic-script text reads right-to-left, English stays left-to-right, and programming code keeps its normal layout.
Codex Desktop is now shipped through the ChatGPT desktop app on some Windows installs. This toolkit targets that Codex/ChatGPT Desktop experience, not ordinary browser ChatGPT.
Download, extract, and double-click Run-CodexRTL.cmd.
- Download
codex-rtl-toolkit-v0.1.6.zip. - Extract the ZIP.
- Save any unfinished input in Codex/ChatGPT Desktop.
- Double-click
Run-CodexRTL.cmd.
Codex/ChatGPT Desktop may remain active after its window is closed. The launcher safely closes any running desktop app processes, starts a fresh RTL-enabled session, and applies the fix automatically.
Requirements: Windows, Node.js 20+, and Codex through ChatGPT Desktop.
The toolkit detects RTL text written with the Arabic script. It supports Arabic, Persian, Urdu, Arabic-script Kurdish such as Sorani, Pashto, and Sindhi. English and other Latin-script lines remain LTR.
- Arabic-script RTL paragraphs align right.
- Mixed RTL and English text renders in the correct order.
- English runs and sentence-ending punctuation keep their natural position inside RTL text.
- Fenced
textandmarkdownblocks choose direction per line: Arabic-script lines are RTL and English-only lines are LTR. - Markdown blocks work with or without headings, lists, or other Markdown syntax tokens.
- Arabic-script Markdown files displayed in the side panel use RTL per line while English and code lines remain LTR.
- Code blocks, terminals, file paths, and inline code remain LTR.
- English-heavy messages keep their normal direction.
- Dynamically rendered chat blocks are rescanned as soon as their lines appear.
Normal messages, fenced Markdown, fenced text, and programming code keep the appropriate direction independently.
Arabic-script Markdown content, tables, and mixed technical terms render RTL inside the Codex side panel.
- closes running or background Codex/ChatGPT Desktop processes
- checks that Node.js and npm are installed
- runs
npm ci --ignore-scriptson the first launch - starts Codex through ChatGPT Desktop with a DevTools port bound only to
127.0.0.1 - injects the local RTL rendering fix as soon as the renderer is ready
- checks GitHub Releases at most once every 24 hours and prints a link when an update is available
It does not download updates automatically or change your messages, account data, or app installation files.
For users who prefer not to run the CMD launcher, install dependencies from PowerShell:
npm ci --ignore-scriptsClose Codex/ChatGPT Desktop completely, then start it with the local debugging port:
.\desktop\Launch-CodexRTL.ps1In another terminal, inject the RTL fix:
npm run injectIf the injector cannot find the app, keep a conversation open and run npm run inject again.
The launcher uses Chromium DevTools on localhost only:
127.0.0.1:9223
Do not expose this port through a tunnel, proxy, firewall rule, or shared machine. The injector refuses non-local DevTools targets.
This is a community workaround because the desktop app does not currently expose a documented plugin API for changing its CSS. Read SECURITY.md and SECURITY_AUDIT.md for the threat model and audit notes.
- Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked.
- Select the
extensionfolder.
The extension applies the same rendering fix to chatgpt.com. Codex through ChatGPT Desktop is the toolkit's primary target.
- Desktop injection lasts for the current renderer session. If the app reloads, run
npm run injectagain. - The desktop launcher depends on the app accepting Chromium flags. If a future build blocks that, use the browser extension path until a better app-level hook exists.
- CSS selectors are intentionally broad because Codex UI class names can change.
After editing files in src/, sync the browser extension copy:
npm run build:extensionBefore opening a PR or release:
npm run checkSecurity review artifacts:
SECURITY.md: safe usage and reporting policy.SECURITY_AUDIT.md: audit report for the current codebase.docs/security-checklist.md: release checklist.
src/: shared RTL JavaScript and CSS.desktop/: Codex through ChatGPT Desktop launcher and injector.extension/: unpacked Chrome/Edge extension.scripts/: sync and validation helpers.docs/architecture.md: implementation details.docs/security-checklist.md: release safety checklist.SECURITY.md: threat model and safe usage.SECURITY_AUDIT.md: security audit report.
MIT

