Skip to content
Honmaple
Documentation navigation

CLI Usage

On this page

The main commands are init, server, build, and hooks.

init

Create a site:

snow init myblog

Omit the directory to initialize the current directory:

snow init

Setup asks for the site title, author, URL prefix, and whether to create an initial article.

server

Start the development server:

snow server

Common options:

snow server --listen 127.0.0.1:8088
snow server --autoload
snow server --root-dir myblog
snow server --config other.yaml
snow server --debug
snow server --mode publish
snow server --include-drafts

Short forms:

snow server -l 127.0.0.1:8088
snow server -R
snow server -r myblog
snow server -c other.yaml
snow server -D
snow server -m publish

--autoload watches content, templates, and static files, then rebuilds and refreshes the browser.

build

snow build

Common options:

snow build --clean
snow build --root-dir myblog
snow build --output-dir dist
snow build --config other.yaml
snow build --dry-run
snow build --debug
snow build --mode publish
snow build --include-drafts

Short forms:

snow build -C
snow build -r myblog
snow build -o dist
snow build -c other.yaml
snow build -D
snow build -m publish

--dry-run runs the build without writing files. --clean removes non-hidden output files before building.

hooks

List registered hooks:

snow hooks

Enabled hooks are marked:

mount, snakecase, assets(enabled), pelican, rewrite, filter, encrypt(enabled), links(enabled), shortcode(enabled), minify, alias

Options

Both server and build support:

Option Short Description
--config -c Configuration file
--debug -D Debug logging
--root-dir -r Site root directory
--mode -m Configuration mode
--include-drafts None Include draft content

Additional build options:

Option Short Description
--output-dir -o Override the output directory
--clean -C Clean output before building
--dry-run None Build without writing output

Additional server options:

Option Short Description
--listen -l Listening address
--autoload -R Watch files and refresh automatically

Site Root

--root-dir changes the working directory before running the command. Relative configuration, content, template, and static paths are resolved from this directory.

snow build --root-dir myblog
snow server --root-dir myblog --autoload