amElnagdy/claude-arabic-bidi
Claude Code rendering plugin for mixed Arabic and English text
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
This TypeScript Claude Code plugin sits in the message-drawing path rather than the model or conversation-storage path. hooks/register.ts wires the rendering hook, and hooks/bidi.ts implements the bidirectional formatting. The repository includes .claude-plugin/ and tsconfig.json; no separate service or MCP transport is part of the described integration.
The formatter decides line by line whether to apply Arabic layout. It adds a leading right-to-left mark (RLM), encloses a qualifying line in an RTL isolate, and applies LTR isolation to English words, paths, or other technical fragments where the Markdown handling permits it. The same display-layer approach covers user messages and Claude replies without rewriting stored conversation text.
Key Capabilities & Differentiators
In a mostly Arabic reply, any line containing an Arabic word is treated as Arabic. Otherwise, a line qualifies when its first letter is Arabic or its Arabic word count is at least half its English word count. Arabic punctuation alone does not qualify, and an English reply that merely quotes an Arabic word can remain LTR. The intended result is an RTL, right-aligned sentence even after an opening term like React, without reversing the punctuation in .env, init(), or 40%.
The formatter preserves bold, italic, strikethrough, and bracket pairing. It can adjust link labels while leaving link destinations and reference-link definitions untouched. Inline code and fenced code blocks, including nested fences and ~~~ fences, are left unmarked, as are English-only text and English-only table cells. Four-space indented code blocks are not detected.
Trade-offs & Limitations
Compared with stock rendering based on the first letter, the plugin makes a better distinction between an English-led Arabic sentence and an English sentence quoting Arabic. That distinction is heuristic: it depends on reply-level language context and line-level word counts, so teams should test short, terminology-heavy lines from their own work. Switching terminal emulators addresses how isolates render, but does not by itself change how Claude Code decides which lines are Arabic.
The desktop Code tab renders isolates fully, whereas terminal results depend on the emulator. The main copy/paste trade-off is that manual selections from Arabic prose can include invisible marks. Use inline code or fenced blocks for exact command copying; do not assume that four-space indented code gets the same protection. MIT allows commercial use and modification subject to its notice requirements.
Hardware & Deployment Guide
The host is Claude Code. In an interactive session, run /plugin install arabic-bidi --marketplace amElnagdy/claude-arabic-bidi, approve adding the marketplace, and select user scope to activate it across sessions. The shell equivalent is claude plugin install arabic-bidi --marketplace amElnagdy/claude-arabic-bidi. The desktop app uses the Plugins picker to add that marketplace and install the plugin; a user-scoped terminal installation also loads in the desktop Code tab.
No standalone server, separate model, or GPU setup is part of this installation path. For local development, run claude plugin validate . and claude plugin test . from the repository root. There is no published GitHub release milestone to use as a compatibility checkpoint. Before rolling it out, test representative mixed-language Markdown and copied commands on the clients your team actually uses.
hooks/register.ts attaches hooks/bidi.ts to Claude Code message drawing for both prompts and replies..env, init(), and 40%.Claude Code users who write or read Arabic technical prose mixed with English identifiers, paths, and commands, especially in the desktop Code tab or a terminal that renders Unicode isolates correctly.
Stock rendering is already adequate, your terminal still mishandles isolates, or your workflow requires copied prose to be character-for-character identical to the original.
Quick Start & Installation
claude plugin install arabic-bidi --marketplace amElnagdy/claude-arabic-bidiAI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/amElnagdy/claude-arabic-bidi.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about claude-arabic-bidi
Where does the plugin intercept text, and does it rewrite the conversation?
hooks/register.ts hooks into message drawing; hooks/bidi.ts handles the bidirectional formatting. Both user messages and Claude replies are affected at display time. Stored conversation text is unchanged, but manually selected prose can contain the added Unicode marks.Does it need a GPU, and what runtime overhead should we expect?
Can a commercial team use or modify it, and does that make Claude Code self-hosted?
Should we install the plugin or just switch to a terminal with better RTL support?
React is Arabic or preserving punctuation around .env. Try your terminal and the desktop Code tab with the same examples. If stock rendering already handles your workload, the plugin adds little value and introduces invisible marks into copied prose.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy