A CLI tool that auto-generates Mermaid diagrams from your codebase. Scan your project, extract dependencies, and get architecture visualizations instantly—no API calls required.
- Scans your codebase and extracts import/export relationships
- Generates Mermaid diagrams for architecture, data flow, and module dependencies
- Outputs to stdout or markdown files (free version)
- Creates interactive HTML reports with rendered diagrams (premium)
- Exports dependency graphs as JSON/CSV (premium)
- Team-friendly config files for consistent diagram generation (premium)
npm install -g diagramdraftOr use directly:
npx diagramdraftdiagramdraft --path ./src --type flowchartdiagramdraft --path ./src --output diagram.mddiagramdraft --path ./src --type flowchart,sequence,componentdiagramdraft --path ./src --reportAnalyze a specific directory:
diagramdraft --path ./services --type componentGenerate and save to file:
diagramdraft --path ./src --output architecture.md --type flowchartUse a config file (premium):
diagramdraft --config diagramdraft.config.jsonExport dependency graph (premium):
diagramdraft --path ./src --export json --output deps.jsonCreate a diagramdraft.config.json file:
{
"paths": ["./src", "./lib"],
"types": ["flowchart", "component"],
"output": "./diagrams",
"exclude": ["node_modules", "test"],
"reportFormat": "html"
}| Feature | Free | Premium |
|---|---|---|
| Codebase scanning | ✓ | ✓ |
| Mermaid diagram generation | ✓ | ✓ |
| Stdout/markdown output | ✓ | ✓ |
| Interactive HTML reports | ✓ | |
| JSON/CSV export | ✓ | |
| Config files | ✓ | |
| Team collaboration | ✓ |
Q: Does DiagramDraft require API keys?
A: No. Everything runs locally on your machine.
Q: What file types are supported?
A: JavaScript, TypeScript, Python, Java, and Go.
Q: Can I customize the diagram output?
A: Yes. Use config files (premium) or pass CLI flags to customize paths, types, and output formats.
Q: How do I integrate diagrams into my docs?
A: Copy the Mermaid code from stdout or markdown files directly into your documentation.
Q: Is there a way to exclude certain directories?
A: Yes. Use the --exclude flag or add exclusions to your config file (premium).
Q: Can teams share diagram configurations?
A: Yes, with premium. Commit your diagramdraft.config.json to version control.
Built with AI by Craftpipe
Support: support@heijnesdigital.com
Upgrade to Pro for:
- html report
- json csv export
- config file
Get Pro → craftpipe.gumroad.com (€39)
Set PRO_LICENSE=<your-key> environment variable to unlock.