Skip to main content

Golem Documentation

Michael Bernstein

CLI Command Reference

The golem command-line utility provides commands for initializing, authoring, compiling, serving, verifying, and introspecting documentation projects.

Global Options

  • -C, --directory <dir>: Change working directory before executing the command.
  • --version: Display Golem version information.

golem init

Initialize a new Golem documentation project scaffold.

Terminal
BASH
golem init [--profile=<package|site|book|simple>] [--output-dir=<dir>] [-C <dir>]
  • --profile: Scaffolding profile preset (default: package; uses site if no pyproject.toml is found).
  • --output-dir: Override output build directory in generated config.
  • -C, --directory: Working directory context.

golem new

Generate a new .adoc document skeleton with pre-filled metadata headers (:golem-type:, :author:, :date:).

Terminal
BASH
golem new <doc_type> <TITLE> [-C <dir>]
  • doc_type: Document category or type (e.g. chapter, article, post, guide).
  • TITLE: Title of the document to create. Converted to a clean kebab-case filename (e.g. hello-world.adoc).
  • -C, --directory: Working directory context.

golem build

Compile AsciiDoc source files into static HTML via incremental DAG caching.

Terminal
BASH
golem build [--config=<path>] [--clean] [--strict] [-v] [-q] [-C <dir>]
  • --config: Path to primary configuration file (default: golem.toml or pyproject.toml).
  • --clean: Purge .golem/cache.json and output directory prior to building.
  • --strict: Treat warnings as fatal errors (exit code 1) for CI pipelines.
  • -v, --verbose: Enable verbose debug logging output.
  • -q, --quiet: Silence non-error compilation output.
  • -C, --directory: Working directory context.

golem serve

Start the multi-threaded live-reload dev server with Server-Sent Events (SSE) and in-browser error overlays.

Terminal
BASH
golem serve [--port=<port>] [--host=<host>] [--strict] [-C <dir>]
  • --port: TCP port to listen on (default: 8000).
  • --host: Host interface address (default: 127.0.0.1).
  • --strict: Fail on syntax errors during serving.
  • -C, --directory: Working directory context.

golem doctest

Extract and execute embedded Python code examples from documentation and docstrings using asciidoctest.

Terminal
BASH
golem doctest [paths...] [-m/--mode=<explicit|eager|auto>] [-s/--source=<pkg_or_file>] [-v] [-x]
  • paths: Target .adoc files or directories (defaults to content_dir or docs/).
  • -m, --mode: Execution mode (explicit for test-marked blocks, eager for all blocks sequentially, auto).
  • -s, --source: Python module or package path to extract docstring doctests from.
  • -v, --verbose: Show detailed per-block test progress and outputs.
  • -x, --fail-fast: Stop immediately on the first test failure.

golem apidoc

Generate AsciiDoc API reference documentation from Python packages using static AST analysis and docstring formatting.

Terminal
BASH
golem apidoc [PACKAGE] [-o/--output=<dir>] [-s/--docstring-style=<style>]
  • PACKAGE: Name of the Python package to introspect (defaults to configured api_packages).
  • -o, --output: Output directory for generated .adoc reference files (defaults to content_dir/api/).
  • -s, --docstring-style: Docstring parsing style (google, numpy, sphinx, asciidoc, auto).

golem plugins

List and inspect active, built-in, entry-point, and local Pluggy plugin extensions.

Terminal
BASH
golem plugins [--json] [-C <dir>]
  • --json: Output structured JSON listing plugin discovery sources and enabled status.
  • -C, --directory: Working directory context.

golem themes

List active and discovered Chameleon theme templates.

Terminal
BASH
golem themes [--json] [-C <dir>]
  • --json: Output structured JSON listing active theme and available themes.
  • -C, --directory: Working directory context.