Quick start
Copy this prompt and send it to your AI agent. It will scaffold a new Rspress site for you automatically.
Environment preparation
Rspress supports using Node.js, Deno, or Bun as the JavaScript runtime.
Use one of the following installation guides to set up a runtime:
Rspress requires Node.js version 20.19+, 22.12+.
Online example
You can try Rspress directly in CodeSandbox.
Create a Rspress project
The recommended way to start a new Rspress project is to use the create-rspress scaffold:
The scaffold will ask for the project name or path, whether to set up a custom theme folder, and which optional tools or skills to add.
After the project is created, follow the next steps printed in the terminal:
The dev server will print the local URL after startup. Open it in your browser to view the generated documentation site.
Templates
Rspress provides the following built-in templates:
Optional tools
During project creation, you can select optional tools for linting or formatting:
Optional skills
If you plan to maintain the documentation site with an AI agent, you can select optional Agent Skills during project creation. The CLI will generate a .agents/skills directory in your project and add the selected skills there.
For most documentation sites, we recommend selecting:
- rspress-best-practices: provides Rspress project structure, config, MDX, theme, and deployment guidance for AI agents.
- rspress-description-generator: helps AI agents write and maintain page descriptions for SEO, search, and AI-readable outputs.
If you choose the custom-theme template, the following skill is selected by default:
- rspress-custom-theme: enables your AI agent to customize the Rspress theme, such as CSS variables, layout slots, and theme component overrides.
These skills do not affect the runtime behavior of your Rspress site. They only provide local guidance for AI agents when editing or maintaining the project. If you do not use an AI agent, you can deselect them or press Enter to skip this option.
For more information about Agent Skills and other AI-related capabilities, see AI.
Current directory
To create a project in the current directory, enter . as the project path when prompted:
If the current directory is not empty, the CLI will ask whether to continue and overwrite files.
Non-interactive mode
You can pass CLI options to create a project without interactive prompts:
You can also add Agent Skills explicitly:
All CLI flags supported by create-rspress:
Manual setup
If you want to add Rspress to an existing project or create the minimal files yourself, start by creating a directory:
Initialize a package.json:
Install Rspress:
Create the first document:
Add the following scripts to package.json:
Create a configuration file:
Create tsconfig.json:
Start dev server
Start the local development server with the following command:
For the dev command, you can specify the port number or host of the development server with the --port or --host parameter, such as rspress dev --port 8080 --host 0.0.0.0.
Build for production
Build the production bundle with the following command:
By default, Rspress will output the production files to the doc_build directory.
Preview locally
Start the local preview server with the following command:
The preview server serves the production output from doc_build.
Next steps
- Read Basic features to learn routing, home pages, static assets, deployment, and other common documentation site features.
- Read Use MDX to learn how to write MDX and use components in documentation.
- Read Configuration to learn all supported Rspress config options.