Automated Documentation Generator based on Markdown DSL and Playwright.
DocuFlow allows you to embed execution scripts directly within your Markdown files. It automatically runs these scripts to capture screenshots or record videos, and then generates a "published" version of your document with the artifacts embedded.
- Single Source of Truth: The documentation contains the automation script.
- Automated: Always up-to-date screenshots and videos.
- Simple DSL: Easy-to-write syntax for browser automation.
DocuFlow relies on Playwright. Ensure you have Node.js (>=18) installed.
Global Installation:
pnpm install -g @mizufinancial/docuflow
pnpx playwright install chromiumLocal Installation:
pnpm add -D @mizufinancial/docuflow
pnpm exec playwright install chromiumWrite flow code blocks in your Markdown file (example.md):
# My Feature
Here is the homepage:
```flow
config viewport 1280x720
goto https://example.com
snapshot homepage.png
```Run the tool to process your files:
# Process all .md files in the current directory
pnpx docuflow
# Process a specific directory
pnpx docuflow ./docsOutput:
The tool will generate a new file named example-done.md.
- The
flowcode blocks will be removed. - The generated images/videos will be inserted in their place.
- YAML metadata (frontmatter) will be added to the top of the file.
See DSL_SPEC.md for full syntax details.
Check out Mizu Homepage for a real-world example.