npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@devsamhan/arabic-devtools

v0.1.2

Published

Arabic-aware CLI toolkit for development workflows — devsamhan-arabic

Readme

@devsamhan/arabic-devtools

أدوات سطر الأوامر للمطور العربي — اكتشاف مشاكل النصوص العربية في المشاريع.

ملاحظة مهمة: النسخة 0.1.2 للتشخيص فقط — لا تعديل تلقائي للملفات. لا يوجد خيار --fix في هذه النسخة. راجع النتائج يدوياً قبل إجراء أي تغيير.

التثبيت

npm install -g @devsamhan/arabic-devtools

الأوامر

check-rtl <المسار>

يكتشف النصوص العربية المكتوبة بالعكس داخل الملفات.

أمثلة على الأخطاء المكتشفة:

  • ثحب بدلاً من بحث
  • دمحم بدلاً من محمد
  • فلم بدلاً من ملف
arabic-devtools check-rtl ./lib
arabic-devtools check-rtl ./src --format json
arabic-devtools check-rtl ./src --severity-threshold high

الكود: AR001 — مستويات الثقة: عالٍ (قاموس) / متوسط / منخفض

يخرج بكود 1 عند وجود نتائج، 0 عند النظافة.


scan <المسار>

يفحص الملفات أو المجلدات عن مشاكل عربية شائعة:

  • AR002 — تطويل زائد: مـحـمـد
  • AR003 — تشكيل داخل مفاتيح البحث: مُحَمَّد
  • AR004 — خلط أرقام شرقية وغربية: رقم ١٢3
  • AR001 — نصوص عربية مقلوبة (كما في check-rtl)
arabic-devtools scan ./lib
arabic-devtools scan ./src --format json
arabic-devtools scan ./src --severity-threshold medium

في بيئة CI:

arabic-devtools scan . --format json

يخرج بكود 1 عند وجود نتائج، 0 عند النظافة.


bidi "<النص>"

يحوّل النص العربي ليظهر بشكل صحيح في الطرفيات التي لا تدعم العربية أصلاً.

arabic-devtools bidi "مرحبا بالعالم"
arabic-devtools bidi "مرحبا بالعالم" --reshape-only
arabic-devtools bidi "مرحبا بالعالم" --no-reorder
arabic-devtools bidi "مرحبا بالعالم" --no-reshape

| الخيار | الوصف | |--------|-------| | (بدون خيارات) | تشكيل الحروف + إعادة الترتيب | | --reshape-only | تشكيل الحروف فقط بدون إعادة ترتيب | | --no-reorder | نفس --reshape-only | | --no-reshape | إعادة الترتيب فقط بدون تشكيل الحروف |

تحذير: الطرفيات الحديثة (Windows Terminal، iTerm2، GNOME Terminal) تعرض العربية صحيحاً بدون الحاجة لهذا الأمر. استخدم bidi فقط إذا ظهر النص مقلوباً في بيئتك. إذا ظهر الخرج أسوأ، جرّب --no-reorder أو تجاهل هذا الأمر كلياً.

يخرج دائماً بكود 0 (ما لم يغب المعامل).


رموز القواعد

| الكود | الاسم | الخطورة | |-------|-------|---------| | AR001 | potentially-reversed-arabic-literal | عالية / متوسطة / منخفضة | | AR002 | excessive-tatweel | متوسطة | | AR003 | tashkeel-in-search-key | متوسطة | | AR004 | mixed-digit-scripts | منخفضة |

جميع النتائج تشخيصية — لا إصلاح تلقائي.

التفاصيل الكاملة في docs/rules.md.


مثال على مخرجات JSON

arabic-devtools check-rtl ./src --format json
{
  "tool": "arabic-devtools",
  "command": "check-rtl",
  "findings": [
    {
      "code": "AR001",
      "type": "potentially-reversed-arabic-literal",
      "severity": "high",
      "file": "src/strings.txt",
      "line": 12,
      "column": 18,
      "found": "ثحب",
      "suggestion": "بحث",
      "message": "Potentially reversed Arabic literal"
    }
  ]
}

فلترة حسب الخطورة

arabic-devtools scan ./src --severity-threshold high
  • low (الافتراضي) — كل النتائج
  • medium — متوسط وعالٍ فقط
  • high — عالٍ فقط

المكتبات المستخدمة

الترخيص

MIT — Devsamhan