Graphrt

QR Code

Generate PNG or SVG files (error correction, size, colours) and decode QR/Micro QR codes from local images (zxing-wasm loaded from node_modules, never a CDN), pixel cap, new output files only

Stable v0.1.0 Node.js 2 actions
Use in Graphrt Desktop

About

A Graphrt plugin for QR codes. Workflows and agents can generate a QR code as a new PNG or SVG file, and decode the QR codes in a local image. Generation uses qrcode, decoding uses zxing-wasm (the ZXing C++ reader compiled to WebAssembly), both pure JavaScript/WebAssembly with no native build.

What it can do

  • generate: text (a URL or any text) as png or svg, with error_correction (L, M, Q, H), margin, module_size or image_size, dark_color and light_color, include_data: true also returns the SVG text or a PNG data: URL.
  • decode: QR, Micro QR and rMQR codes in a png, jpeg, gif or bmp image: each code's text, content type, error correction level and corner positions, up to max_codes, try_harder also tries rotated and inverted images.

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Generate a QR code qr-code.generate
  • Decode QR codes qr-code.decode

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • QR_CODE_INPUT_DIRS (required for decode)
    Comma-separated directories (absolute or ~/...) that images may be read from, subdirectories included
  • QR_CODE_OUTPUT_DIR (required for generate)
    Existing directory for generated codes, they can be read back by decode
  • QR_CODE_MAX_INPUT_BYTES 25 MiB
    Largest image to decode
  • QR_CODE_MAX_OUTPUT_BYTES 10 MiB
    Largest generated file
  • QR_CODE_MAX_INPUT_PIXELS 40000000
    Most pixels (width × height, read from the header) of an image to decode
  • QR_CODE_MAX_OUTPUT_PIXELS 16777216 (4096²)
    Most pixels of a generated PNG ((modules + 2 × margin) × module_size, squared)

How to use it

In Graphrt Desktop

  1. Open Plugins and search for QR Code.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install qr-code
workflow.yaml
- id: qr_code
  type: qr-code.generate
Plugins in the docs