Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 1.73 KB

File metadata and controls

81 lines (55 loc) · 1.73 KB
title CLI Commands
description Chronicle CLI commands reference.
order 2

CLI Commands

Chronicle provides a CLI to initialize, develop, build, and serve your documentation site.

init

Initialize a new Chronicle project. Must be run before other commands.

chronicle init [options]
Flag Description Default
-c, --content <path> Content directory name content

This creates:

  • chronicle.yaml — site configuration
  • content/ (or custom name) — content directory with a sample index.mdx
  • package.json — with @raystack/chronicle dependency (if not exists)
  • .chronicle/ — scaffolded build directory
  • .gitignore — with .chronicle entry

If the content directory already exists and has files, the sample index.mdx is skipped.

dev

Start the development server with hot reload. Requires chronicle init first.

chronicle dev [options]
Flag Description Default
-p, --port <port> Port number 3000

build

Build the site for production. Requires chronicle init first.

chronicle build

start

Start the production server. Requires a prior chronicle build.

chronicle start [options]
Flag Description Default
-p, --port <port> Port number 3000

serve

Build and start the production server in one step. Requires chronicle init first.

chronicle serve [options]
Flag Description Default
-p, --port <port> Port number 3000

Config Resolution

chronicle.yaml is resolved in this order:

  1. Current working directory
  2. Content directory