Guidedog Manual 0.6.3
Language
On this page
Guidedog / Documentation 0.6.3

Command-line reference

The guidedog executable provides a complete command-line interface for managing, building, previewing, translating, and converting documentation projects.

General syntax

guidedog <command> [arguments] [options]
guidedog --version
guidedog --help

Exit codes

Table 10 Exit statuses
Exit code Condition
0 Success: all operations completed with no unhandled errors.
1 Build or conversion error (or warnings treated as errors via -W).
2 Command-line syntax error, invalid flag, or unrecognized option.
3 A configured resource limit was reached, or memory was unavailable.
4 A file operation or external compiler failed.
5 An internal error; the diagnostic explains how to report it.
6 publish only: the host accepted the publication, but has not confirmed it live.
7 publish only: whether the publication was applied is not known; run the publisher’s recover.
70 A crash; the previous published output remains available.

Commands overview

Table 11 CLI commands
Command Purpose
quickstart [DIR] Initializes a new documentation project with visible templates and configuration.
build [BUILDER] [DIR] Builds the documentation project into the requested output target.
serve [DIR] Starts a local HTTP preview server that rebuilds automatically on file edits.
clean [DIR] Deletes generated build artifacts and caches.
convert INPUT Converts a single document file or standard input stream directly.
migrate [conf.py] Translates an existing Sphinx conf.py into declarative conf.toml.
intl <update|stat> Updates translation catalogs (PO) or reports translation completion statistics.
formats Lists all compiled readers, renderers, and format conformance specifications.
gds <COMMAND> Keeps Guidedog’s own discussion records in docs/gds, as dsc does.
publish --publisher=ID Builds the project a publisher’s configuration names, and publishes the site.
plugin <COMMAND> Registers, lists, inspects, runs, or unregisters native plugin programs.

guidedog quickstart

Creates a project directory containing conf.toml, index.rst, working templates in _templates/, and styles in _static/:

# Interactive prompt
guidedog quickstart docs

# Non-interactive creation with predefined options
guidedog quickstart docs -q -p "My Project" -a "Author Name" -v 1.0 -l en

Options:

  • -q: Quiet mode; skips interactive prompts and relies on provided command-line flags.
  • -p, --project NAME: Sets the project display name.
  • -a, --author NAME: Sets the author or organization name.
  • -v VERSION: Sets the short version string (e.g. 1.0).
  • -r RELEASE: Sets the full release identifier (e.g. 1.0.0-rc1).
  • -l LANGUAGE: Sets the default project language (default: en).
  • --sep: Creates separate source/ and build/ directories instead of storing sources at the root.
  • --suffix EXT: Default source document extension (default: .rst).

guidedog build

Coordinates the reading of sources, resolution of toctrees and cross-references, and publication of final output artifacts:

# Standard project build
guidedog build html docs
guidedog build pdf docs

# Sphinx-build compatibility syntax
guidedog build -b html docs _build/html
guidedog build -M html docs _build

Supported builders:

  • html: Generates a complete HTML site with search and navigation.
  • dirhtml: Generates directory-style HTML URLs (dir/index.html).
  • singlehtml: Compiles all documents into a single contiguous HTML page.
  • pdf: Typesets PDF books using Typst (aliases: latex, latexpdf).
  • text: Generates plain text files for each document.
  • gettext: Extracts translatable strings into GNU gettext POT templates.
  • dummy: Parses and resolves document trees without writing final files (syntax check).

Build options:

  • -a: Writes all output files, ignoring modification timestamps.
  • -E: Rebuilds the environment from scratch, ignoring cached state.
  • -W: Treats all warnings as build failures.
  • --keep-going: With -W, continues compiling remaining documents to report all errors before exiting.
  • -n: Nitpicky mode; generates warnings for all unresolved cross-reference targets.
  • -j N / -j auto: Parallel worker count for document parsing (auto matches CPU cores).
  • -D name=value: Overrides a conf.toml setting for this invocation (e.g. -D language=de).
  • -D table.key=value: Sets one key of a table setting, such as html_context, and keeps its other keys, as sphinx-build does.
  • -t TAG: Defines a tag for conditional inclusion in only directives.
  • -c DIR: Specifies a custom directory containing conf.toml.
  • -C: Runs the build without loading any conf.toml file.
  • -v: Verbose mode; displays informational notes and timing statistics.
  • -q: Quiet mode; shows only warnings and errors.
  • --color=always|never|auto: Controls ANSI terminal color output.
  • --diagnostics=json: Emits machine-readable JSON diagnostic reports to standard error.
  • --budget=MIB: Maximum memory budget held by the project host (default: 1024 MiB).
  • --memory=ram|disk: Strategy when memory budget is exceeded.
  • --untrusted: Omits raw embedded markup and disables network fetching. This is a capability policy, not a process sandbox.

guidedog serve

