A simple command-line tool to generate QR codes from URLs. Features include clipboard support, URL shortening, and file output options.
- Clone this repository
- Run the installer:
python install.pyThis will create a qr command in your PATH (~/bin on macOS/Linux, or Windows equivalent).
Basic usage (copies to clipboard):
qr "https://example.com"Save to file:
qr --output ~/Desktop/myqr.png "https://example.com"Shorten URL and create QR:
qr --shorten "https://example.com"To use the URL shortening feature (--shorten flag), you'll need a t.ly API key. You can set it up in two ways:
- Environment variable:
export TLY_API_KEY="your-api-key"- Configuration file at
~/.qr.conf.yaml:
---
TLY_API_KEY: your-api-key-for-tlyFor clipboard support, you'll need either:
- xclip (for X11)
- wl-copy (for Wayland)
Install the appropriate one for your system:
# For X11
sudo apt-get install xclip
# For Wayland
sudo apt-get install wl-clipboardWorks out of the box with clipboard support.
Works out of the box with clipboard support.