--- name: generate-qr description: Generate a styled, scannable QR code with the QRdx CLI (@qrdx/cli) from a URL, text, Wi-Fi login or vCard and save it as SVG, PNG, WebP or EPS, or make one code per row of a CSV file. Supports solid colors, linear, radial and angular gradients, body, eye and corner dot patterns, call-to-action frames with a label, decorative templates and a center logo. Use when the user says "create a QR code", "generate a QR for this URL", "make a Wi-Fi QR", "build a branded QR with our logo", "add a gradient to the QR", "add a Scan me frame", "use the Arrow template", "make QR codes for every row of this CSV", or needs to automate QR code creation in a workflow. license: MIT compatibility: Requires Node.js 22 or later and network access to the npm registry. metadata: version: "2.2.1" --- # Generate QR Code Generate a styled, scannable QR code with the QRdx CLI, [`@qrdx/cli`](https://www.npmjs.com/package/@qrdx/cli). Its command is `qrdx`; the `qrdx` npm package itself is the React library. The code is rendered on this machine and nothing is uploaded. The only network requests are npm downloading the CLI and, if you pass `--logo` with a URL, fetching that image. **The CLI version is pinned on purpose.** Every command here runs `npx @qrdx/cli@0.0.13`, the release this file was checked against, so an agent never runs whatever happens to be newest on npm. The CLI ships an `npm-shrinkwrap.json`, so the pin fixes the versions of its dependencies too. Don't drop the version or swap in `@latest`. To update the skill: run `npm view @qrdx/cli version`, read that version's `npx @qrdx/cli@ --help`, update the flags and value lists below to match, then change the version in every command and bump `metadata.version`. **Secrets.** Put a Wi-Fi password or other secret only in the command you run. Never repeat it back in replies, summaries or logs; call it "the password you gave". ## Usage ```bash npx @qrdx/cli@0.0.13 generate "" -o [flags] ``` - ``: the URL or text to encode (required). Wrap it in quotes. - `-o, --output `: the output file. The extension sets the format: `.svg`, `.png`, `.webp` (lossless) or `.eps` (vector, for print). The folder must already exist. Without `-o` the CLI writes `qr.svg` in the current folder, so always pass it. Always pass both the data and `-o`. In an interactive terminal the CLI asks for anything missing; agent shells usually aren't interactive, so it runs straight through. If it ever stops at a prompt, run it again with `CI=true` in front. **Flags (all optional):** | Flag | Default | Description | |------|---------|-------------| | `--format ` | from the extension | Format when the file name has no extension. If both are given they must match. | | `--size ` | `512` | Size of the QR code in pixels (points for EPS). PNG and WebP allow up to 10000. | | `-l, --level ` | `Q` | Error correction level | | `--body ` | `square` | Body dot pattern | | `--eye ` | `square` | Corner eye pattern | | `--dot ` | `square` | Corner dot pattern | | `--fg ` | `#000000` | Foreground color (hex or JSON gradient) | | `--bg ` | `#ffffff` | Background color (hex or JSON gradient) | | `--eye-color ` | matches `--fg` | Corner eye color (hex or JSON gradient) | | `--dot-color ` | matches `--fg` | Corner dot color (hex or JSON gradient) | | `--logo ` | none | Center logo image URL, 20% of the code's width, with the modules behind it cleared. Use with `--level H`. PNG, WebP and EPS embed the image; SVG links to the URL. | | `--margin ` | `0` | Quiet zone margin in modules | | `--template ` | none | Decorative template wrapper (case-sensitive) | | `--frame