Docs Code Validation
Thepraisonai docs command extracts and validates Python code blocks from your Mintlify documentation, ensuring all examples are runnable and correct.
Quick Start
Commands
praisonai docs run
Extracts Python code blocks from documentation, classifies them as runnable or partial, executes runnable blocks, and generates reports.
Examples:
--dry-run preview mode
Use --dry-run to see exactly what docs run would execute — no subprocesses, no API calls, no cost.
status: not_runskip_reason: "Dry run"- The
runnable_decisionfield the classifier assigned (so you can audit which blocks would have run)
Dry-run does not validate that code executes correctly — it only proves that the runner sees the block and classifies it as runnable. Use it as a fast preview before a real run, or in PRs to confirm no new blocks were unintentionally added or removed.
When to use --dry-run
Choose between --dry-run, --mode strict, and the default lenient run:
Contributor opening a docs PR — add an .mdx file with a Python block, run praisonai docs run --dry-run --docs-path ./docs, confirm the new block is classified not_run with skip_reason: "Dry run", then push so CI runs the full suite.
Maintainer auditing a large docs tree — run praisonai docs run --dry-run --report-dir ./audit, then filter report.csv for status=not_run to see the full inventory of runnable blocks — no cost, no LLM waiting.
CI PR-preview job — on PR events, call praisonai docs run --dry-run and upload report.md as an artifact so reviewers see what a real run would attempt without spending API tokens.
Example: preview before a real run
praisonai docs list
Lists all discovered code blocks without executing them.
Examples:
Code Block Classification
The system classifies each Python code block as:Terminal Actions Detected
agents.start()/agent.start()print()asyncio.run()if __name__ == "__main__":
Directives
Control execution behavior with HTML comments above code blocks:skip_reason: "Dry run" identifies items that were only previewed. Other not_run items come from runnable=false directives or lenient-mode classification.
CI/CD Integration
Add to your GitHub Actions workflow:praisonai docs run-all
Runs all documentation code blocks group-by-group with parallel execution by default.
Examples:
praisonai docs stats
Shows statistics for documentation code blocks by group.
Exit Codes
In strict mode (
--mode strict), exit code 1 is also returned if any blocks are marked as not_run.
CLI Command Validation
Thepraisonai docs cli subcommand group validates CLI commands found in bash code blocks within documentation. It discovers praisonai commands and validates them by running with --help to ensure they exist and work correctly.
Quick Start
praisonai docs cli run-all
Validates all CLI commands from documentation by running each with --help.
Examples:
praisonai docs cli list
Lists all discovered CLI commands from documentation without executing them.
Examples:
praisonai docs cli stats
Shows statistics for CLI commands found in documentation.
Example Output:
praisonai docs cli report
View CLI validation report with failures and error grouping.
Examples:
Command Classification
CLI commands are classified as:Placeholder Detection
Commands are automatically skipped if they contain:[OPTIONS]or[...]<file>,<name>,<path>style placeholderspath/to/,/my/project/style example pathsyour_,example_prefixed values

