CLI Commands
CLI Commands
Chronicle provides a CLI to initialize, develop, build, and serve your documentation site.
init
Initialize a new Chronicle project.
chronicle init [options]| Flag | Description | Default |
|---|---|---|
-c, --content <path> | Content directory name | content |
This creates:
chronicle.yaml— site configurationcontent/(or custom name) — content directory with a sampleindex.mdx.gitignore— withnode_modules,dist,.outputentries
If the content directory already exists and has files, the sample index.mdx is skipped.
dev
Start the development server with hot reload.
chronicle dev [options]| Flag | Description | Default |
|---|---|---|
--content <path> | Content directory | content |
--config <path> | Path to chronicle.yaml | ./chronicle.yaml |
-p, --port <port> | Port number | 3000 |
--host <host> | Host address | localhost |
build
Build the site for production.
chronicle build [options]| Flag | Description | Default |
|---|---|---|
--content <path> | Content directory | content |
--config <path> | Path to chronicle.yaml | ./chronicle.yaml |
--preset <preset> | Deploy preset (vercel, cloudflare, node-server) | — |
start
Start the production server. Requires a prior chronicle build.
chronicle start [options]| Flag | Description | Default |
|---|---|---|
--content <path> | Content directory | content |
-p, --port <port> | Port number | 3000 |
--host <host> | Host address | localhost |
serve
Build and start the production server in one step.
chronicle serve [options]| Flag | Description | Default |
|---|---|---|
--content <path> | Content directory | content |
--config <path> | Path to chronicle.yaml | ./chronicle.yaml |
-p, --port <port> | Port number | 3000 |
--host <host> | Host address | localhost |
--preset <preset> | Deploy preset (vercel, cloudflare, node-server) | — |
Resolution Order
CLI flags take precedence over chronicle.yaml values, which take precedence over defaults.
| Option | CLI flag | Config field | Default |
|---|---|---|---|
| Content directory | --content | content | content |
| Deploy preset | --preset | preset | — |
| Config path | --config | — | ./chronicle.yaml |