Starts a local HTTP web server and file watcher that automatically rebuilds and reloads the browser whenever source documents, templates, or assets change:

# Serve current project on default port (8000)
guidedog serve docs

# Serve on custom port and host
guidedog serve docs --port 9000 --host 0.0.0.0

Options:

  • -p, --port PORT: Local TCP port number to listen on (default: 8000).
  • --host HOST: IP address to bind to (default: 127.0.0.1).

guidedog clean

Deletes the build directory and all cached environment state:

guidedog clean docs

guidedog convert

Converts a standalone file or standard input stream directly, without requiring a project directory or configuration:

# Convert reStructuredText to HTML
guidedog convert guide.rst --output guide.html

# Convert Markdown to PDF
guidedog convert guide.md --to pdf --output guide.pdf

# Stream conversion from standard input to standard output
cat document.md | guidedog convert - --from commonmark --to html --output -

Options:

  • -o, --output FILE: Output file path, or - for standard output.
  • --to FORMAT: Target format (html, pdf, text; inferred from output filename).
  • --from FORMAT: Source reader (rst, commonmark, myst, typst; inferred from input suffix).
  • --force: Overwrites an existing output file without prompting.
  • --strict: Fails if any warnings are emitted.
  • --raw=allow|omit: Security policy for raw embedded code (default: omit).
  • --emit-typst FILE: Writes the generated intermediate Typst markup to a separate file.

guidedog migrate

Converts a Python Sphinx conf.py file into declarative conf.toml:

# Convert conf.py in-place
guidedog migrate docs/conf.py

# Output to a specific file
guidedog migrate docs/conf.py -o docs/conf.toml --force

Options:

  • -o FILE: Writes output to the specified file path (or - for standard output).
  • --force: Overwrites existing conf.toml files.

guidedog intl

Manages multi-lingual document translation catalogs:

# Step 1: Extract POT templates
guidedog build gettext docs

# Step 2: Create or update language PO catalogs
guidedog intl update -l de -l fr docs

# Check translation completion percentages
guidedog intl stat -l de docs

Options for intl update:

  • -l, --language LANG: Target language code (may be repeated for multiple languages).
  • -p, --pot-dir DIR: Custom path to extracted POT message templates.

guidedog formats

Prints a detailed report of all compiled readers, renderers, syntax highlighting lexers, and specification test suite conformance results:

guidedog formats

guidedog gds

Keeps Guidedog’s own discussion records, the GDS, in docs/gds. It runs the commands of dsc, below, with the prefix gds:

guidedog gds new "Feature Title" --author="Name"
guidedog gds list --state=prediscussion
guidedog gds show 0003
guidedog gds promote 0003 --dry-run
guidedog gds state 0003 --to=accepted --reason="Consensus reached"
guidedog gds index
guidedog gds check --render
guidedog gds recover --rollback

dsc and dscc

dsc keeps a discussion catalog and builds it with the installed guidedog. dscc is dsc with Guidedog built in. Both take the same commands; see Keep a discussion catalog.

dsc init DIR --prefix=eds --name="Enso Discussions" --author="Ada"
dsc new "Cache policy" --labels=architecture
dsc list --state=discussion
dsc show cache-policy --format=json
dsc promote cache-policy --dry-run
dsc state 1 --to=accepted --reason="Review converged"
dsc index --check
dsc check
dsc build --target=both
dsc recover --rollback
dsc config > discussion.toml

dsc config prints the catalog’s settings in effect, as discussion.toml; see Keep a discussion catalog for each setting.

Table 12 Options of dsc and dscc
Option Meaning
--dir=DIR The catalog. By default, the one the current folder is in.
--prefix=NAME The prefix of a catalog without discussion.toml; init needs it.
--name=NAME, --config=FILE, --process=FILE, --template=FILE The name, settings, process draft, and record template of a new catalog (init).
--author=NAME, --labels=a,b, --slug=NAME A new draft’s author, labels, and file name (new; init takes the first two).
--number=N, --discussion=URL The number and review link of a promotion.
--to=STATE, --reason=TEXT, --evidence=TEXT A state change, why, and for committed the evidence.
--target=html|pdf|both What build writes (default: both). A record selects one PDF.
--guidedog=PATH dsc only: the guidedog to build with (default: DSC_GUIDEDOG, then PATH).
--typst=PATH dscc and guidedog gds only: a Typst program, for a Guidedog without one built in.
--dry-run, --format=table|json, --diagnostics=text|json, -q Preview a change; machine-readable output; quiet success.

The exit statuses are those of guidedog. Problems about a catalog have codes in its prefix, such as eds.recovery-needed; running out of memory is discussion.memory.

guidedog publish

Builds the project that a registered publisher’s configuration names, as HTML with Guidedog’s own engine, freezes the site, and has the publisher plan and publish it:

