This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy at the same URL with .md appended. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content

May 29, 2026

Inspect your site from the command line

By Phil Scott

Every Pennington project ends with app.RunOrBuildAsync(args). That one call now backs a proper command line: run the project to serve it, or pass a verb.

The build verb

dotnet run -- build writes the static site and exits; --base-url and --output set the sub-path and the output folder. The surface is built on System.CommandLine, so --help works at the root and on every verb and prints without booting the site. The static-build how-to and base-URL how-to cover the build side.

The diag verb

dotnet run -- diag <command> runs the site headless, prints plain text about it, and exits. The commands answer the questions you'd otherwise dig through a build to find:

  • info prints the version, content root, page count, and enabled features.
  • toc shows the table of contents as a tree.
  • routes lists every emitted URL with its kind and source file.
  • warnings reports current diagnostics and exits non-zero if any are errors.
  • translation, frontmatter, and llms give locale coverage, the front-matter keys each content type accepts, and the generated llms.txt index.

It's built for two readers. For you, it's quicker than starting the server and clicking around. For an AI assistant working in the repo, diag routes or diag warnings is a scriptable way to see the site without crawling it. The output is text and exit codes, not a format to parse. The CLI reference lists every command, and dev mode and build mode explains the headless run.