Guidedog¶
Write once. Explain well. Publish on the web and on paper.
Guidedog builds a documentation website and a PDF book from the same reStructuredText or Markdown files. We keep one set of source files and publish it for readers on the web and on paper. The release provides one guidedog executable, with PDF typesetting, diagram rendering, and music engraving included.
Sphinx inspires the authoring workflow. Guidedog is an independent system: configuration is declarative TOML, API extraction is static, and Python configuration and extensions are never executed. Complete Sphinx compatibility is not a goal.
This page is the repository overview. On GitHub, the README files at the root of the
repository give the same overview in each language of the manual.
Start a project¶
guidedog quickstart docs
guidedog build html docs
guidedog build pdf docs
guidedog serve docs
The project contains conf.toml, index.rst, _templates/ (layout.html,
book.typ, discussion.typ, article.typ, and theme.typ), and _static/
(guidedog.css, guidedog.js, and typography.js). Templates and static assets are
ordinary files we can edit locally. HTML provides navigation, search, code highlighting,
diagrams, equations, and Knuth-Plass paragraph typesetting. PDF books provide chapters,
cross-references, figures, indexes, and language-aware typesetting. We can embed Graphviz
or Typst drawing source, including CeTZ and Fletcher, directly in RST and MyST with
automatic HTML and PDF assets; see Diagrams with Graphviz and Typst.
We embed LilyPond notation directly in RST and MyST with the native lilypond directive, including staves, up to four simultaneous voices per staff, lyrics, structured \markup, and common markings; see Music notation. Outlined Bravura SVG and PNG figures work in HTML and multi-system PDF books without an installed LilyPond program:
.. lilypond::
:caption: Beethoven's Joy theme, four bars in C major.
:alt: A four-bar melody beginning E, F, G and ending with dotted-quarter E, eighth-note D and half-note D.
\fixed c' {
\clef treble
\key c \major
\time 4/4
e2 f4 g | g4 f e d | c2 d4 e | e4. d8 d2 |
}
The built-in theme follows the system theme by default, with light and dark choices; Guidedog’s own documentation website defaults to the light reading edition. The website detects the browser language on its landing page and repository overview. A saved choice takes precedence. Direct links to an edition or chapter remain explicit requests.
guidedog convert notes.md --to pdf --output notes.pdf
guidedog clean docs
guidedog migrate conf.py
Install¶
Each release has an archive for Linux,
macOS, and Windows, with SHA256SUMS. The Typst compiler, the Bravura 1.482 music font,
and the tree-sitter parsers are compiled into guidedog. Unix archives link Graphviz statically, and the Windows ZIP
bundles Graphviz DLLs, so nothing else needs to be installed at run time. Fetching remote
intersphinx inventories and publishing to GitHub Pages use the HTTP client built into guidedog, so no curl program is needed.
Check and install the archive:
sha256sum -c --ignore-missing SHA256SUMS # on macOS: shasum -a 256 -c --ignore-missing SHA256SUMS
tar -xzf guidedog-linux-amd64.tar.gz
sudo install guidedog-linux-amd64/guidedog /usr/local/bin/
The release notes describe each platform’s requirements and limits. See the installation guide for the details.
Build from source¶
Install a Rust toolchain (the workspace’s rust-version or later), a C compiler, and the Graphviz
development files (libgvc, libcgraph; for example libgraphviz-dev on Debian and
Ubuntu, graphviz-devel on Fedora, or brew install graphviz on macOS; on Linux, also perl and make for the embedded Typst package downloader’s vendored OpenSSL). Then, at the checkout root:
cargo build --release -p guidedog-cmd # target/release/guidedog
cargo fmt --all --check
cargo run -p check # source limits
cargo xtask tables --check
cargo xtask check-music-font
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo xtask fetch-fonts --music && cargo run -p music-check
The typst crates are a default feature of gd-typst. Without them, Guidedog runs an
installed typst 0.15.1 program for PDF books, while .. typst-diagram:: and .. lilypond:: with :format: png require the embedded compiler.
RELEASING.md describes the
release workflow.
The workspace is split by responsibility. The engine crates (guidedoc, the readers and
renderers, guidedoc-defaults) use only the standard library. Supporting libraries
(gd-toml, gd-json, gd-jinja, gd-highlight, gd-gettext, gd-graphdog,
gd-typst, …) never depend on the engine. The project builder and the command line sit
above both. The programs are under cmd/. See Internals.
Translate with Guidedog¶
mkdir -p docs/manual/_editions
guidedog build -b gettext docs/manual docs/manual/locales/templates -W
guidedog intl update -p docs/manual/locales/templates \
-l zh_CN -l ja -l ko -l hi -l es -l de docs/manual
guidedog intl stat -l zh_CN -l ja -l ko -l hi -l es -l de docs/manual
guidedog build -b html docs/manual docs/manual/_editions/de \
-D language=de -D 'html_extra_path=[]' -W
Translate and review msgstr values in the PO files. Guidedog extracts POT files, merges
catalogs, reports progress, and builds each edition. It does not invent translations.
Commands, paths, code, API names, and reference targets stay unchanged. The website landing page,
the manual, and the repository overview are translated. The API reference and GDS remain English. See the manual build instructions for assembling all editions and PDF books.
Extend and publish¶
Write a build plugin or a publisher with the
step-by-step plugin chapter. A plugin implements one Rust trait. The
same value is linked into a custom guidedog binary with gd_cli::run_with, or served
as an installed program with gd_plugins::serve_plugin. The chapter then follows the real
GitHub Pages publisher through ownership, credentials, conditional updates and recovery.
guidedog publish --timeout=SECONDS bounds each complete exchange (default: 300 seconds).
We choose a value longer than --wait. After an unknown outcome, we recover before publishing
again.
Keep discussions¶
guidedog dsc keeps proposals and decisions as reStructuredText records, one file each. It builds
them into a website and PDF books. Each catalog has a prefix: Guidedog’s
design records use gds, and another project might use eds.
guidedog dsc init docs/eds --prefix=eds --name="Enso Discussions"
cd docs/eds
guidedog dsc new "Cache policy" --labels=architecture
guidedog dsc promote cache-policy
guidedog dsc state 1 --to=accepted --reason="Review converged"
guidedog dsc build
A catalog’s discussion.toml sets its lifecycle states, record types, and numbering.
guidedog dsc config prints it. The commands come from the discussion plugin, which every guidedog links, so nothing else needs to be installed. Guidedog’s own docs/gds is one such catalog: we run guidedog dsc check in that folder. See Keep a discussion catalog.
Publish static sites¶
guidedog ssg manages articles, research logs, collections, feeds, pinned theme archives, and multi-project websites from the same conf.toml and document tree:
guidedog ssg init site --preset=journal --title="Field Notes"
cd site
guidedog ssg new posts/2026-04-17-zero-copy.rst --title="Zero-Copy Readers"
guidedog ssg schedule posts/2026-04-17-zero-copy.rst --at=2026-05-01T09:00:00Z
guidedog ssg publish posts/2026-04-17-zero-copy.rst
guidedog ssg build
Pages marked with :pdf: article also build standalone print-quality PDFs alongside their HTML pages. Multi-project websites mount sub-projects (such as docs/site, docs/manual, and docs/gds) declaratively through [[site.mounts]]; docs/api builds as a standalone reference project and manual PDF appendix. See Static site publishing.
Read and embed¶
- Manual: tutorials, topics, practical tasks, reference, and internals.
- API reference: generated from the Rust source of the main crates and included in the manual’s PDF appendix.
Engine guide: theguidedoccrate’s workspaces, requests, adapters, and conversion examples.- Templates: customize HTML with Jinja and books with Typst.
GDS: numbered design records and implementation decisions.Discussion library: the catalogs thatguidedog dsckeeps.
Guidedoc works in a caller-owned, reusable workspace and returns structured diagnostics. The
host manages files, budgets, caching, publication, and native compilers. --untrusted
restricts capabilities. It is not a process sandbox or a limit on all native resource use.
Credits and license¶
Created by Vikrant Rathore, with assistance from Ronak Rathore and Kanak Rathore. Contributions are welcome through issues and pull requests. Documentation credits use names or handles, not personal email addresses. Git identity settings are managed separately.
Thanks to Sphinx and Georg Brandl, Docutils and David Goodger, Typst, Steinberg Media Technologies and Daniel Spreadbury (Bravura and SMuFL), Tree-sitter and Max Brunsfeld, Graphviz, and the Rust project.
Guidedog is released under the
GNU Lesser General Public License v3.0 or later
(LGPL-3.0-or-later), which adds permissions to the
GNU General Public License v3.0. For other licensing terms, contact the authors.
NOTICE says how to reach them and lists the
third-party components, such as the bundled fonts and the Rust crates compiled into the
programs, that keep their own licenses.
An additional permission allows Guidedog to be linked and distributed with Graphviz. See
NOTICE.