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+.
1. Initialize the project
Method 1: create via CLI
You can create a Rspress project using the create-rspress cli:
Input the project directory name, and then the cli will create the project for you.
Using Agent Skills
If you plan to maintain the documentation site with an AI agent, you can select 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 to customize the default theme, you can also select:
- 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 press Enter to skip this option.
For more information about Agent Skills and other AI-related capabilities, see AI.
Method 2: manual creation
First, you can create a new directory with the following command:
Execute npm init -y to initialize a project. You can install Rspress using npm, pnpm, yarn or bun:
Then create the file with the following command
Add the following script to package.json:
Then initialize a configuration file rspress.config.ts:
And then create tsconfig.json, add the following config:
2. Start dev server
Start the local development service with the following command:
For the dev command, you can specify the port number or host of the development service with the --port or --host parameter, such as rspress dev --port 8080 --host 0.0.0.0.
3. Build in production
Build the production bundle with the following command :
By default, Rspress will set doc_build as the output directory.
4. Preview in local environment
Start the local preview service with the following command: