artifact-export
by rob
Render artifact source code to binary formats (PNG, SVG, PDF)
# artifact-export Render artifact source code to binary formats (PNG, SVG, PDF) ## Installation This is a CmdForge tool. Install it from the CmdForge registry or create it locally using the CmdForge CLI. ## Usage The `artifact-export` tool accepts artifact source code via stdin and exports it to various binary formats. Use it in a pipeline: ```bash # Export PlantUML to PNG echo "@startuml Alice -> Bob: Hello @enduml" | artifact-export --format plantuml --to diagram.png # Export Mermaid diagram to SVG cat flowchart.mmd | artifact-export --format mermaid --to output.svg # Export OpenSCAD model to STL echo "cube([10, 10, 10]);" | artifact-export --format openscad --to model.stl # Export Excalidraw JSON to PNG cat drawing.excalidraw | artifact-export --format excalidraw --to image.png # Export SVG source to PDF cat graphic.svg | artifact-export --format svg --to document.pdf ``` ## Arguments | Flag | Variable | Description | |------|----------|-------------| | `--format` | `format` | Source format: plantuml, mermaid, openscad, svg, excalidraw, code | | `--to` | `output_path` | Output file path (extension determines output format, e.g. .png, .svg, .pdf) | ## How It Works 1. **Code Step**: Processes the input artifact source code and renders it to the specified output format using the appropriate rendering engine based on the `--format` flag. The output is written to the file specified by `--to`. The tool supports multiple artifact types commonly used in development: - **PlantUML**: UML diagrams - **Mermaid**: Flowcharts, sequence diagrams, Gantt charts - **OpenSCAD**: 3D models - **SVG**: Vector graphics - **Excalidraw**: Hand-drawn style diagrams - **Code**: Syntax-highlighted code blocks ## Dependencies This tool requires external rendering engines depending on the format: - **PlantUML**: Java and PlantUML JAR - **Mermaid**: Mermaid CLI (`mmdc`) - **OpenSCAD**: OpenSCAD CLI - **Excalidraw**: Excalidraw CLI or conversion utilities - **SVG**: ImageMagick or Inkscape for format conversion - **Code**: Syntax highlighting libraries (e.g., Pygments) Ensure the necessary tools are installed for the formats you intend to use.
Reviews
Login to reviewNo reviews yet.
Issues
No issues reported for this tool.
Write a Review
Share your experience with this tool.
0/2000
Report an Issue
Help improve this tool by reporting bugs or security issues.