CLI Commands

All commands are run from your repo root where zpress.config.ts lives.

npx zpress <command> [flags]

setup

Initialize a zpress config file in the current project.

zpress setup

Writes a starter zpress.config.ts if one does not already exist. Skips with a warning if the file is already present.

sync

Sync documentation sources into the .zpress/ directory.

zpress sync [--quiet]
FlagTypeDefaultDescription
--quietbooleanfalseSuppress non-error output

Resolves all entries in the config, copies source files into .zpress/content/, merges frontmatter, and generates sidebar and nav JSON files in .zpress/content/.generated/.

dev

Start the dev server with live reload.

zpress dev [--quiet] [--clean]
FlagTypeDefaultDescription
--quietbooleanfalseSuppress non-error output
--cleanbooleanfalseRemove build artifacts before starting

Runs sync first, starts a file watcher on all source files, and launches the Rspress dev server. Changes to source markdown files are detected and re-synced automatically.

build

Build the static site for production.

zpress build [--quiet] [--clean]
FlagTypeDefaultDescription
--quietbooleanfalseSuppress non-error output
--cleanbooleanfalseRemove build artifacts before building

Runs sync first, then builds the Rspress site. Output is written to .zpress/dist/.

serve

Preview the production build locally.

zpress serve [--no-open]
FlagTypeDefaultDescription
--no-openbooleanfalseDon't open browser automatically

Starts a local static file server pointed at .zpress/dist/. Requires a prior zpress build.

clean

Remove build artifacts, synced content, and build cache.

zpress clean

Deletes the following directories:

DirectoryContents
.zpress/cache/Build cache
.zpress/content/Synced pages
.zpress/dist/Build output

Safe to run at any time — all directories are regenerated by sync and build.

dump

Resolve and print the full entry tree as JSON.

zpress dump

Loads the config, resolves all entries (including glob patterns and recursive discovery), and outputs the resolved navigation tree to stdout. Useful for debugging the information architecture.

Output includes text, link, collapsible, hidden, isolated, and nested items for each entry.

generate

Generate branded banner and logo SVG assets from the project title.

zpress generate

Reads the title (and optional tagline) from zpress.config.ts, generates banner and logo SVGs, and writes them to .zpress/public/. If no title is configured, asset generation is skipped. Files that have been manually customized are not overwritten.