---
name: drawio-export-tools
description: Decision guide for the third-party Draw.io export ecosystem by @rlespinasse. Covers docker-drawio-desktop-headless (base Docker), drawio-exporter (Rust backend), drawio-export (enhanced Docker), and drawio-export-action (GitHub Actions). Use when user mentions diagram export, CI/CD automation, batch processing, or Draw.io files. Helps select the right tool based on context.
---
# Draw.io Export Tools - Optimized Decision Guide
**Third-party ecosystem by [@rlespinasse](https://github.com/rlespinasse) - NOT official Draw.io**
## Response Strategy
**ALWAYS start with context questions, then provide ONLY relevant section.**
### Initial Response Pattern
```text
1. Ask 2-3 targeted questions
2. Provide solution for their specific case (300-500 tokens)
3. Offer: "Need details on [X/Y/Z]? Just ask."
```
**DO NOT dump all options unless explicitly requested.**
---
## Quick Decision Flow (USE THIS FIRST)
Ask these questions in order:
**Q1: "Where are you exporting diagrams?"**
- GitHub Actions → Provide: [GitHub Action Section]
- Local/Scripts → Continue to Q2
- Other CI/CD → Provide: [Docker Export Section]
**Q2: "What's your goal?"** (if not GitHub Actions)
- Simple one-off export → Provide: [Base Docker Section]
- Batch with custom naming → Provide: [Docker Export Section]
- Custom processing pipeline → Provide: [Advanced Section]
- Building a tool → Provide: [Rust Section]
**Q3: "Any special requirements?"** (if relevant)
- Custom naming → Add: output templates
- Specific pages → Add: page options
- Pre/post processing → Add: scripting examples
---
## Tool Quick Reference (Keep This Loaded)
| Use Case | Tool | One-Liner |
| -------------- | -------------------------------- | ------------------------------------------- |
| GitHub Actions | `drawio-export-action` | `uses: rlespinasse/drawio-export-action@v2` |
| Custom naming | `drawio-export` | `--output 'path/{basename}.{ext}'` |
| Simple export | `docker-drawio-desktop-headless` | `-x diagram.drawio -f pdf` |
| Custom tool | `drawio-exporter` | Rust library |
**Docs:** All tools at
---
## Response Sections (Provide On-Demand)
### [GitHub Action Section]
**When to provide:** User mentions GitHub Actions, CI/CD, or automated commits
```yaml
- uses: rlespinasse/drawio-export-action@v2
with:
format: pdf,png,svg
path: .
```
**Common options:** `format`, `path`, `output`, `transparent`, `scale`
**Offer:** "Need custom naming, specific pages, or workflow setup? Let me know."
**Full docs:**
---
### [Docker Export Section]
**When to provide:** User needs custom output structure, batch exports, or organized files
```bash
docker run -v $(pwd):/data rlespinasse/drawio-export \
--format pdf \
--output 'dist/{basename}.{ext}' \
diagrams/
```
**Output templates:**
- `{folder}` - source path
- `{basename}` - filename
- `{format}` - pdf/png/svg
- `{ext}` - extension
**Common patterns:**
- By format: `exports/{format}/{basename}.{ext}`
- With prefix: `{basename}-diagram.{ext}`
- Nested: `docs/{folder}/{basename}.{ext}`
**Offer:** "Need more template examples or CLI options?"
**Full docs:**
---
### [Base Docker Section]
**When to provide:** Simple one-off export, validation, or full CLI control
```bash
docker run -v $(pwd):/data -w /data \
rlespinasse/drawio-desktop-headless \
-x diagram.drawio -f pdf
```
**Essential options:**
- `-f ` - pdf, png, svg, jpg
- `-o