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.
golem init [--profile=<package|site|book|simple>] [--output-dir=<dir>] [-C <dir>]
--profile: Scaffolding profile preset (default:package; usessiteif nopyproject.tomlis 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:).
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.
golem build [--config=<path>] [--clean] [--strict] [-v] [-q] [-C <dir>]
--config: Path to primary configuration file (default:golem.tomlorpyproject.toml).--clean: Purge.golem/cache.jsonand 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.
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.
golem doctest [paths...] [-m/--mode=<explicit|eager|auto>] [-s/--source=<pkg_or_file>] [-v] [-x]
paths: Target.adocfiles or directories (defaults tocontent_dirordocs/).-m, --mode: Execution mode (explicitfortest-marked blocks,eagerfor 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.
golem apidoc [PACKAGE] [-o/--output=<dir>] [-s/--docstring-style=<style>]
PACKAGE: Name of the Python package to introspect (defaults to configuredapi_packages).-o, --output: Output directory for generated.adocreference files (defaults tocontent_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.
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.
golem themes [--json] [-C <dir>]
--json: Output structured JSON listing active theme and available themes.-C, --directory: Working directory context.