Commands
This page introduces the built-in Rspress commands and their common options.
For dev, build, and preview, the optional [root] argument specifies the docs root directory. If omitted, Rspress uses root from the config file, or docs in the current directory when root is not configured.
rspress dev
The rspress dev command starts a local development server for previewing and debugging your docs.
rspress build
The rspress build command builds the documentation site for production.
rspress preview
The rspress preview command is used to preview the output files of the rspress build command locally.
rspress eject
The rspress eject command copies a built-in theme component to your project so you can customize it.
The optional [component] argument is the theme component to eject. If omitted, Rspress lists all ejectable components.
After ejection, the component files are placed in theme/components/<ComponentName>. Re-export the component in theme/index.tsx to use your customized version.