CLI tool for Mintlify documentation validation and utilities.
npm install -g @writechoice/mint-cli
npx playwright install chromium# Generate a config.json with your docs URL
writechoice config
# Edit config.json and set your source URL
# "source": "https://docs.example.com"
# Then run any command without arguments
writechoice check parse
writechoice check links
writechoice metadata| Command | Description |
|---|---|
writechoice check parse |
Validate MDX files for parsing errors |
writechoice check links [baseUrl] |
Validate internal links and anchors using Playwright |
| Command | Description |
|---|---|
writechoice fix parse |
Fix void tags and stray angle brackets |
writechoice fix links |
Fix broken anchor links from a validation report |
writechoice fix codeblocks |
Add/remove expandable, lines, wrap on code blocks |
writechoice fix images |
Wrap standalone images in <Frame> |
writechoice fix inlineimages |
Convert inline images to <InlineImage> |
writechoice fix h1 |
Remove H1 headings that duplicate the frontmatter title |
| Command | Description |
|---|---|
writechoice metadata |
Fetch meta tags from live pages and write to frontmatter |
writechoice config |
Generate a config.json template |
writechoice update |
Update to the latest version |
All commands support --file <path>, --dir <path>, --dry-run, and --quiet where applicable.
Create a config.json in your project root to set defaults and avoid repeating arguments:
{
"source": "https://docs.example.com",
"target": "http://localhost:3000"
}Run writechoice config to generate a full template with all options.
See docs/config-file.md for the complete reference.
Full command documentation is in docs/commands/:
- check-links
- check-parse
- fix-links
- fix-parse
- fix-codeblocks
- fix-images
- fix-inlineimages
- fix-h1
- metadata
Playwright not installed:
npx playwright install chromiumToo many concurrent requests:
writechoice check links -c 10Permission error on install:
sudo npm install -g @writechoice/mint-cli
# or use nvm: https://github.com/nvm-sh/nvm