CLI

Run CarvePress with carve-press <command> [options]. If the first argument is an option, build is assumed.

Commands

CommandDescription
buildBuild the site.
routesPrint discovered routes and source files.
devBuild, serve, watch, and live reload.
serveServe the existing outDir.
initScaffold a new site.
new <path>Create a new page under srcDir.
helpPrint help.

Flags

FlagApplies ToDefaultDescription
--root <dir>all commandscurrent working directoryProject root.
--port <n>dev, serve5173 for dev, 4173 for serveServer port from 0 through 65535; invalid values fall back.
--host <host>dev, serve127.0.0.1Server host.
--opendevoffOpen the dev server URL in a browser.
--forceinitoffAllow scaffold files to be overwritten.
--title <title>newtitle-cased file namePage title for a new page.
--helpall commandsoffPrint help.
--versionall commandsoffPrint the package version.

Examples

common commands
carve-press build
carve-press routes --root .
carve-press dev --host 0.0.0.0 --port 5173
carve-press serve --port 4173
carve-press init --force
carve-press new guide/install --title "Install"

Unknown commands print usage and exit with a non-zero status. User-facing build errors are formatted without raw stack traces.

Edit this page

Last updated