clued

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

Which terminals show Arabic correctly?

It depends on what the terminal does by itself. clued picks the right mode for each:

TerminalBy itselfWith clued
Windows Terminal (and WSL), VS Code, WezTerm, Alacritty, foot, xtermdon't reorderclued reorders (app, the default)
GNOME Terminal, Tilix and other VTE terminalsreorder by themselvesclued tells them not to and reorders itself; inside tmux, use terminal if Arabic looks backwards
iTerm2 3.7.5 and laterreorder, but can be told not toclued tells them not to and reorders itself (app)
iTerm2 before 3.7.5, macOS Terminal, Konsole, mltermreorder and can't be told not toclued sends the text as written (terminal); mixed Arabic and English may still come out wrong
kittyturns each right-to-left word roundset 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

bash
git clone https://github.com/haytham-breaka/clued.git ~/src/cluedmkdir -p ~/.local/binln -s ~/src/clued/bin/clued ~/.local/bin/clued

You 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.

View on GitHub