lacspace-qr

Zero-dep QR codes to terminal, SVG & PNG.

terminal
npx lacspace-qr "https://lacspace.com"
What it does

Everything, in one command

lacspace-qr implements the full ISO/IEC 18004 QR pipeline — mode selection, character-count headers, Reed–Solomon error correction over GF(256), block interleaving, all function patterns, and penalty-scored data masking — with no third-party dependencies and no network calls. It renders scannable codes as terminal half-blocks, crisp SVG, or a real 8-bit RGBA PNG (encoded via the built-in node:zlib), and ships correctly-formatted payload builders so a WiFi or contact-card QR is one command away.

Features

What's inside

From-scratch encoder

Spec-correct QR (L/M/Q/H ECC, versions 1–40), validated against published reference vectors.

Three renderers

Terminal half-blocks, scalable SVG, and a hand-written PNG encoder.

Payload presets

URL, WiFi, vCard, email, tel, SMS and geo, correctly formatted and escaped.

Auto everything

Smallest fitting version, most compact mode, and lowest-penalty mask, all overridable.

Batch mode

One QR file per CSV/TXT row, named by an id column.

Styling

Custom fg/bg colours, rounded modules, quiet-zone control, transparent backgrounds.

Zero deps, offline

No API keys, no telemetry; node:zlib is the only built-in used.

How to use

Copy, paste, done

Real commands and snippets — from a one-liner to the typed library.

Terminal QR
terminal
npx lacspace-qr "https://lacspace.com"

Scans straight off the screen.

WiFi join code
terminal
npx lacspace-qr wifi --ssid Home --password s3cret

WIFI:T:WPA;S:Home;P:s3cret;;

Branded SVG
terminal
npx lacspace-qr "https://x.com" -f svg -o qr.svg --fg "#4d9fff"

Crisp vector, custom colour.

vCard PNG
terminal
npx lacspace-qr vcard --name "Ada" --tel +9779800000000 -f png -o ada.png

Real 8-bit RGBA PNG.

High ECC
terminal
npx lacspace-qr "MISSION CRITICAL" --ecc H

~30% recovery.

Batch
terminal
npx lacspace-qr --batch urls.csv --out-dir out -f png

One file per row.

Good for

What people build with it

WiFi/contact/URL QR codes for print & signage

Embed QR generation in Node apps with no dependency risk

Bulk QR generation from a spreadsheet

Offline / air-gapped environments

Start now

Run lacspace-qr today

Free, open-source, no API keys. It's a CLI and a typed library.

terminal
npx lacspace-qr "https://lacspace.com"