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

@rtl-first/arabize

v0.1.1

Published

Arabize any open-source platform with one command — the master script for forkers

Readme

@rtl-first/arabize

Arabize any open-source platform with one command.

npx @rtl-first/arabize ./my-fork

That's it. One command does everything:

  1. Detects your framework (Next.js, Nuxt, Remix, Vite, Angular...)
  2. Injects dir="rtl" and lang="ar" on the root HTML element
  3. Copies source locale → ar.json and updates your i18n config
  4. Generates a LocaleSwitcher component (React or Vue)
  5. Creates rebaseable CSS patches in .rtl-patches/

Part of the rtl-first framework.

Example Output

  ╔══════════════════════════════════════╗
  ║   rtl-first / arabize                ║
  ║   Arabize any platform — one command  ║
  ╚══════════════════════════════════════╝

  Framework:   Next.js (App Router)
  Target:      ar
  CSS issues:  147 physical properties in 23 files
  Locale:      Found nested-dirs in i18n/

  ──────────────────────────────────────

  ✓  Direction Injection (Layer 2)
     → Added dir="rtl" to <html> element
     → Added lang="ar" to <html> element

  ✓  Locale Scaffolding (Layer 4)
     → Created i18n/ar/common.json (2,313 keys)
     → Updated i18n/language.ts — added ar locale
     → Generated LocaleSwitcher.tsx

  ✓  Patch Generation (Layer 3)
     → 02-css-logical.sh: Convert CSS physical → logical (23 files)

  ──────────────────────────────────────

  ✓ All 3 steps completed in 0.8s

  Next steps:
  1. Translate the locale files in i18n/
  2. Apply CSS patches: bash .rtl-patches/apply-all.sh --layer 3
  3. Test your app in Arabic
  4. Run npx @rtl-first/audit ./ for detailed report

Usage

# Arabize (default: Arabic)
npx @rtl-first/arabize ./my-fork

# Preview changes first
npx @rtl-first/arabize ./my-fork --dry-run

# Hebrew instead of Arabic
npx @rtl-first/arabize ./my-fork --lang he

# Mark untranslated strings with [AR] prefix
npx @rtl-first/arabize ./my-fork --stub prefix

# Skip specific steps
npx @rtl-first/arabize ./my-fork --skip-css
npx @rtl-first/arabize ./my-fork --skip-locale
npx @rtl-first/arabize ./my-fork --skip-direction

# JSON output (for CI)
npx @rtl-first/arabize ./my-fork --json

After Upstream Rebase

git rebase upstream/main
bash .rtl-patches/apply-all.sh

What Gets Created

your-fork/
├── src/app/layout.tsx          ← modified: dir="rtl" lang="ar"
├── i18n/ar/                    ← new: Arabic locale files
├── rtl-overrides/
│   └── components/
│       └── LocaleSwitcher.tsx  ← new: language switcher component
└── .rtl-patches/
    ├── 02-css-logical.sh       ← CSS codemod script
    ├── apply-all.sh            ← run after every rebase
    ├── health-check.sh         ← fork health metrics
    └── README.md               ← usage docs

Part of rtl-first

This is the master script that orchestrates three tools:

| Tool | What it does | |------|-------------| | @rtl-first/direction-injector | Injects dir="rtl" + lang | | @rtl-first/locale-scaffolder | Scaffolds ar.json + config | | @rtl-first/patch-generator | Generates rebaseable patches |

The full rtl-first framework includes 8 packages for builders, contributors, and forkers.

License

MIT