QR Code Styling CLI
Effortlessly generate customised QR codes from the command line
Configuration
The qr-code-styling command has two required parameters: a JSON configuration file and the output directory where the generated files will be placed.
The configuration file has a structure which matches that of the QRCodeStyling options, with extra options to set output format, size, and validation. If you’ve already designed a QR code using the Styled QR Generator, you can download your configuration file from the Download button context menu or the JSON config section of the editor. Image, fonts, and other resources needed to generate the QR code can be included in the configuration as file paths (resolved relative to the configuration file location).
Output format and size
Output format is set either as --format svg CLI option, or using "format": "svg" in the config file. When using raster output formats (png, jpg, webp), the generated image width is set to the provided --size value (1200 by default) and image height is calculated based on the aspect ratio. In most cases, the aspect ratio is 1:1 since the generated QR codes are square, but a plugin could change that by adding asymmetric decorations. Since svg and pdf formats produce vector images, the --size option is ignored for those formats.
Command line output
On a successful run, the qr-code-styling command prints a JSON list with the summary of the generated QR codes. Each entry contains the QR code data, output path, validation info, and template context.