@major0126/qr-code-cli
v1.0.0
Published
Generate QR codes from the command line. Supports terminal output and PNG export.
Downloads
21
Maintainers
Readme
qr-code-cli
Generate QR codes from the command line. Supports displaying QR codes in the terminal and exporting as PNG images.
Install
npm install -g qr-code-cliUsage
Basic QR code in terminal
qr-code "https://example.com"Save as PNG
qr-code "https://example.com" -o qrcode.pngRead from file
qr-code -i input.txtError correction level
qr-code "Hello World" -e H # L, M, Q, H (default: M)Options
| Flag | Description |
|------|-------------|
| -o, --output <file> | Save QR code as PNG image |
| -i, --input <file> | Read input from file |
| -e, --error <level> | Error correction level: L, M, Q, H (default: M) |
| -s, --scale <n> | Module size in pixels (default: 8) |
| -d, --dark <color> | Dark module color (default: #000000) |
| -l, --light <color> | Light module color (default: #ffffff) |
| -v, --version | Show version |
| -h, --help | Show help |
Examples
# WiFi network QR
qr-code "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;"
# vCard
qr-code "BEGIN:VCARD\nFN:John Doe\nTEL:123456789\nEND:VCARD"
# Large text from file
qr-code -i notes.txt -o notes.png -e HLicense
MIT
