CLI reference
Every command reads config.kdl from the current directory (or the path given to --config) and accepts the global flags below.
Commands
At a glance:
| Command | What it does |
|---|---|
baudelaire build |
Compile the site into dist. The default command. |
baudelaire serve |
Build, serve, watch, and live-reload. |
baudelaire check |
Compile and report broken links without writing. |
baudelaire new <path> |
Scaffold a content file from config and convention. |
baudelaire announce |
Announce the site’s metadata to atproto (standard.site). |
baudelaire init [dir] |
Scaffold a whole project. |
baudelaire clean |
Remove build output and local state. |
build
Compile the site into dist, incrementally by default. This is the default command, so bare baudelaire builds too. Accepts the build flags.
serve
Build, serve dist over HTTP, watch the sources for changes, and live-reload the browser. Also accepts the build flags.
--port <n>- Port to listen on.
--bind <addr>- Address to bind.
--open- Open the site in your browser once it’s up.
--no-watch- Serve once, without watching or live-reload.
check
Compile every page and report broken internal links without writing output: a fast CI gate. Accepts the build flags.
new <path>
Scaffold a content file, inferring its structure from the config and existing content. A bare name lands under the content directory, so baudelaire new posts/hello writes content/posts/hello.typ.
What it infers:
- The title from the filename (
my-first-postbecomes “My First Post”). - The ordering field from the collection: a
datefor asort="date"collection, the nextorderfor asort="order"one. - The template and the permalink the page will occupy, warning if that URL is already taken.
--title <text>- Override the inferred title.
--date YYYY-MM-DD- Set the date explicitly.
--draft <bool>- Mark the page a draft.
-b, --bundle- Create
<name>/index.typfor colocated assets. -e, --open- Open the new file in
$EDITOR.
announce
Announce the site’s metadata to the configured destination: an atproto/standard.site publication plus one document record per dated page. It announces the site; it does not upload the built files (see Deploying for that). Builds first, then reconciles the remote records with your pages.
--password <pw>-reads it from stdin; prefer that or the environment variable over a literal flag.-y, --yes- Skip the confirmation prompt.
--dry-run- Report what a real announce would send and remove, without writing. Needs no password: it diffs against the live repository over public reads.
init [dir]
Scaffold a whole project (config, a layout, a starter page and post, and a stylesheet) into dir, or the current directory. It prompts for the site name, author (defaulted from your git config), and base URL, then offers to set up version control with a .gitignore.
--vcs <git|jujutsu>- Choose a VCS instead of being prompted.
-y- Accept every default non-interactively.
clean
Remove build output and local build state. With no flag it sweeps everything: the output plus the .baudelaire scratch root (cache and announce state). The flags narrow it, so clean --cache forces a rebuild without discarding announce state.
--dist- Remove only the output directory.
--cache- Remove only the build cache.
--announce- Remove only the announce state.
Global flags
Accepted by every command.
--config <path>- Config file to read (default
config.kdl). --root <dir>- Change into
dirfirst, so every relative path resolves under it. --profile <name>- Apply a named profile from the
profilesblock. -v,-q- More (
-v, repeat for deeper logs) or less output.
Build flags
Config overrides accepted by the commands that build: build, serve, and check.
--out <dir>- Override the output directory.
--base-url <url>- Override the site URL, useful for preview deploys.
--drafts,--future- Include draft or future-dated pages.
--no-cache- Ignore the cache and rebuild everything.
--strict-links <bool>- Treat broken internal links as errors (default) or warnings.