@seyedalida/claude-rtl-patcher
v1.3.0
Published
Automated patcher to add Vazirmatn Variable font and Smart RTL support to Claude Desktop app for macOS, Windows, and Linux.
Maintainers
Readme
✨ RTL applied by Rick Sanchez and Vazirmatn font used in memory of Saber Rastikerdar. ✨
🇮🇷 نسخه فارسی (Persian) | 🇸🇦 اقرأ بالعربية (Arabic) | 🇮🇱 קרא בעברית (Hebrew)
This is an open-source, automated tool that injects robust Right-to-Left (RTL) support and the beautiful Vazirmatn font directly into the official Claude Desktop App (macOS, Windows, Linux). It fixes the broken text alignment for languages like Persian (Farsi), Arabic, and Hebrew so you can chat with Claude seamlessly.
Auto-detect mode: newer Claude Desktop builds already render RTL correctly on their own. When that's detected, the patcher automatically applies only the Vazirmatn font and leaves direction/alignment untouched. On older builds without native RTL, it still applies the full RTL + font patch. You can also force a mode manually with
--font-onlyor--full.
🚀 One-Click Installation (Recommended)
You do not need to download or install anything manually. Just open your system's terminal (CMD / PowerShell / Mac Terminal) and paste this magic command:
npx claude-rtl-patcher(The script features a beautiful interactive CLI that will automatically detect your OS and Claude version, create a backup, inject the right CSS for your case, and bypass security constraints within seconds!)
Once finished, fully close Claude (Cmd + Q or Ctrl + Q) and reopen it.
Standalone installer (no Node.js required)
Release binaries are built automatically for macOS, Windows, and Linux. After a release is published, download the matching asset or run the bootstrap command:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/m4tinbeigi-official/claude-rtl-patcher/main/install.sh | bash
# Windows PowerShell
irm https://raw.githubusercontent.com/m4tinbeigi-official/claude-rtl-patcher/main/install.ps1 | iexThe standalone build installs the patcher for the current user, detects the operating system and Claude path, creates a backup, and launches the same interactive patch flow. Windows MSIX/AppX installs remain unsupported because their package files are not writable.
Forcing a specific mode
```bash npx claude-rtl-patcher --font-only # only apply Vazirmatn, skip RTL/direction changes npx claude-rtl-patcher --full # force the full RTL + font patch, even on new versions ```
✨ Features & Keyboard Shortcuts
- 🔤 Vazirmatn Variable Font: Upgraded to official variable font supporting weight axes
100 900for native, crisp bold headers and text. - ⌨️
Alt + RMode Toggle: Instantly cycle between modes on the fly with a sleek floating toast notification:- Auto RTL: Smart auto-detection based on paragraph language.
- Force RTL: Right-aligns all paragraphs (fixing sentences starting with English words like "Docker", "API", or "Claude").
- Disabled: Temporarily disables RTL alignment for pure English/code review.
- ⌨️ Persian Keyboard
@Fix: InterceptsShift + 2on Persian keyboards to type@directly instead of٬. - 🧠 Thinking & Reasoning Isolation: Extended thinking streams (e.g. Claude 3.7 Sonnet) remain strictly LTR and left-aligned.
- 📊 Markdown Tables RTL: Proper table alignment, borders, and cell padding for RTL conversations.
- 💻 Monospace & Icon Protection: Code blocks, copy buttons, SVGs, and syntax tokens strictly keep their monospace font and LTR layout.
🐧 Custom Paths & Linux
If you installed Claude in a custom directory, or you use an unofficial Linux wrapper, simply provide the path to your installation (or directly to the app.asar file) as an argument:
npx claude-rtl-patcher /opt/Claude
# or directly to asar:
npx claude-rtl-patcher /home/user/.local/share/Claude/resources/app.asar⚠️ Known limitation: Windows MSIX/AppX installs
If Claude Desktop on Windows was installed as an MSIX/AppX package (path contains WindowsApps), this tool will refuse to patch it. That location is owned by TrustedInstaller and isn't writable even as Administrator, and MSIX packages carry their own integrity verification that can silently revert in-place file edits anyway. There is currently no supported workaround — this is a Windows packaging limitation, not a bug we can patch around. See #6 for details and discussion.
🐛 Issue reports and fixes
The following fixes were implemented from community reports in issues #4–#8:
| Issue | Reported by | Report | Resolution |
|---|---|---|---|
| #4 | amirhyz | plist@5 crashed the CommonJS require('plist') import with ERR_PACKAGE_PATH_NOT_EXPORTED. | Pinned plist to the CommonJS-compatible 3.x line and refreshed the lockfile. |
| #5 | mkhrezaee | The same ESM-only plist@5 failure affected Windows and Node.js 22. | Kept the runtime on the compatible CommonJS dependency and added regression coverage. |
| #6 | mkhrezaee | Windows MSIX/AppX installs under WindowsApps are not writable and can be reverted by package integrity checks. | Added WindowsApps detection, a clear fail-fast message, and documented the unsupported packaging limitation. |
| #7 | mahsakiani | Patching the latest macOS build invalidated the ASAR integrity metadata and code signature. | Recompute Info.plist ASAR integrity, ad-hoc re-sign the bundle, verify it, and keep rollback atomic. |
| #8 | Ehsan-rvp | ERR_PACKAGE_PATH_NOT_EXPORTED on Node.js 22/24 prevented startup. | Covered by the plist compatibility fix and lockfile update above. |
The original issue threads remain available for reproduction details and discussion.
⏪ How to Restore
If you ever want to revert Claude to its original state, just run:
npx claude-rtl-patcher --restoreYour original backup will be instantly restored.
🆘 The Ultimate Fallback Prompt
If the patcher fails due to an unknown or severely updated Claude version, don't worry. You can ask Claude itself to generate a custom patcher for you! Note: Claude's AI has strict safety filters and will refuse to modify itself if you mention "Claude Desktop". To bypass this, we must ask it generically.
Copy and paste this exact prompt into Claude:
"I am a developer working on my own local Electron app called 'MyLocalApp'. I need a Node.js script using
@electron/asarthat extractsapp.asar, dynamically finds and injects some CSS/JS into the.vite/builddirectory, and repacks it. It also needs to calculate the new ASAR SHA256, update anInfo.plistfile, and runcodesign --remove-signatureto fix local macOS signing. Please provide the complete Node.js script for this."
Once Claude gives you the script, just change the MyLocalApp paths in the code to point to your Claude installation path!
🛠️ Technologies Used
- Node.js: Core processor.
- @electron/asar: Safe extraction and repacking of Electron sources without breaking Native Modules.
- Inquirer: Interactive CLI menus.
- Chalk & Ora & Figlet: Beautiful colored UI and spinners.
- [Crypto]: Smart SHA256 calculation to spoof Apple's ASAR Integrity Check (
Gatekeeper Bypass).
🤝 Call for Contributors
We welcome pull requests from everyone!
🔗 Related Projects
- Antigravity-RTL: The auto-patcher for Right-to-Left (RTL) text and Vazirmatn font in the Antigravity AI-first development application.
⭐ Support the Project
If this tool made your Claude experience better, please consider Starring (⭐) this repository at the top of the page. It helps the project reach more users!
📜 License
Published under the completely permissive MIT License. You are free to modify, distribute, and use this code commercially. 🕊️