guidedog publish --publisher=pages --config=pages.toml --dry-run
guidedog publish --publisher=pages --config=pages.toml --wait=600 --timeout=900

--dry-run builds and plans, and writes nothing to the target. --wait=SECONDS is how long to wait for the host to confirm the deployment (0: do not wait). --timeout=SECONDS bounds each whole exchange with the publisher, including writing the request (default: 300 seconds). Choose a value longer than --wait. A timeout or Ctrl+C after a possible write reports an unknown outcome: run the publisher’s recovery command before retrying. --verbose lists every change. Each invocation builds into its own private folder, which is removed on release; concurrent invocations cannot change each other’s snapshots. See Write a native plugin.

guidedog plugin

Records which native plugin programs may run on this machine, in plugins.toml in Guidedog’s configuration folder (GUIDEDOG_CONFIG_DIR moves it):

guidedog plugin register product-badge ./build/product-badge --project=docs --config=badge.toml
guidedog plugin check ./build/product-badge --project=docs --config=badge.toml
guidedog plugin list
guidedog plugin inspect product-badge
guidedog plugin run pages -- auth status
guidedog plugin unregister product-badge

Subcommands:

  • register ID PATH [--project=DIR] [--config=FILE] [--yes]: Inspects the program after user confirmation (--yes bypasses confirmation) and records its SHA-256 hash. Build plugins pass qualification checks before registration.
  • check PATH [--project=DIR] [--config=FILE] [--timeout=SECONDS]: Runs the full suite of qualification checks against a build plugin executable without writing to the machine registry.
  • list: Lists all registered plugins, their IDs, paths, and interface kinds.
  • inspect ID: Displays declared build hooks (source, HTML, assets) or publisher capabilities.
  • run ID -- [ARGS...]: Runs a registered plugin program directly, verifying its SHA-256 pin first.
  • unregister ID: Removes the specified plugin entry from plugins.toml.

In Guidedog 0.6.2, build plugins are selected by plugins in conf.toml. Inspection displays their declared source, HTML, and asset hooks. Build plugins run during guidedog build, while guidedog publish accepts publishers only. See Write a native plugin for the complete guide, compiled example, and configuration.

guidedog-pages

Publishes Guidedog sites to GitHub Pages from this machine, building projects with the installed guidedog; see Publish to GitHub Pages.

guidedog-pages init --repository=OWNER/REPO --project=docs
guidedog-pages auth import --profile=default
guidedog-pages auth login --client-id=APP_ID --scope=public
guidedog-pages auth status
guidedog-pages bind --adopt
guidedog-pages setup
guidedog-pages doctor
guidedog-pages publish --dry-run
guidedog-pages publish --wait=600
guidedog-pages watch
guidedog-pages status --operation=COMMIT
guidedog-pages recover
guidedog-pages unbind
guidedog-pages auth logout
Table 13 Settings of pages.toml
Setting Meaning
schema = 1 The file’s version; required.
repository = "OWNER/REPO" The GitHub.com repository; required.
branch = "gh-pages" The branch the site is published to: its own, never the default branch.
project = "docs" or site = "build/site" The Guidedog project to build, or the folder of a site built already; one of them, relative to pages.toml.
profile = "default" The credential profile whose token publishes.
site_url The address readers open, and html_baseurl for the build (default: https://OWNER.github.io/REPO/).
strict = true Build with warnings as errors.
wait_seconds = 300 How long publish waits for the deployment.
[watch] debounce_ms, max_wait_ms How long watch lets sources settle, and the most it waits after a change.
Table 14 Options of guidedog-pages
Option Meaning
--config=FILE The configuration (default: pages.toml).
--profile=NAME The profile auth and init use (default: default).
--credential=env Use the token in GUIDEDOG_PAGES_TOKEN for this command, without storing it.
--guidedog=PATH The guidedog that builds (default: GUIDEDOG_PAGES_GUIDEDOG, then PATH).
--dry-run, --wait=SECONDS, --verbose publish: plan only; how long to wait for the deployment; list every change.
--adopt, --yes bind: let a branch of other work be replaced; answer yes to the question.
--client-id=ID, --scope=public|private, --open, --replace auth login: the app; the repositories an OAuth App token may reach; open the browser; give the profile to another account.
--diagnostics=text|json, --color=auto|always|never How problems and results are written.

Its exit statuses are those of guidedog publish: 0 live or unchanged, 1 nothing published, 2 a usage or configuration problem, 6 accepted but not confirmed, and 7 unknown until recover.

Build-plugin registration checks

guidedog plugin check PATH --project=DIR --config=FILE tests declared build hooks without writing a registry entry. Build-plugin registration runs the same checks before pinning the executable. Its request timeout defaults to 60 seconds; --timeout=SECONDS sets it. Publisher registration remains compatible and does not invoke publication. Passing checks is not a sandbox or a safety certificate.