lacspace-qr

Styled, branded QR codes — SVG, PNG, ANSI.

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.

Styled modules

Square, dots or rounded module shapes, with independently styled finder eyes.

Centre logo / initials

Embed a logo, data: URI or initials with an auto-cleared quiet band (ECC-guarded).

Gradient foreground

Two-tone linear-gradient fill via a real SVG <linearGradient>.

ANSI terminal render

Crisp full-block QR, one module per cell, scannable off the screen.

Calendar QR

Build an iCalendar VEVENT for events (timed or all-day).

Batch subcommand

One QR file per CSV/TXT row, named from a column.

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.

Dot modules + rounded eyes
terminal
npx lacspace-qr "https://lacspace.com" -f svg -o qr.svg --shape dots --eye rounded

Branded module styling, still fully scannable.

Gradient foreground
terminal
npx lacspace-qr "https://lacspace.com" -f svg -o qr.svg --gradient "#4d9fff,#a855f7,45"

Emits a real SVG <linearGradient>.

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

Full-block render, one module per cell.

Batch from CSV
terminal
npx lacspace-qr batch urls.csv --out out/ -f png --scale 8

One PNG per row, named by the id column.

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"