Guide

Testing command line docs with prysk and Cram

prysk compares command output and exit statuses, but it reads .t files, not Markdown. Generate tests from your console blocks so the pages get checked.

Published
Updated
November 17, 2026
Reading time
11 min
Facts checked against
The Cram 0.7 page and the prysk docs on the format, getting started and the pytest plugin, with every code block run on prysk 0.20.0, Cram 0.7, bash and Python 3 (November 16, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerThe Cram format and runWhy command-line docs driftCompare coverageTriage the resultA checklist for your repositoryWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

prysk runs command-line examples in Cram-style .t files and compares the actual result with the expected transcript. Use it to check output and exit statuses, and generate tests from documentation when the published console blocks themselves must stay accurate. Inspect generated tests and diffs before accepting changes.

DocsAlive is not a replacement for prysk on command output. In engine 0.6.3, .t files are never read, console output is never compared, a non-zero exit becomes a runtime-error under set -e, indented Cram-style console blocks are skipped, and (re) and (glob) have no meaning to the engine. The scan can complement prysk by running supported page examples in clean containers and triaging findings.

The Cram format and run

A Cram test is a .t file containing a shell transcript. With the default indentation, a line beginning with two spaces, a dollar sign and a space is a command. Two spaces, a greater-than sign and a space continue a multi-line command. Other lines beginning with two spaces are expected output; other lines are comments. A non-zero exit status appears as a bracketed number on its own line, such as [2].

Expected lines can use (re) for a Perl-compatible regular expression or (glob) for a glob using only * and ?. Both are first matched literally. Use (no-eol) for output without a trailing newline and (esc) for unprintable characters. Prefer exact output when it is stable; use a flexible match for the part that can legitimately vary.

Cram prints a dot for a passing test and a unified diff on failure. An s denotes a skipped test, including an empty test or one that exits with return code 80. A failure writes a .err file containing actual output; it is removed when the test passes. Interactive mode, -i or --interactive, merges actual output back into the test. Review that change before accepting it: actual behavior can be the defect.

Options include --shell, whose default is /bin/sh, --indent, whose default is two, --xunit-file, and -E or --preserve-env. .cramrc and the CRAM environment variable can supply default options. The Cram page describes its supported runtime range; Cram 0.7 also ran on Python 3.13 in the checked environment.

Before tests, Cram resets TMPDIR, TEMP and TMP to the runner’s temporary directory; LANG, LC_ALL and LANGUAGE to C; TZ to GMT; COLUMNS to 80; and CDPATH and GREP_OPTIONS to empty values. It provides CRAMTMP, TESTDIR, TESTFILE and TESTSHELL. TESTDIR identifies the directory containing the test file. Take care with commands that close the test shell's stdin (for ssh, the Cram page suggests its -n option) and with daemons that inherit stdout and do not close it, which can make the run hang.

prysk is a maintained fork that continues Cram’s development. It keeps the format and options and adds --dos2unix and --color. It provides PRYSK_TEMP instead of CRAMTMP and replaces occurrences of the temporary directory in output with $TMPDIR. Its getting-started instructions install prysk with an upgrade option and use interactive mode to accept output. The examples below use the installed tool directly.

Why command-line docs drift

A command can keep exiting successfully while its output changes. A page can show an error message but omit the exit status, leaving a reader or script without the full contract. A separate test transcript can remain correct while the Markdown page becomes stale.

Pointing prysk directly at ordinary Markdown is also misleading. In the verified example below, the console fences were not indented by two spaces. prysk treated every line as a comment, ran no commands and still counted the file as passing. Setting --indent=0 did not fix the page: headings and fence lines became expected output and the test failed.

The CLI docs testing guide and installation docs testing guide cover broader reader paths. Here, acme-slug and acme_slug are illustrative names and are not published packages.

Write a command and a transcript

This illustrative entry point prints usage to stderr and exits with status 2 when no title is supplied.

import sys

from acme_slug import slugify, truncate_slug


def main(args: list[str]) -> int:
    if not args:
        print("usage: python3 -m acme_slug TITLE [MAX]", file=sys.stderr)
        return 2
    slug = slugify(args[0])
    if len(args) > 1:
        slug = truncate_slug(slug, int(args[1]))
    print(slug)
    return 0


raise SystemExit(main(sys.argv[1:]))

The illustrative .t file checks normal output, a length limit, an error status and flexible output matches. The command changes to the project root because the test runs in a temporary directory.

Run from the project root so the package is importable:

  $ cd "$TESTDIR/.."

The CLI prints a slug:

  $ python3 -m acme_slug "Release notes: v2.0"
  release-notes-v2-0

A second argument limits the length:

  $ python3 -m acme_slug "Testing docs examples with prysk" 20
  testing-docs

With no title it prints usage and exits with status 2:

  $ python3 -m acme_slug
  usage: python3 -m acme_slug TITLE [MAX]
  [2]

Output lines can be matched with a regular expression or a glob:

  $ python3 -m acme_slug "Version 2.10.3"
  version-\d+-\d+-\d+ (re)
  $ python3 -m acme_slug "Docs that run"
  docs-* (glob)

Install prysk and run the test directory:

python -m pip install prysk
prysk -v tests/

The test file passed in the recorded run.

tests/cli.t: passed
# Ran 1 tests, 0 skipped, 0 failed.

Test the published page

This first version of the illustrative page is broken on purpose: its first output is stale and its final transcript omits the exit status.

# Command line

Print a slug:

```console
$ python3 -m acme_slug "Release notes: v2.0"
release-notes-v2.0
```

Limit the length with a second argument:

```console
$ python3 -m acme_slug "Testing docs examples with prysk" 20
testing-docs
```

Without a title the command prints its usage and exits with status 2:

```console
$ python3 -m acme_slug
usage: python3 -m acme_slug TITLE [MAX]
```

Running prysk directly on this page appears plausible, but its input is not a Cram transcript.

prysk docs/cli.md

The result counts one passing test with no skipped or failed tests, even though no commands ran. Treat this as an empty coverage result, not proof that the page works.

.
# Ran 1 tests, 0 skipped, 0 failed.

Generate a transcript from console fences

The following illustrative tools/md2t.py bridge was verified for this example. It writes one generated .t file per matching page, indents console-fence lines and starts from the project root.

"""Write one prysk test per docs page that has console fences."""
import pathlib
import re

FENCE = re.compile(r"^```console\n(.*?)^```$", re.M | re.S)

out = pathlib.Path("tests/docs")
out.mkdir(parents=True, exist_ok=True)
for page in sorted(pathlib.Path("docs").glob("*.md")):
    blocks = FENCE.findall(page.read_text())
    if not blocks:
        continue
    lines = [f"Generated from {page}; edit the page, not this file.", ""]
    lines += ['  $ cd "$TESTDIR/../.."', ""]
    for block in blocks:
        lines += ["  " + line for line in block.splitlines()]
        lines.append("")
    test = out / f"{page.stem}.t"
    test.write_text("\n".join(lines))
    print(f"{page} -> {test} ({len(blocks)} console blocks)")

Its limits define the coverage. It handles only fences labeled console in Markdown files directly under docs/; it copies lines as written. Page output must therefore be exact or use (re) or (glob), which readers will see. The script’s paths and working-directory change assume the displayed repository layout. Review and adapt the bridge for a different layout or fence convention.

Generate the tests before running them so a changed page cannot leave an old generated transcript behind.

python3 tools/md2t.py
prysk tests/

The generated test failed on the stale slug and the missing status. prysk also wrote tests/docs/cli.t.err with actual output.

.!
--- tests/docs/cli.t
+++ tests/docs/cli.t.err
@@ -3,10 +3,11 @@
   $ cd "$TESTDIR/../.."

   $ python3 -m acme_slug "Release notes: v2.0"
-  release-notes-v2.0
+  release-notes-v2-0

   $ python3 -m acme_slug "Testing docs examples with prysk" 20
   testing-docs

   $ python3 -m acme_slug
   usage: python3 -m acme_slug TITLE [MAX]
+  [2]

# Ran 2 tests, 0 skipped, 1 failed.

Update the page’s expected slug and make the error status visible with an || echo command. This form lets readers see the status and lets both tools complete the block.

--- a/docs/cli.md
+++ b/docs/cli.md
@@ -4,7 +4,7 @@

 ```console
 $ python3 -m acme_slug "Release notes: v2.0"
-release-notes-v2.0
+release-notes-v2-0
 ```

 Limit the length with a second argument:
@@ -17,6 +17,7 @@
 Without a title the command prints its usage and exits with status 2:

 ```console
-$ python3 -m acme_slug
+$ python3 -m acme_slug || echo "exit status: $?"
 usage: python3 -m acme_slug TITLE [MAX]
+exit status: 2
 ```

Compare the page scan

This command plans the scan of the illustrative repository. The recorded execution covered one page and three console blocks; .t files were outside page scope.

docsalive scan .

On the first page version, the first two blocks passed, including the stale-output block. The third failed as runtime-error because the command exited with status 2 under set -e; that category needs review and is not automatically filed as a docs bug. On the revised page all three passed, and prysk passed both test files.

The next implementation change is broken on purpose: it changes the separator while leaving the docs unchanged.

--- a/acme_slug/__init__.py
+++ b/acme_slug/__init__.py
@@ -6,7 +6,7 @@

 def slugify(title: str) -> str:
     """Lowercase a title and join its words with hyphens."""
-    return re.sub(r"[^a-z0-9]+", "-", title.lower()).strip("-")
+    return re.sub(r"[^a-z0-9]+", "_", title.lower()).strip("_")


 def truncate_slug(slug: str, max_len: int) -> str:

prysk failed both test files. The scan passed all three console blocks because the commands still exited successfully; changed output is the contract prysk catches here.

-  release-notes-v2-0
+  release_notes_v2_0
-  testing-docs
+  testing_docs_example
# Ran 2 tests, 0 skipped, 2 failed.

The optional pytest plugin lets plain pytest collect prysk tests. In the checked run, the extra installed pytest-prysk 0.2.0 and pytest 7.4.4; both tests passed. Cram 0.7 also ran the same files with the same result.

python -m pip install "prysk[pytest-plugin]"
python -m pytest tests

Use -p no:prysk when you need to disable that pytest plugin. Keep a direct prysk run available when diagnosing whether collection or the transcript itself is responsible for a result.

Compare coverage

prysk/Cram feature What prysk does What the engine does in 0.6.3
.t transcript Runs its commands and checks expected output Never reads .t files
Console output Compares it with the transcript Runs prompted commands without comparing console output
Non-zero status Checks a bracketed status such as [2] Fails the shell block as runtime-error under set -e
Indented transcript in a console fence Uses Cram indentation in a .t file Skips an indented console block as output only
(re) and (glob) Allow specified flexible matches Give the engine no matching behavior
Interactive acceptance Merges actual output into a test for review Does not provide that prysk workflow

For output comparison, DocsAlive compares printed output only in Python pycon or python-repl sessions. A separate output block is recognized and skipped. Keep prysk’s transcript checks for the command contract even when the page scan is green.

Triage the result

Finding Likely cause What to do
Markdown file passes immediately in prysk Lines were treated as comments and no commands ran Generate a .t transcript and inspect it
Diff shows changed output Implementation or documented result changed Reproduce and decide which side is correct
Diff adds [2] The command returned a status missing from the transcript Document and test the intended status
Scan reports runtime-error A command exited non-zero under set -e Review whether failure is expected and show the status clearly
Scan passes after output changes Console output is not compared Run prysk against the transcript
Generated test is stale The bridge was not rerun Generate before testing in CI
A block is skipped Indentation, a host tool or another scan limit applies Review the skip reason and use an appropriate separate check

Use a clean checkout for scans. A local .pytest_cache/README.md can otherwise appear as a page. Unknown fence labels are another known engine limit: in 0.6.3 they can be reported as passing without being run or parsed. Review what was actually covered.

A checklist for your repository

[ ] Keep command output and exit statuses in reviewed .t tests.
[ ] Generate tests from published console fences before running prysk.
[ ] Inspect generated files for commands and expected output.
[ ] Use exact output where stable and justified flexible matches elsewhere.
[ ] Review .err diffs before accepting actual output.
[ ] Check working directories, temporary paths and environment assumptions.
[ ] Test expected non-zero exits explicitly.
[ ] Run prysk in CI and verify the intended files were collected.
[ ] Run a clean-checkout page scan and review skips and findings.
[ ] Repeat checks when commands, dependencies or docs change.

Where DocsAlive fits

Keep the CLI contract in .t files and run prysk in CI. Generate transcripts from the published page where practical, so a separate hand-maintained test cannot silently diverge from the reader’s instructions.

DocsAlive can add clean-sandbox execution of supported examples on the same pages, including Python and supported configuration blocks, and classify findings such as missing installation context. It does not replace prysk’s output comparison. See README testing, GitHub Actions docs testing and the findings reference for the surrounding workflow.

The sources we checked

These sources were read on November 16, 2026. Engine behavior was checked against engine 0.6.3 on the same day.

Source What it covers
Cram documentation Transcript format, matching, environment and options
prysk documentation Maintained fork and its additions
prysk getting started Installation and interactive workflow
prysk pytest plugin pytest collection and plugin control

FAQ

What is a Cram-style test?

It is a .t file containing indented shell commands and expected output. The runner executes the commands and reports differences, including unexpected exit statuses.

Why did prysk pass my Markdown page without testing it?

Ordinary unindented Markdown lines can be treated as comments. In the checked example no commands ran, yet the file counted as passing. Generate and inspect a transcript instead.

When should I use flexible output matches?

Use (re) or (glob) for portions that can legitimately vary, and keep stable parts exact. Review whether the resulting transcript remains useful to readers.

What does DocsAlive do with prysk examples in 0.6.3?

It never reads .t files or compares console output. A non-zero exit is a runtime-error under set -e, indented Cram-style console blocks are skipped, and (re) and (glob) have no meaning to it. It is not a replacement for prysk on command output.

Should I accept every interactive diff?

No. The actual result may reveal an implementation defect or an unintended change. Review the diff against the intended command contract before accepting it.

Can pytest run prysk tests?

Yes. The optional prysk pytest plugin collects them through pytest. Use -p no:prysk to disable that plugin when needed.

Keep reading
Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs Testing: How to Test the Code Samples in Your Docs

Why code examples in documentation break, the ways teams test them (doctest, docs-as-tests, CI runners) and how to run every sample on each release.

Two lenses held over the same documentation page, each bringing a different layer into focusComparison

Vale vs markdownlint: What Each Docs Linter Catches

Vale checks prose style; markdownlint checks Markdown structure. What each catches, sample configs, running both in CI and what neither one tests.

Blueprint of two documentation pages: one with a handwritten test script, one whose code blocks are framed and checkedComparison

Doc Detective vs DocsAlive: Testing the Code in Your Docs

Doc Detective is a free, open-source docs-as-tests framework; DocsAlive is a hosted docs CI for code examples. Features, price, setup and when to use each.

A machine blueprint above a ruled documentation page, with a caliper measuring between themComparison

Promptless Alternative: Promptless vs DocsAlive Compared

Promptless drafts docs updates from what you ship; DocsAlive runs the code examples you've published. Features, pricing, security and when to use each.

A long workbench of outlined testing instruments, each with a small lime light, beside a stack of documentation pagesGuide

Best Free Tools to Test Code Examples in Documentation

Free, open-source tools that run the code examples in your docs: rustdoc, Go examples, doctest, pytest plugins, Sphinx doctest, Doc Detective and byexample.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing SDK Docs Before Every Release: A Release-Gate Guide

Test SDK and client-library docs against the package you ship: build the wheel or npm tarball, install it clean, run every example, and gate the release in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test Quickstarts and Tutorials in Your Docs

Test the onboarding path a new reader follows: run quickstarts in a clean environment, in page order, sort real bugs from credentials and fragments, and wire it into CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test CLI Documentation: Commands, Flags and Output

Test the commands a CLI page promises: install in a clean container, run examples in order, compare flags with --help, check exit codes and output, and run it in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test API Reference Docs: Requests, Responses and SDKs

Test API reference pages against the contract they publish: methods, parameters, request and response examples, SDK snippets, status codes and OpenAPI samples.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for API-first companies

Keep API quickstarts, SDK snippets and curl examples working across releases.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for CLI and developer-tool vendors

Test developer-tool install paths, package managers and command examples across releases.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing README Code Examples: Install, Usage and CI

Keep README install commands and usage examples working with clean environments, output checks and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Notebooks and Executable Docs: Cells, Kernels and Output

Test notebooks in fresh kernels, check meaningful output and manage dependencies, data and drift in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Docs in GitHub Actions: Pull Requests and Scheduled Checks

Run documentation example checks in GitHub Actions with practical guidance on schedules, path filters, caching, secrets and reports.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Code Examples in MkDocs, Docusaurus and Sphinx Sites

Find and test documentation examples in Markdown, MDX and reStructuredText, alongside site builds and link checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Python Docs Testing: Doctest, Pytest and Markdown

Test Python documentation with doctest, pytest, Markdown example execution and isolated environments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

JavaScript Docs Testing: Node, TypeScript and Modules

Test Node and TypeScript documentation examples across module formats, package versions and type checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Go documentation examples

Test Go example functions and Markdown snippets against the intended module versions in clean environments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Sphinx Docs Testing: doctest, code-block and MyST

Test Sphinx documentation examples: what the doctest and linkcheck builders prove, code-block and literalinclude, MyST fences, and what a Markdown scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

ReadMe Docs Testing: CLI, OpenAPI and Code Examples

Test ReadMe documentation examples: docs-as-code and bi-directional sync, what lint and oas:validate prove, Tabs variants and runnable code.

Outlined documentation pages with a lime pulse line running out of the stackGuide

TypeScript Docs Testing: tsc --noEmit and Runtime

Test TypeScript documentation examples: type-check snippets with tsc --noEmit in a consumer project, then run them, and what each check proves.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docusaurus Docs Testing: Code Blocks, Tabs and MDX

Test Docusaurus documentation examples: builds vs runnable code, code block metadata, Tabs install variants, MDX pages and clean-container runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Mintlify Docs Testing: CodeGroup, Tabs and the CLI

Test Mintlify documentation examples: docs.json, MDX pages, CodeGroup and Tabs variants, what mint broken-links and mint validate prove, and clean runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

MkDocs Docs Testing: Code Examples, Tabs and Snippets

Test MkDocs documentation examples: strict builds, Material tabs, Snippets includes, mkdocstrings pages and clean-container runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Installation Instructions: pip, npm and Containers

Test documented install steps in clean environments: pip and extras, venv, npm install vs npm ci, containers and the first import.

Outlined documentation pages with a lime pulse line running out of the stackGuide

AI SDK Docs Testing: LLM Examples, Keys and Drift

Test AI and LLM SDK documentation examples: requests, responses, streaming, tool calls, credentials, model retirements and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing migration guides and changelog examples

Test before and after examples against the right releases and make migration documentation part of the release gate.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs Testing Checklist: Code Examples Before Release

A practical pre-release checklist for testing documentation examples, reviewing gaps and verifying published packages.

Outlined documentation pages with a lime pulse line running out of the stackGuide

The Cost of Broken Code Examples in Documentation

Understand how broken documentation examples create friction in developer adoption and support, and how to reduce it.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Rust documentation examples

Test Rust rustdoc examples and cargo documentation tests, and keep native Rust checks because compiled Rust fences are recognized but not executed.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing VitePress documentation examples

Test VitePress Markdown examples separately from the site build, including code groups, includes and what a plain Markdown scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs in GitLab CI

Run documentation example checks in GitLab CI jobs, keep site builds separate from execution, and review what a scan covers and skips.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing JSON, TOML and YAML examples in docs

Test JSON, TOML and YAML config examples in documentation: parse, schema and tool checks, honest fence labels, fragments, CI jobs and what a scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Java documentation examples

Test Java examples in READMEs, SDK docs and Javadoc: the source launcher, javac, JShell scripts, assertions, @snippet files, CI and what a scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing PHP documentation examples

Test PHP examples in docs: php -l lint, clean-directory runs, assertions with zend.assertions, Composer scratch projects, PHPUnit, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing C# documentation examples

Test C# examples in docs: .NET 10 file-based apps, dotnet build with warnings as errors, test projects, XML doc comments, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Ruby documentation examples

Test Ruby examples in docs: ruby -c syntax checks, clean-directory runs, bundler/inline, minitest assertions, YARD examples, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Kotlin documentation examples

Test Kotlin examples in docs: kotlinc runnable JARs and scripts, -Werror, KDoc @sample in compiled source, kotlinx-knit, fence labels, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Swift documentation examples

Test Swift examples in docs: swift scripts, swiftc -typecheck, DocC snippets compiled by swift build, Swift Testing assertions, CI containers and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing curl and HTTP examples in API docs

Test curl examples in API docs: --fail-with-body, status and JSON checks against a local stub, http fences, credentials and what a docs scan checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Astro Starlight documentation examples

Test code examples in Astro Starlight docs: src/content/docs inventory, Tabs and Expressive Code, Markdoc pages, a Node check script, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Nextra documentation examples

Test code examples in Nextra docs: content/ and app/ sources, fence metadata, Tabs and npm2yarn, a Node check script, CI and an honest scan limitation.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for open-source projects

Test the code examples in open-source docs and READMEs: pull requests from forks, release and scheduled checks, contributor guidelines, triage and the Open source plan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for technical writers and docs teams

How technical writers and docs teams test the code examples they publish: docs-as-code checks, style-guide rules, reading a report, routing findings to engineers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for DevRel teams

How developer advocates test quickstarts, tutorials, workshops and sample READMEs: an inventory, a launch and release cadence, reading a report, and honest reporting.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Hugo documentation examples

Test the code examples in Hugo docs: fences with brace options, the highlight shortcode, Docsy tabs, drafts and theme example sites, scan scope and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing GitBook documentation examples

Test the code examples in GitBook docs synced to Git: the space root, code tags, tabs, reusable includes, invisible characters, scan scope and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing SQL examples in documentation

Test SQL examples in docs: run fences in page order on a fresh database, assert results, handle dialects, SQLite STRICT typing, psql ON_ERROR_STOP and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing mdBook documentation examples

Test the code in an mdBook: what mdbook test covers, rust attributes, hidden lines, include directives, untagged output fences and a scan-ready copy for CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Docsify documentation examples

Test the code examples in Docsify docs: embedded code files and fragments, docsify-tabs tab sets, Prism grammars, scan scope and a CI check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Jekyll documentation examples

Test the code examples in Jekyll docs: include tags, site variables, highlight tags, posts and _site copies, a scan-ready copy and Ruby hooks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Antora and AsciiDoc documentation examples

Test the code examples in Antora docs: example includes, tagged regions, attributes, failing the build on missing includes and a Markdown copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Fumadocs documentation examples

Test the code examples in Fumadocs docs: npm fences and package-manager tabs, tab groups, the Tabs component, includes, pycon highlighting and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing versioned Docusaurus docs

Test every Docusaurus version readers can reach: versioned_docs copies, versions.json, partials, tabs, per-version scans and old-version triage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Read the Docs documentation examples

Test the code examples on a Read the Docs site: .readthedocs.yaml build jobs, a pycon gate, latest and stable versions, Sphinx, MyST and .rst coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Eleventy documentation examples

Test the code examples in Eleventy docs: Liquid pre-processing, global data, include tags, ignored drafts, raw tags and a rendered copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Zola documentation examples

Test the code examples in Zola docs: Tera content templating, raw tags, config values, hide_lines, drafts, blog posts and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Quarto documentation examples

Test the code examples in Quarto docs: executable cells, display-only fences, freeze and _freeze, a CI profile, cell options and a copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Hexo documentation examples

Test the code examples in Hexo docs: posts, drafts, scaffolds, codeblock and include_code tags, a build check and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing pdoc documentation examples

Test the code examples in pdoc docs: doctest for >>> sessions, fenced docstring examples, the README, private items and a copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Doxygen documentation examples

Test the code examples in Doxygen docs: compiled example files, snippets, Markdown pages, WARN_AS_ERROR and what a scan can and cannot check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing TypeDoc documentation examples

Test the code examples in TypeDoc docs: example tags, includeCode regions, project documents, a compiler check of extracted examples and a scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing JSDoc documentation examples

Test the code examples in JSDoc docs: example tags, captions, source patterns, tutorials, a doclet export and a scan-ready copy with assertions.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs examples with pre-commit hooks

Check docs code examples with pre-commit: local hooks, files filters, always_run, pass_filenames, SKIP and --no-verify, and what to leave for CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing documentation examples with Deno

Run docs code examples with deno test --doc: JSDoc and Markdown examples, imports, hashbang permissions, ignored blocks and deno check --doc-only.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing documentation examples with Sybil

Test Python docs examples with Sybil and pytest: Markdown parsers, invisible setup, skips, clear-namespace, docstrings and pycon fences a scan can read.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdoc documentation examples

Test the code examples in Markdoc docs: variables in fences, partials, if/else, custom tabs, validate in CI and a scan-ready copy from transform.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown examples with phmdoctest

Test Python examples in README and Markdown files with phmdoctest: sessions, output blocks, directives, --report, generated pytest files and pycon fences.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code blocks with pytest-markdown-docs

Run Markdown python fences as pytest tests with pytest-markdown-docs: globals hook, fixtures, continuation, notest, retry and pinning the released version.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Python docstring examples with xdoctest

Run docstring examples with xdoctest: the pytest plugin, google and freeform parsing, permissive output matching, directives, and what it does not check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing multi-language docs examples with byexample

Test docs examples with byexample: prompt-based language detection, the -l selection, +pass, +skip and timeouts, capture tags, and hidden setup in comments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code blocks with mktestdocs

Run Markdown code blocks under pytest with mktestdocs: exact fence labels, memory=True for shared state, bash blocks, custom executors and docstring checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing README code blocks with pytest-codeblocks

Run README and Markdown code blocks with pytest-codeblocks: exact python, sh and bash labels, cont, skip and xfail markers, expected output, and gaps.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code examples in any language with txm

Test annotated Markdown examples with txm: program, in, out, err, check and exit annotations, TAP output, exact matching, and blocks it never runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Sphinx docs examples with sphinx.ext.doctest

Run Sphinx doctest, testcode and testoutput directives in reStructuredText or MyST pages: groups, hidden setup, global setup and what is never run.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs examples that need API keys

Test credential-gated docs examples: honest placeholders, offline stubs and fixtures, live sandbox jobs, CI secrets and fork rules, and how a scan classifies them.

A machine blueprint above a ruled documentation page, with a caliper measuring between themGuide

Documentation Drift: How to Detect It Before Users Do

What documentation drift is, why code examples drift first, and practical ways to detect it: ownership, release checks, link and execution tests.

See which of your code samples still run.

Send us a public repository. Our team runs DocsAlive on its docs and emails you the real report within 2 business days. Free, no signup.