# Command Line Interface
VuePress CLI is provided by @vuepress/cliopen in new window package. It is a dependency of the vuepressopen in new window package, and you can also install it separately.
Run vuepress --help
to get following help messages:
Usage:
$ vuepress <command> [options]
Commands:
dev [sourceDir] Start development server
build [sourceDir] Build to static site
info Display environment information
For more info, run any command with the `--help` flag:
$ vuepress dev --help
$ vuepress build --help
$ vuepress info --help
Options:
-v, --version Display version number
-h, --help Display this message
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# dev
Start a development server to develop your VuePress site locally.
Usage:
$ vuepress dev [sourceDir]
Options:
-c, --config <config> Set path to config file
-p, --port <port> Use specified port (default: 8080)
-t, --temp <temp> Set the directory of the temporary files
--host <host> Use specified host (default: 0.0.0.0)
--cache <cache> Set the directory of the cache files
--clean-cache Clean the cache before dev
--open Open browser when ready
--debug Enable debug mode
--no-watch Disable watching page and config files (default: true)
-v, --version Display version number
-h, --help Display this message
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
提示
Options set by CLI will override those options with the same name in your config file.
# build
Build your VuePress site to static files, which are ready for deployment.
Usage:
$ vuepress build [sourceDir]
Options:
-c, --config <config> Set path to config file
-d, --dest <dest> Set the directory build output (default: .vuepress/dist)
-t, --temp <temp> Set the directory of the temporary files
--cache <cache> Set the directory of the cache files
--clean-cache Clean the cache before build
--debug Enable debug mode
-v, --version Display version number
-h, --help Display this message
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
提示
Options set by CLI will override those options with the same name in your config file.
# info
Outputs information about your system and dependencies.
This command would be helpful when you want to check your environment or report an issue.