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-analyzer

v0.8.1

Published

RTL analysis with isolated review, accepted-only Apply and receipt-backed rollback

Readme

RTL Analyzer

Find direction-dependent styles, inspect suggested fixes, and review changes for RTL and LTR interfaces.

Quick start · Video tutorials · Workflow · Example projects · Limits · Advanced setup guide

Video tutorials

| English | العربية | | :--- | :--- | | RTL Analyzer Tutorial: Find and Fix RTL Issues in React, Step by Step (English) | RTL Analyzer بالعربي: اكتشف وحل مشاكل RTL في React خطوة بخطوة | | RTL Analyzer Tutorial: Find & Fix RTL Issues in React, Step by Step. Scan a React project, review the findings and apply fixes. | RTL Analyzer بالعربي: اكتشف وحل مشاكل RTL في React خطوة بخطوة. مسح مشروع React ومراجعة النتائج وتطبيق الإصلاحات. | | Watch on YouTube | شاهد على YouTube |

Quick start

Requirements: Node.js 22.12 or later, on macOS or Linux. Windows is not supported in this release (see what is and is not covered).

Run from your frontend project's root:

npx rtl-analyzer

This scans the current directory, writes the reports to a temporary folder outside your project, and opens the dashboard in your browser. Your project files do not change unless you approve an Apply.

  • Dashboard: the scan summary, the findings, and a shareable report.
  • Fix Studio: open a finding to compare the original and the suggested change, then approve, validate, or roll back.
  • Live Before/After starts your project's development server for you. This works for projects that ship a rtl-preview.config.json (see Project scripts), or that you set up in the dashboard with Guided Setup. Install the project's dependencies first; if they are missing, the dashboard says so and the static report stays available.
npm ci            # once, in your project (npm install, pnpm install, or yarn install also work)
npx rtl-analyzer

In an interactive terminal the dev server starts by default. In scripts and CI (no terminal), add --approve-project-scripts. To skip starting the dev server, run npx rtl-analyzer --no-project-scripts.

Which version runs?

npx rtl-analyzer runs npm's latest tag, the current stable release. A project that already depends on rtl-analyzer uses its installed version instead.

| Command | Runs | | --- | --- | | npx rtl-analyzer | latest stable release (latest) | | npx rtl-analyzer@next | latest prerelease, for testing (next) | | npx rtl-analyzer@<version> | an exact version, for reproducible runs |

latest is the current stable release. To try a prerelease before it reaches latest, use npx rtl-analyzer@next.

Project scripts

Live Before/After runs one script from your project, and only when rtl-preview.config.json names it under an application's startupScript. RTL Analyzer runs that script (for example npm run dev) in the project root, with --host 127.0.0.1 --port <port> --strictPort. It never runs other scripts or discovered commands, and it never installs packages or changes lockfiles.

Security: the script is your project's own code, the same code that npm run dev runs. Run npx rtl-analyzer only in projects you trust. Projects without rtl-preview.config.json never have a script run, unless you approve one in Guided Setup. To turn project scripts off, use npx rtl-analyzer --no-project-scripts; this also turns Guided Setup off, and the static report is still produced. --approve-project-scripts is still accepted.

If dependencies are missing, the dashboard shows "Live Preview needs setup" with the project path and the install command for your package manager.

Startup time and status. The dev server has 60 seconds to answer by default. Set startupTimeoutMs (10000 to 180000 milliseconds) on an application in rtl-preview.config.json to change it. While the preview starts, the Before and After panels each show their own loading status and render as soon as their preview is ready, with no page reload. If a preview fails or runs out of time, the dashboard names the cause and offers Retry Preview, Continue with Report, and Copy Diagnostics.

Guided Setup (no configuration file)

In an interactive terminal, a project without rtl-preview.config.json opens Guided Setup in the dashboard. No rtl-preview.config.json is written, and nothing runs until you approve the exact plan it shows (the command, the port, the routes and the ready selector). Starting a preview does generate runtime files in your project, under .rtl-preview/ and .rtl-vite-cache/; they are kept after the preview stops and are safe to delete (consider adding them to .gitignore).

  • Applications: it lists the Vite applications it finds, with the dev or dev:<application> script that starts each one. Select one or several; several start together after a single approval.
  • Auto Detect inspects an application that is already running and verifies its language/direction switch and ready selector. If the application is not running, or Auto Detect cannot verify it, open Advanced Options and enter the Preview URL, language parameter and ready selector yourself ("Use these settings"). Manual settings are the normal path when you start from a stopped project.
  • Start runs the approved script on the port shown in the plan: the application's declared port if it is free, otherwise the next free one. An application that is already running is not reused.
  • Status: each application shows Running, Failed or Stopped with its address, and has its own Stop and Retry. One failing application does not change another.
  • Review and Apply: each application gets its own isolated candidate. A change to a file outside every application folder (for example a shared library) can affect all of them, so Apply asks you to acknowledge each affected application first; the server refuses it otherwise.
  • Limits: Live Preview from Guided Setup covers plain CSS class findings; other findings stay available for review in code without a live preview and cannot be approved there.

Scan one folder, or show help:

npx rtl-analyzer scan ./src --format json
npx rtl-analyzer --help

A read-only scan needs no configuration. Live Fix Studio review does need configuration: explicit scan and copy scope, validation scripts, source-to-page bindings, your project's installed dependencies, and Chromium. The advanced setup guide covers it. To try the whole flow first, use one of the example projects.

How a review works

The screenshots below come from an earlier release (0.4.0) running on the Workspace Integration example: a shared badge whose margin-left: 8px should follow the text direction. The dashboard layout in newer versions may differ slightly.

1. Run the scan and open Fix Studio

Scan with a dashboard report and embedded source snippets, serve the report, and start the review companion. The dashboard reports the scan result and the number of findings.

RTL Analyzer dashboard header after a completed scan: "Scan complete, analyzed 15 files, 2 findings".

2. Choose a review mode

Prepare all, then review prepares every eligible change in one isolated candidate so you can review them together. Review one by one prepares only the finding you are looking at. Both modes start with every decision Pending, and neither changes your source.

Fix Studio's review-mode chooser with the two options "Prepare all, then review" and "Review one by one".

3. Find the finding in your code and on the page

Each finding shows its highlighted source line and why it was flagged. For findings with a configured page binding, Highlight targets outlines the affected element in the running page.

A finding open in Fix Studio: the highlighted line "margin-left: 8px;" in the stylesheet, the rule explanation, and the highlighted element in the rendered page.

4. Compare Before and After

The code card shows the original declaration next to the suggested one. The live panes render the original application (Before) and an isolated copy with the change (After). Switch between LTR and RTL, and between apps when a finding is bound to more than one. In one-by-one mode, After shows only the finding you selected.

Before and After live panes side by side in RTL, with the badge outlined in both.

5. Make a decision

Choose Approve proposed change, Reject fix, Defer or Needs review. Approving adds the change to your accepted set. Your project files still have not changed.

Confirmation after approving a change: "Added to your accepted changes. Your project files have not changed."

6. Validate the accepted changes

Validate changes runs your configured checks, and a scoped LTR/RTL runtime check, against a candidate that contains only the accepted changes.

Dialog "Validation passed: 1 changes validated. Your original source files have not changed."

7. Apply to source, explicitly

Applying is a separate step. The confirmation names the destination project and every file that will be written. Rejected, deferred and unaccepted findings are excluded, and Apply creates receipt-backed backups.

The "Apply changes to source" confirmation listing the destination project and the affected file.

Afterwards, check your diff and the interface in both directions.

Fix Studio after Apply, with the accepted change recorded as applied.

8. Roll back if needed

Review actions → Rollback applied changes restores the files from the receipt. Rollback is refused if you edited the files after Apply, so it never overwrites your later work.

The Review actions menu showing "Rollback applied changes".

Batch mode: prepare eligible changes, then approve selected ones

In Prepare all, then review, the batch overview lists every change that could be prepared. Nothing is approved automatically. Select the rows you want, Approve selected, then Validate and apply as above. Preparing a batch never writes to your source; applying it requires the same explicit confirmation. Use View diff to inspect any row.

Batch review overview with two prepared fixes, a row checkbox for each, and the buttons Select all prepared, Approve selected and Validate.

If your source or your decisions change during a review, freshness checks can invalidate a suggestion or a validation. Failed or unavailable required evidence blocks Apply.

What is and is not covered

Verified on macOS with Chromium at desktop width for the 0.4.0 release:

  • Suggested fixes and live Before/After for literal physical margin-*, padding-* and text-align in simple class rules of stylesheets you declare as custom-css, and for other declarations (borders, offsets, transforms) you declare yourself in cssProposals (CSS proposal setup).
  • Findings without a safe automatic fix (for example fixed-edge positioning, ordering, transforms) are reported with an explanation and marked for manual review; you still get the Before view.
  • Detection only: recognized utility classes and bounded SCSS declarations.
  • Live preview supports Vite-compatible development scripts, including an Nx workspace that runs Vite. Next.js apps can be scanned statically, but live preview is not supported.
  • Not detected: JavaScript key handling, focus order and other behavior that is not expressed in styles.

A scan reports potential issues; it does not prove a page renders correctly. Windows is not supported in v0.8.0. The one-command dashboard and --output-dir report output are refused on Windows with unsupported platform/filesystem profile and exit code 2; nothing is written, and existing report files are left unchanged. Source snippets fail closed (UNSUPPORTED_NOFOLLOW) on Windows, so findings show as unavailable. Because the review workflow starts from the dashboard, it is not reachable through the packaged CLI on Windows in this release. Validation commands run only with npm on Windows; pnpm and yarn are refused. Windows support is planned for v0.6.0. Report publication and protected source operations use a trusted POSIX filesystem profile (macOS and Linux). Safari, package managers other than npm and general framework compatibility are not certified. Project scripts must be trusted.

Example projects

Six runnable projects live in the repository under examples/. They are not part of the npm package. Copy one to a temporary folder before you apply anything.

| Project | What it shows | | --- | --- | | Foundations Lab | Direction, spacing, edges, transforms in a Vite app | | Account Checkout | Two supported fixes, one manual-review case, clean controls | | Admin Dashboard | Tables, dialog and tabs; several manual-review findings | | Bilingual Storefront | Next.js and Tailwind; static scan only | | Interaction Playground | Drawer, rating and slider; scanner finds CSS risks, not key handling | | Workspace Integration | Nx workspace, two apps and a shared library |

Each project's README has its setup instructions and expected findings. The hands-on testing guide walks through all six.

Development

The public package is built from this repository's own scanner source (tools/rtl-scanner); there is no submodule. Consumers install rtl-analyzer; the internal @atlas/rtl-scanner package is private. Clone the repository and follow the build, pack and verification commands. Licensed under MIT.