Before / After
Same prompt — "Build an order confirmation card in Hebrew" — same AI editor:
| ❌ Without RTLify | ✅ With RTLify |
|---|
<div className="ml-4 pl-6 text-left">
<ArrowRight className="mr-2" />
<p>ההזמנה שלך #12345 אושרה</p>
<p>סה"כ: ₪249.90</p>
</div>
Margins on the wrong side, arrow points backwards, #12345 jumps to the start of the sentence.
|
<div className="ms-4 ps-6 text-start">
<ArrowRight className="me-2 rtl:-scale-x-100" />
<p>ההזמנה שלך <bdi>#12345</bdi> אושרה</p>
<p>סה"כ: {new Intl.NumberFormat('he-IL',
{ style: 'currency', currency: 'ILS' }).format(249.9)}</p>
</div>
Logical spacing, flipped icon, bidi-safe order number, localized currency.
|
One command, then every component your AI writes looks like the right column.
The Core Idea
RTLify doesn't fix code after generation — it prevents incorrect code from being generated in the first place. Teach your AI once instead of fixing every component manually.
RTLify is not an i18n library. It's an AI behavior layer — zero runtime dependencies — that ensures your coding agent uses correct RTL patterns and respects your existing localization setup.
Why
Every AI coding agent is trained on LTR codebases. Ask it to build an RTL interface and it will:
CSS & Layout
margin-left instead of margin-inline-start
ml-4 in Tailwind instead of ms-4
paddingLeft in React Native instead of paddingStart
Text & Bidi
- Hardcoded
"ברוכים הבאים" or "مرحباً" without translation functions
- Mixed Hebrew + numbers without
<bdi> tags — content jumps around
- US locale for dates and currency
Components
- Arrows and chevrons pointing the wrong way
- Carousels, charts, and sliders rendering backwards
...and dozens of subtle bugs that slip into production.
Quick Start
npx rtlify-ai init
Run once per project. After that, just code normally — your AI editor reads the rules automatically in the background.
Claude Code plugin (no npm step — adds the /rtlify:rtlify command, which sets up the rules on first use):
/plugin install rtlify --marketplace idanlevi1/rtlify
Older Claude Code: /plugin marketplace add idanlevi1/rtlify then /plugin install rtlify@rtlify
Supported AI Platforms
Claude Code CLAUDE.md + /rtlify | Cursor .cursor/rules/rtlify.mdc | Windsurf .windsurf/rules/rtlify.md | Cline .clinerules (file or folder) | Copilot copilot-instructions.md | Gemini CLI GEMINI.md | Codex CLI AGENTS.md |
Editors are auto-detected. Legacy .cursorrules / .windsurfrules files are reused if your project already has them.
Supported Frameworks
React & Next.js · Vite · React Native · Vue · Svelte · Astro · Vanilla JS/TS/CSS/SCSS · Tailwind CSS v3 & v4
How It Works
There is no black box. RTLify saves the full ruleset to .rtlify-rules.md and adds a short 3-line pointer to your editor config files. Your config stays clean — the AI knows where to find the rules. Open .rtlify-rules.md and read exactly what the AI sees.
Step 1 — 🧠 The Injection
npx rtlify-ai init