Project Command
Less than 1 minute
This tutorial provides an overview of the essential commands for managing your VuePress project.
Common Commands
vuepress dev <dir>: Starts a development server for local preview with hot-reloading.vuepress build <dir>: Compiles your site into optimized static files for production deployment.
Using Template Scripts
If you are using the VuePress Theme Hope template, the following scripts are pre-defined in your package.json:
{
"scripts": {
"docs:build": "vuepress build src",
"docs:clean-dev": "vuepress dev src --clean-cache --clean-temp",
"docs:dev": "vuepress dev src"
}
}You can use these shortcuts with your preferred package manager:
pnpm
pnpm docs:dev: Starts the development server.pnpm docs:build: Builds the project and generates output.pnpm docs:clean-dev: Clears the cache and starts the development server.
yarn
yarn docs:dev: Starts the development server.yarn docs:build: Builds the project and generates output.yarn docs:clean-dev: Clears the cache and starts the development server.
npm
npm run docs:dev: Starts the development server.npm run docs:build: Builds the project and generates output.npm run docs:clean-dev: Clears the cache and starts the development server.
Terminating Development Server
To stop the development server, focus on the terminal and press Ctrl + C.
Update Version
To upgrade your theme and VuePress version to the latest, execute the following command:
pnpm
pnpm dlx vp-updateyarn
yarn dlx vp-updatenpm
npx vp-updateChangelog
3/8/26, 8:40 AM
View All Changelog
4f20d-on6ca3e-onf3e43-on8289f-on6c081-on01cd9-on93784-ond45fd-on2a306-ond8d58-on24b0b-on774f1-on5e7ca-on8174c-ona0c8a-on01bca-onec469-on6af05-one5834-on23515-on9cdd7-on63d09-onad023-onfd395-on52ff1-on9e3b2-on