@react-router-modules/cli
v2.0.2
Published
Scaffolding CLI for the modular-react framework (React Router integration). Creates projects, modules, and stores with full wiring.
Readme
@react-router-modules/cli
Scaffolding CLI for the modular-react framework (React Router integration). Creates projects, modules, and stores with full wiring.
Commands
react-router-modules init <name> --scope @myorg --module dashboard # New project
react-router-modules create module <name> --route billing # New module
react-router-modules create store <name> # New Zustand storeAll commands support interactive (prompts) and non-interactive (flags) modes. See the main README for full documentation.
Development
Requires Node.js 22+.
pnpm build # Compile TypeScript
pnpm dev # Watch modeTesting
Unit tests (cli-testlab)
Tests CLI commands by executing them as child processes and asserting on output and generated files.
pnpm testE2E tests (Playwright)
Smoke tests that validate the full framework end-to-end: scaffold a project via CLI, start the dev server, and interact with the served UI using Playwright.
pnpm test:e2e:setup # Scaffold project, build framework, install deps
pnpm test:e2e:server # Start vite dev server on port 5188 (run in background)
pnpm test:e2e # Run Playwright tests against the running serverThe setup script uses link: overrides to point @react-router-modules/core and @react-router-modules/runtime to the local built packages.
To re-scaffold from scratch:
pnpm clean # Remove dist + test artifacts
pnpm build # Rebuild CLI
pnpm test:e2e:setup # Re-scaffold