For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /index.md.
close
  • English
  • Latest release v0.7.4

    Unified Toolchain forShipping JavaScript Faster

    One CLI unifies development, builds, testing, linting, and formatting across all your JavaScript projects. Powered by the Rspack ecosystem.

    rs devrs build

    From dev to production, fast

    Powered by Rspack and Rsbuild, start a dev server quickly and build enterprise-grade web applications

    • Build 5–20× faster than webpack
    • Built-in production optimizations for leaner bundles
    • A consistent bundling process for development and production
    $ rs build
    Rsbuild v2.0.0
    
    info    build started...
    ready   built in 0.02s
    
    File (web)                    Size     Gzip
    dist/static/js/index.js    0.20 kB  0.18 kB
    dist/index.html            0.32 kB  0.24 kB
    
                       Total:  0.52 kB  0.42 kB

    rs lib

    Your library, ready to ship

    Build reusable JavaScript libraries with Rslib, with the flexibility to develop shared libraries, CLI tools, and components

    • One configuration for ESM, CJS, Module Federation, and more
    • Choose bundle or bundleless output to suit your needs
    • Generate type declarations quickly with TypeScript 7
    $ rs lib --dts
    Rslib v1.0.0
    
    info    build started...
    ready   built in 0.02s
    start   generating declaration files...
    ready   declaration files generated
    
    File (esm)          Size
    dist/index.js    0.04 kB

    rs test

    Faster tests, instant feedback

    Test JavaScript with Rstest for fast feedback from local development to CI

    • Familiar Jest APIs
    • Rspack-powered tests, over 20% faster than Jest
    • Automatically reuse existing build configuration to reduce maintenance
    $ rs test
    Rstest v0.11.0
    
    src/utils.test.ts (2)
    src/app.test.ts (1)
    
     Test Files  2 passed
          Tests  3 passed
       Duration  211ms

    rs lintrs fmtrs check

    Consistent code. One command

    Unify linting and formatting checks while keeping your Prettier options and plugins

    • Type-aware linting with optional TypeScript type checking
    • Parallel formatting and persistent caching for faster repeat runs
    • Fix lint and formatting issues with --fix
    $ rs check
    
    start   Linting...
    success Lint passed in 287ms
    
    start   Checking formatting...
    success Format check passed in 25ms (7 files)

    rs hooksrs staged

    Better code in every commit

    Bring checks into your commit workflow, reuse lint-staged task configuration, and migrate existing Husky hooks

    • Manage repository-wide Git hooks in one place
    • Check and format staged files before each commit
    • Match files with glob patterns and run custom tasks
    $ rs staged
    
    Done backing up original state!
    rs lint --fix
    rs fmt
    Done running tasks for staged files!
    Done staging changes from tasks!
    Done cleaning up temporary files!

    rs doc

    Great docs, built right in

    Build documentation sites with Rspress and maintain docs alongside your code

    • Write Markdown and embed React components with MDX
    • Built-in search and multilingual documentation
    • One CLI for development, production builds, and local previews
    $ rs doc
    Rspress v2.0.0
    
    Local: http://localhost:3000/
    Network: use --host to expose
    
    start   build started...
    ready   built in 0.18s