CLI
Generate styled QR codes as SVG, PNG, WebP or vector EPS from your terminal or CI with the @qrdx/cli command-line tool, one at a time or a whole CSV with qrdx batch.
@qrdx/cli renders the same QR codes as the playground and the qrdx library from the command line. It never prompts in scripts and CI, and when you run qrdx generate with no arguments in a terminal it asks for the content and options step by step.
npx @qrdx/cli generate "https://example.com" -o qr.svgInstall it globally to get the qrdx command:
npm install -g @qrdx/cli
qrdx generate "https://example.com" -o qr.png --size 1024It needs Node.js 22 or later. PNG and WebP output use sharp, an optional dependency npm installs where your platform supports it; SVG and EPS work without it. The qrdx npm package is the React library: the CLI is only in @qrdx/cli.
Output formats
The file extension picks the format, or use --format when the file name has none.
| Format | Use it for | --size means |
|---|---|---|
.svg | Web pages, design tools, scaling without loss | Width in pixels (default 512) |
.png | Documents, slides, anywhere that needs an image | Width in pixels |
.webp | Websites: the PNG's pixels, lossless, in a smaller file | Width in pixels |
.eps | Print shops, Illustrator, InDesign | Width in points (72 per inch, so 144 is 2 inches) |
EPS files are vector PostScript. PNG and JPEG logos are embedded as they are; other logo formats are converted with sharp when it's installed, and otherwise left out with a warning.
Options
| Flag | Default | Description |
|---|---|---|
-o, --output | qr.svg | Output file |
--format | from the extension | svg, png, webp or eps |
--size | 512 | Output size (see above) |
-l, --level | Q | Error correction: L, M, Q or H |
--body | square | Data module pattern |
--eye | square | Corner eye pattern |
--dot | square | Corner eye dot pattern |
--fg, --bg | #000000, #ffffff | Foreground and background: a hex color or a JSON gradient |
--eye-color, --dot-color | --fg | Corner eye and eye dot colors |
--logo | Center logo image URL (use with --level H) | |
--margin | 0 | Quiet zone, in modules |
--template | Arrow, StandardBox, SquareBorder, StrikedBox or Halloween | |
--frame | Call-to-action frame: any of the 19 frame styles, such as banner-bottom, rounded-border, circle, sticker or phone (see all of them) | |
--frame-text | Scan me | Frame label, up to 24 characters |
--frame-color, --frame-text-color | Frame and label colors (hex) |
qrdx --help lists every pattern name. Invalid values exit with code 1 and a message listing the accepted values.
Many codes from a CSV
qrdx batch writes a static QR code for every row of a CSV file into a folder:
qrdx batch products.csv -o codes --format png --size 1024 --body circleIt reads the same columns as the bulk generator: the content from a column named value, url, link, data, content, text or qr (else the first column), and file names from one named file name, name, label, id, title or sku (else qr-00001, qr-00002 and so on). Choose others by header name or column number:
| Flag | Default | Description |
|---|---|---|
-o, --out | qr-codes | Folder for the codes |
--format | svg | svg, png or eps |
--value-column | guessed | Column with each code's content |
--name-column | guessed | Column with file names |
--no-header | The first row is a code, not column names | |
--jobs | 4 for SVG, 8 otherwise | Codes rendered at a time |
Every style option above applies to all the codes. The CSV is read as a stream and each code is saved as soon as it's made, so the command has no row limit: on a laptop, 10,000 SVG codes took about 40 seconds and under 200 MB of memory. Nothing is uploaded and no account is needed. Rows that can't be encoded are skipped and listed with the reason in errors.csv in the output folder.
To print dynamic codes in bulk, create them first (the dashboard's CSV import or the API) and run qrdx batch on the results CSV the import gives you, with --value-column short_link.
Examples
# High-resolution PNG for print
qrdx generate "https://example.com" -o qr.png --size 2048 --level H
# Vector EPS, 2 inches wide, for a print shop
qrdx generate "https://example.com" -o qr.eps --size 144
# Branded colors and patterns
qrdx generate "https://example.com" --body circle --eye rounded --fg "#1a1a2e" -o brand.svg
# Gradient foreground
qrdx generate "https://example.com" -o gradient.svg \
--fg '{"type":"linear","stops":[{"color":"#6366f1","offset":0},{"color":"#ec4899","offset":100}],"angle":135}'
# "Scan for the menu" frame
qrdx generate "https://example.com/menu" --frame banner-bottom --frame-text "Scan for the menu" -o menu.png
# Wi-Fi network
qrdx generate "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;" -o wifi.svgTo print a dynamic QR code, pass its short link (https://qrdx.dev/q/<slug>) as the data.
Use it from an AI coding agent
The repository's generate-qr skill teaches agents such as Claude Code to call the CLI. For agents that support MCP, the MCP server needs no install at all.
Last updated on
Use QRdx with AI agents
Connect Claude, ChatGPT, Cursor, VS Code or Devin Desktop to the QRdx MCP server, give agents keyless QR image URLs, and call the REST API for a user.
n8n
Make QR codes, manage dynamic codes, read scans and start n8n workflows from QRdx events with the QRdx community nodes for n8n.