CLI Usage¶
Command-line interface reference for PinViz.
Basic Usage¶
Commands¶
Render a Diagram¶
Generate a diagram from a YAML or JSON configuration file:
Arguments:
CONFIG_FILE- Path to YAML or JSON configuration file-o, --output OUTPUT_FILE- Output SVG file path (default:<config>.svg)
Examples:
# Generate diagram (output defaults to my-diagram.svg)
pinviz render my-diagram.yaml
# Specify custom output path
pinviz render my-diagram.yaml -o output/wiring.svg
# Works with JSON too
pinviz render my-diagram.json -o output.svg
Generate Built-in Examples¶
Generate one of the built-in example diagrams:
Available examples:
bh1750- BH1750 I2C light sensorir_led- IR LED ring modulei2c_spi- Multiple I2C and SPI devices
Examples:
# Generate BH1750 example
pinviz example bh1750 -o bh1750.svg
# Generate IR LED example
pinviz example ir_led -o ir_led.svg
List Templates¶
List all available board and device templates:
This displays:
- Available board templates (Raspberry Pi 5 and Pi Zero 2 W)
- Available device templates
- Available example diagrams
Supported Boards:
raspberry_pi_5(aliases:rpi5,rpi) - Raspberry Pi 5 with 40-pin GPIO headerraspberry_pi_zero_2w(aliases:raspberry_pi_zero,pizero,zero2w,zero,rpizero) - Raspberry Pi Zero / Zero 2 W with 40-pin GPIO header
Global Options¶
--help- Show help message and exit--version- Show version and exit
Exit Codes¶
0- Success1- Error (file not found, invalid configuration, etc.)2- Command-line usage error
Environment Variables¶
Currently, PinViz does not use any environment variables.