Skip to main content

Find LitPage CLI Commands with --help

Find a command family, inspect the exact options for a subcommand, and recognize supported inputs and structured errors.

Use help when you know what you want to do and need the exact command. You can read help before configuring a Workspace Key. On the first run, npx may fetch the CLI from npm.

Find a command family

Run npx @litpage/cli --version to check the version, then use npx @litpage/cli --help to see the top-level commands.

TaskStart with
Check credentials and sitesnpx @litpage/cli doctor or npx @litpage/cli site --help
Create or update a landing pagenpx @litpage/cli page --help
Get YAML for a supported page blocknpx @litpage/cli block --help
Prepare a blog post or a changelog entrynpx @litpage/cli content template --help
Organize document roots and foldersnpx @litpage/cli docs --help
npx @litpage/cli --help
npx @litpage/cli page --help
npx @litpage/cli page publish --help

The top-level help points you to a command family. The second command lists the actions in that family. The final command describes the inputs for the action you intend to take. For example, npx @litpage/cli page publish takes a saved page file. The CLI generates the operation ID.. Help for npx @litpage/cli page pull instead accepts a public path or a page ID.

The page family in CLI 0.7.0 includes discovery, templates, offline validation, draft changes, publishing and readback. Use npx @litpage/cli page --help to see the exact commands available in your installed version.

Inspect the fields you need to write

Command options and content fields answer different questions. To see which arguments a command accepts, read that command's help. To see what goes inside a page block, use npx @litpage/cli block schema or npx @litpage/cli block example. To see the fields for a Markdown type, generate a local template and validate it.

npx @litpage/cli block schema PageHeader --variant compact
npx @litpage/cli block example PageHeader --variant compact --format yaml
npx @litpage/cli content template --help

Use a fresh output path when a command writes a file. If you want to overwrite a local file, first review the path and the supported overwrite option.

Distinguish help from a successful operation

Help and version are plain text. YAML returned by the block example command is ready to paste into a page file. Most command receipts are JSON. When running a setup or publishing command in automation, use both the exit code and the relevant receipt fields. The doctor command can return output that still asks you to complete setup. In CLI 0.7.0, an unknown help path such as npx @litpage/cli page unknown --help reports a structured validation error and exits with status 2.

ExampleResult
npx @litpage/cli docs --helpStatus 0 and help for the documentation commands
npx @litpage/cli page unknown --helpStatus 2 and an error with code VALIDATION_ERROR
npx @litpage/cli doctorRead the checks and data.status in the JSON result

Start with set up access when the key or site is unclear. Return to the first landing page tutorial when you are ready to try the commands.