qrsmith-tiny
v1.0.0
Published
Tiny QR code renderer for terminal — made for whatsapp-web.js
Maintainers
Readme
📱 qrsmith-tiny
Tiny QR code renderer for terminal — made for whatsapp-web.js.

npm install qrsmith-tinyUsage with whatsapp-web.js
import whatsapp from "whatsapp-web.js";
const { Client } = whatsapp;
import { printQrWhatsApp } from "qrsmith-tiny";
const client = new Client();
client.on("qr", (qr) => {
printQrWhatsApp(qr);
});
client.on("ready", () => {
console.log("✅ Connected!");
});
client.initialize();Output:
┌────────────────────────────────────────┐
│ 📱 WhatsApp — Scan QR Code │
└────────────────────────────────────────┘
█▀▀▀▀▀█ ▄▀▀▄▀ █▀▀▀▀▀█
█ ███ █ ▀▄▄▀▄ █ ███ █
█ ███ █ █▀ ▀▄ █ ███ █
█▀▀▀▀▀█ █▀█▀█ █▀▀▀▀▀█
▀▀▀▀▀▀▀ █▄▀▄▀ ▀▀▀▀▀▀▀
█▀█▄█▀▀ ▀▀▄██▀▄▄▀█ ▄▄
▀▀▀▀▀▀▀ ██▄▀▀▄▀█▄█ █▄
█▀▀▀▀▀█ ▄▀█▀▄ ██ ▀▄ █
█ ███ █ █▀▄▄▀▄█▀ ▄▀▀▄
█▀▀▀▀▀█ ▀▄█▀▄ ▀▀ ▀▀▀▀
Open WhatsApp on your phone
Go to Settings → Connected devices
Tap on "Connect device"Standalone usage
import { print, toString } from "qrsmith-tiny";
// Print to terminal
print("https://example.com");
// Get string
const qr = toString("https://example.com");
console.log(qr);
// Options
print("data", {
small: true, // half-block chars ▀▄█ (default: true)
margin: 1, // quiet zone (default: 1)
invert: true, // invert colors for light terminals
});API
| Function | Description |
| ----------------------- | ---------------------------------------------------- |
| printQrWhatsApp(data) | Clears terminal, displays header + centered QR code. |
| print(data, opts?) | Print QR in console |
| toString(data, opts?) | Return QR as string |
| Option | Type | Default | Description |
| -------- | --------- | ------- | ---------------------------- |
| small | boolean | true | Compact half-block rendering |
| margin | number | 1 | Quiet zone in modules |
| invert | boolean | false | Invert dark/light |
FULL usage
- Full package -> qrsmith
📄 License
Published under the MIT license. Made by Wallace Frota
