clued / Arabic and right-to-left text
Arabic and Hebrew that read the right way in Claude Code
Most terminals draw each row left to right, in the order they get the characters, so Arabic or Hebrew comes out backwards, and many don't join Arabic letters. clued, a terminal chat app for Claude Code, lays such text out itself: each line in reading order, Arabic letters joined, and right-to-left paragraphs on the right.
What clued does
- Each line of a message, a reply, a table cell or a panel preview is put in reading order (the Unicode Bidirectional Algorithm, line by line after wrapping), and Arabic letters are joined, by clued or by the terminal's font.
- A paragraph that starts with an Arabic or Hebrew letter reads right to left and sits on the right of its bubble. English words, numbers, inline code, URLs and paths in it stay left to right.
- Code blocks stay left to right; an Arabic string in code reads right to left in its place.
- In the input box an Arabic line sits on the right, with the cursor where the next letter goes.
- Selecting and copying,
⧉ copyand/copygive the text as written, not as drawn.
Which terminals show Arabic correctly?
It depends on what the terminal does by itself. clued picks the right mode for each:
| Terminal | By itself | With clued |
|---|---|---|
| Windows Terminal (and WSL), VS Code, WezTerm, Alacritty, foot, xterm | don't reorder | clued reorders (app, the default) |
| GNOME Terminal, Tilix and other VTE terminals | reorder by themselves | clued tells them not to and reorders itself; inside tmux, use terminal if Arabic looks backwards |
| iTerm2 3.7.5 and later | reorder, but can be told not to | clued tells them not to and reorders itself (app) |
| iTerm2 before 3.7.5, macOS Terminal, Konsole, mlterm | reorder and can't be told not to | clued sends the text as written (terminal); mixed Arabic and English may still come out wrong |
| kitty | turns each right-to-left word round | set force_ltr yes in kitty.conf |
To choose yourself, set CLUED_BIDI before you start clued, for example export CLUED_BIDI=terminal in ~/.zshrc: app (clued reorders), terminal (the terminal does) or off.
Why aren't the Arabic letters joined?
Once clued has put a line in order, something still has to join its letters. In Windows Terminal, the terminal's font does it well, and clued setup can install a font for Arabic there. Everywhere else, clued draws each letter in its joined form itself. CLUED_ARABIC (terminal or app) overrides the choice.
Hebrew and other right-to-left scripts
The reordering is the same for Hebrew and other right-to-left text: it follows the Unicode Bidirectional Algorithm, whatever the script.
Arabic, Hebrew and other right-to-left text, in the docs
Get clued
git clone https://github.com/haytham-breaka/clued.git ~/src/cluedmkdir -p ~/.local/binln -s ~/src/clued/bin/clued ~/.local/bin/cluedYou need Claude Code, installed and logged in, Node 22.18 or later, git and bash. It runs on Linux and macOS, and on Windows through WSL. Then run clued in a project folder.