import{_ as t,c as a,ag as i,o as s}from"./chunks/framework.C1C4sYC0.js";const u=JSON.parse('{"title":"Command Line Interface","description":"","frontmatter":{},"headers":[],"relativePath":"reference/cli.md","filePath":"en/reference/cli.md","lastUpdated":1719560776000}'),d={name:"reference/cli.md"};function o(r,e,n,c,l,h){return s(),a("div",null,e[0]||(e[0]=[i('
vitepress dev Start VitePress dev server using designated directory as root. Defaults to current directory. The dev command can also be omitted when running in current directory.
# start in current directory, omitting `dev`\nvitepress\n\n# start in sub directory\nvitepress dev [root]| Option | Description |
|---|---|
--open [path] | Open browser on startup (boolean | string) |
--port <port> | Specify port (number) |
--base <path> | Public base path (default: /) (string) |
--cors | Enable CORS |
--strictPort | Exit if specified port is already in use (boolean) |
--force | Force the optimizer to ignore the cache and re-bundle (boolean) |
vitepress build Build the VitePress site for production.
vitepress build [root]| Option | Description |
|---|---|
--mpa (experimental) | Build in MPA mode without client-side hydration (boolean) |
--base <path> | Public base path (default: /) (string) |
--target <target> | Transpile target (default: "modules") (string) |
--outDir <dir> | Output directory relative to cwd (default: <root>/.vitepress/dist) (string) |
--minify [minifier] | Enable/disable minification, or specify minifier to use (default: "esbuild") (boolean | "terser" | "esbuild") |
--assetsInlineLimit <number> | Static asset base64 inline threshold in bytes (default: 4096) (number) |
vitepress preview Locally preview the production build.
vitepress preview [root]| Option | Description |
|---|---|
--base <path> | Public base path (default: /) (string) |
--port <port> | Specify port (number) |
vitepress init Start the Setup Wizard in current directory.
vitepress init