zpl_toolchain_cli-0.1.3 is not a library.
zpl — ZPL Toolchain CLI
Command-line interface for parsing, validating, formatting, and printing ZPL II label code.
Part of the zpl-toolchain project.
Installation
# From crates.io (TCP printing included by default)
# With USB and serial/Bluetooth support
Pre-built binaries with all transports are available from GitHub Releases.
Commands
# Parse and inspect ZPL
# Validate ZPL (with optional printer profile)
# Check syntax only
# Format ZPL
# Print ZPL to a network printer
# Print with validation and status query
# Print via USB (requires --features usb or release binary)
# Print via serial/Bluetooth (requires --features serial or release binary)
# Explain a diagnostic code
# Check spec coverage
Global Options
| Flag | Description |
|---|---|
--tables <PATH> |
Path to parser_tables.json (default: embedded at compile time) |
--output pretty|json |
Output format (default: auto-detect TTY) |
Print Command Flags
| Flag | Description |
|---|---|
-p, --printer <ADDR> |
Printer address: IP, hostname, usb, usb:VID:PID, or serial path |
--profile <PATH> |
Printer profile JSON for pre-print validation |
--no-lint |
Skip validation before printing |
--strict |
Treat warnings as errors during validation |
--dry-run |
Validate and resolve address without sending |
--status |
Query ~HS host status after printing |
--info |
Query ~HI printer info after printing |
--wait [TIMEOUT] |
Wait for print completion (default: 30s) |
--timeout <MS> |
Connection timeout in milliseconds (default: 5000) |
--serial |
Use serial/Bluetooth SPP transport (requires --features serial) |
--baud <RATE> |
Baud rate for serial connections (default: 9600) |
Printer Address Formats
| Format | Transport | Example |
|---|---|---|
| IP or hostname | TCP (port 9100) | 192.168.1.55, printer.local |
| IP:port | TCP (custom port) | 192.168.1.55:6101 |
usb |
USB (auto-discover Zebra) | usb |
usb:VID:PID |
USB (specific device) | usb:0A5F:0100 |
| Serial path | Serial/BT SPP | /dev/ttyUSB0, COM3 |
License
Dual-licensed under MIT or Apache-2.0.