Commands reference


Norgolith provides a powerful CLI for managing your static sites and themes. This reference covers all commands and their options.

Global Options

These options are available for all commands:

-d, --dir <PROJECT_DIR>  Operate on project in specified directory
-h, --help               Show command help
-v, --version            Show Norgolith version

Core Commands

lith init

Initialize a new Norgolith site.

Usage

lith init [OPTIONS] [NAME]

Options

--prompt      Prompt for site metadata (title, author, etc.)
--no-prompt   Skip metadata prompts (uses sane defaults)

Examples

# Interactive setup (default)
lith init my-blog --prompt

# Quick setup with sane defaults, e.g. `en-US` as the language code
lith init my-site --no-prompt

lith serve

Start development server.

Usage

lith serve [OPTIONS]

Options

-p, --port <PORT>    Set server port (default: 3030)
-e, --host           Expose server to LAN
-o, --open           Open browser automatically
--drafts             Include draft content (default)
--no-drafts          Exclude draft content

Examples

# Start server on port 8080 and open browser
lith serve --port 8080 --open

# Serve excluding drafts
lith serve --no-drafts

lith new

Create new content or assets.

Usage

lith new [OPTIONS] [NAME]

Options

-k, --kind <KIND>   Asset type (norg|css|js) [default: norg]
-o, --open          Open file in system editor

Examples

# Create new blog post
lith new -k norg posts/2023/my-post.norg

# Create CSS file and open it
lith new -k css styles.css --open

lith build

Build production-ready site.

Usage

lith build [OPTIONS]

Options

-m, --minify   Minify HTML/CSS/JS output (default)

Example

# Build with minification
lith build --minify

Theme Management

lith theme

Manage installed theme.

Subcommands

pull <REPO>     Install theme from repository
update          Update current theme
rollback        Restore previous theme version
init            Create new theme structure
info            Show theme information
lith theme pull

Install a theme from a repository (github, codeberg or sourcehut). If no VERSION has been provided it will fallback to the latest Git tag available.

Usage
lith theme pull [OPTIONS] <REPO> [VERSION]
Options
--pin   Pin to current major version
lith theme update

Update the currently installed theme.

Usage
lith theme update [OPTIONS]
lith theme rollback

Restore previous theme version from backup.

Usage
lith theme rollback [OPTIONS]
lith theme init

Initialize theme structure.

Usage
lith theme init [OPTIONS]
lith theme info

Show theme information.

Usage
lith theme info [OPTIONS]

Examples

# Install theme from GitHub
lith theme pull github:NTBBloodbath/norgolith-pico-theme

# Update theme while keeping backups
lith theme update

# Create new theme scaffold
lith theme init my-theme