---
name: qr-build
description: Generate styled QR codes for URL, wifi password (auto-format), vCard, plain text, or arbitrary payloads. Custom foreground/background colors, optional center logo overlay (auto-resized + framed), optional rounded modules for modern aesthetic. Outputs PNG or SVG. Pure Python via qrcode + Pillow. Use when the user asks for a QR code, wifi QR, contact QR, "scan-to-pay", or wants a stylized QR for a poster / cover art.
---


# qr-build

Generate stylized QR codes — URL, wifi, vCard, or plain text. Custom colors, optional center logo overlay, optional rounded modules.

## Usage

```bash
# URL QR
python3 scripts/qr.py url --data "https://dem0n.vip" --output dem0n.png

# Wifi QR (auto-formats as WIFI:T:WPA;S:...;P:...;;)
python3 scripts/qr.py wifi --ssid "MyNetwork" --password "secret123" --security WPA --output wifi.png

# vCard contact QR
python3 scripts/qr.py vcard --name "John Doe" --email "j@x.com" --phone "+15551234567" --org "ACME" --output card.png

# Plain text payload
python3 scripts/qr.py text --data "anything you want encoded" --output blob.png

# Stylized — custom colors + center logo + rounded modules + larger size
python3 scripts/qr.py url --data "https://x.com" \
  --fg "#FF0080" --bg "#0A0A0A" \
  --logo /path/to/logo.png \
  --rounded \
  --size 2048 \
  --ec H \
  --output styled.png

# SVG output (vector, infinitely scalable)
python3 scripts/qr.py url --data "https://x.com" --output qr.svg
```

## Flags

- `--data` — URL or text payload (url/text subcommands)
- `--ssid`, `--password`, `--security` (WPA/WEP/nopass) — wifi
- `--name`, `--email`, `--phone`, `--org` — vcard
- `--output` — output path (.png or .svg, default `<subcmd>.png`)
- `--fg` — foreground hex color (default `#000000`)
- `--bg` — background hex color (default `#FFFFFF`)
- `--logo` — path to a logo image to overlay at center (PNG/JPG)
- `--rounded` — rounded module style (modern aesthetic, PNG only)
- `--size` — output width/height in pixels (default 1024)
- `--ec` — error correction level: L/M/Q/H (default Q; use H if --logo)

## Notes

- Auto-installs `qrcode[pil]` + `Pillow` on first run.
- Logo overlay sized at ~22% of QR width with a white frame to preserve scan reliability.
- When `--logo` is set, EC is auto-bumped to H if it was below Q.
- SVG output ignores `--rounded` and `--logo` (limitations of svg backend).
