A fast, minimal CLI for generating terminal and PNG QR codes.
- Render QR codes in the terminal
- Read input from arguments or stdin
- Save QR codes as PNG files
- Invert colors or use large rendering
- Cross-platform binaries available via GitHub Releases
Install directly from the public GitHub repo:
npm install -g github:asharahmed/qr-cliPrefer a binary? Download one from the Releases page: https://github.com/asharahmed/qr-cli/releases
Supported targets:
- Linux: x64, arm64
- macOS: x64, arm64, universal
- Windows: x64
- Windows ARM64: available when built via a self-hosted ARM64 runner
Latest version: see the GitHub Releases page.
qr "https://example.com"
echo "hello world" | qr| Flag | Description |
|---|---|
-i, --invert |
Invert colors (for light terminals) |
-l, --large |
Use large mode (2 chars per module) |
-f, --file <path> |
Read input from a file |
-e, --error <level> |
Error correction level: L, M, Q, H |
--format <format> |
Output format: text, png, svg |
--size <px> |
PNG size in pixels |
--margin <px> |
Quiet zone margin in modules |
--border <modules> |
Text output quiet zone size in modules |
--raw |
Do not trim input |
--quiet |
Suppress non-essential output |
-o, --output <file> |
Save output to file, or use - for stdout |
qr -l "Hello from the terminal"
qr -o code.png "https://example.com"
qr --format svg -o code.svg "https://example.com"
echo "secret message" | qr --format png -o -
echo "secret message" | qr -inpm install
npm run build
node dist/index.js "hello"MIT