@icarusmx/vandeley
v0.1.0
Published
CLI tool for batch converting Mermaid diagrams to PDF
Downloads
15
Maintainers
Readme
@icarusmx/vandeley
CLI tool for batch converting Mermaid diagrams (
.mmd) to PDF
Simple, fast, and focused. Convert all your Mermaid diagrams to PDFs with a single command.
Installation
# Use with npx (no installation needed)
npx @icarusmx/vandeley
# Or install globally
npm install -g @icarusmx/vandeley
# Or as a dev dependency in your project
npm install --save-dev @icarusmx/vandeleyUsage
Basic Usage
By default, vandeley looks for .mmd files in a mmd/ directory and outputs PDFs to pdf/:
vandeleyThis converts:
mmd/
├── sequence-diagram.mmd
├── architecture.mmd
└── erd.mmdTo:
pdf/
├── sequence-diagram.pdf
├── architecture.pdf
└── erd.pdfCustom Directories
Specify custom input and output directories:
vandeley -i diagrams -o exports
vandeley --input src/docs --output dist/pdfHelp
vandeley --helpProject Structure
Recommended project structure for documentation:
your-project/
├── docs/
│ └── diagrams/
│ ├── mmd/ # Source files (track in git)
│ │ ├── sequence.mmd
│ │ ├── architecture.mmd
│ │ └── erd.mmd
│ └── pdf/ # Generated files (commit or ignore)
│ ├── sequence.pdf
│ ├── architecture.pdf
│ └── erd.pdf
└── package.jsonNPM Script
Add to your package.json:
{
"scripts": {
"docs:diagrams": "vandeley -i docs/diagrams/mmd -o docs/diagrams/pdf"
}
}Then run:
npm run docs:diagramsFeatures
- ✅ Batch converts all
.mmdfiles in a directory - ✅ Creates output directory automatically
- ✅ Shows progress for each file
- ✅ Summary of conversions (success/failed)
- ✅ Transparent backgrounds on PDFs
- ✅ Works with any Mermaid diagram type
- ✅ Clean, minimal CLI interface
Requirements
- Node.js >= 18.0.0
- Puppeteer dependencies (usually installed automatically)
Error Handling
If a diagram fails to convert, vandeley will:
- Mark it as failed
- Continue with remaining diagrams
- Show error summary at the end
- Exit with error code if any conversions failed
Why "Vandeley"?
Named after Vandeley Industries from Seinfeld - because sometimes you need a simple, reliable tool that just works.
License
MIT © Icarus MX
