A simple and rapid CLI QR code generator.
You can display the QR code in your terminal and copy it to the clipboard!
rr <text> [--copy] [--quiet] [--size <size>] [--title <title>] [--level <level>] [--output <output>]# Homebrew
brew tap mui-z/tap
brew install mui-z/tap/rr
# Mint
mint install mui-z/rr
# Mise
mise use -g spm:mui-z/rrOpen a URL on your phone:
rr https://github.com/mui-z/rrShare WiFi credentials:
rr "WIFI:T:WPA;S:MyCafeWiFi;P:secretpass;;"Copy the QR image to clipboard for sharing in chat apps:
rr -c https://github.com/mui-z/rrUse high error correction so the QR stays scannable even if partly damaged:
rr -l H "WIFI:T:WPA;S:MyCafeWiFi;P:secretpass;;"Save the QR code image to a file:
rr -o qr.png https://github.com/mui-z/rr| Option | Description |
|---|---|
<text> |
Text to encode into the QR code. |
-c, --copy |
Copy the QR code image to the clipboard. |
-q, --quiet |
Suppress QR code display in terminal. |
-s, --size <size> |
Max clipboard and output image dimension in pixels. Default: 400. |
-t, --title <title> |
Title text to overlay on the QR code image. |
-l, --level <level> |
QR Code error correction level (L, M, Q, or H). Default: M. |
-o, --output <output> |
Output file path for the QR code image. Supported formats: PNG, JPEG, TIFF, BMP, GIF. |
-h, --help |
Show help information. |
Supports bash, zsh, and fish.
# zsh
rr --generate-completion-script zsh > /usr/local/share/zsh/site-functions/_rr
# bash
rr --generate-completion-script bash > /etc/bash_completion.d/rr
# fish
rr --generate-completion-script fish > ~/.config/fish/completions/rr.fish