Skip to main content

mkqr

QR codes from the command line, without friction. PNG, SVG, PDF, Wi-Fi, vCard, logo, clipboard.

CI PyPI Python License: MIT

🇧🇷 Leia em português

mkqr generating QR codes in a terminal

Note: mkqr's help text and messages are in Brazilian Portuguese. Flags and output formats are the usual English ones, so the examples below work as-is.

Install

pipx install mkqr        # recommended: isolated, on your PATH
pip install mkqr         # or into the current environment

Then, optionally, enable Tab completion for your shell:

mkqr --install-completion

Without PyPI

Straight from GitHub — same package, no PyPI involved. Useful if PyPI is unreachable, blocked on your network, or you want the latest commit:

pipx install git+https://github.com/berodcdev/mkqr.git    # latest from main
pipx install https://github.com/berodcdev/mkqr/releases/download/v0.1.0/mkqr-0.1.0-py3-none-any.whl

Or from a clone, which installs and wires up completion in one go:

git clone https://github.com/berodcdev/mkqr.git && cd mkqr
./install.sh              # pipx + shell completion; -e for editable mode
./uninstall.sh            # removes everything

On Windows without bash, pipx install . is enough.

Usage

Type mkqr with no arguments for a quick guide, or mkqr -h for everything.

mkqr https://example.com                          # print the QR in the terminal
mkqr https://example.com -O qr.png                # save to a file
mkqr https://example.com -O ~/Documents/          # auto-name: example.com-qrcode.png
mkqr https://example.com -c                       # copy the PNG to the clipboard
mkqr https://example.com -O qr.png --open         # save and open in the default viewer
mkqr https://example.com -O qr.png --logo logo.png    # logo in the center
mkqr 'any text' -O card.svg --dark '#0a2540'      # custom color
mkqr --wifi MyNetwork -p hunter2 -O ./            # QR that joins the network
mkqr --vcard 'Ana Lima' --phone +15551234567 --email ana@example.com -O ./
echo -n 'read from stdin' | mkqr - -O out.pdf

The output format comes from the suffix of -O: .png .jpg .webp .svg .pdf .eps .txt. Without -O, the QR is printed to the terminal.

PNG, WebP and SVG come out cropped and transparent (no quiet zone), ready to drop into any layout. For the classic look with a white margin, use -b 4 --light white. JPG, PDF and EPS have no alpha channel, so they get a white background and a margin of 4.

Platform support

Linux macOS Windows
generate QR (png, svg, pdf, terminal, Wi-Fi, vCard, logo) ✓ ✓ ✓
-c clipboard wl-copy (Wayland) or xclip (X11) native (osascript) native (PowerShell)
--open xdg-open native (open) native
shell completion bash, zsh, fish bash, zsh, fish —
Tab lists nearby Wi-Fi networks nmcli — —
install.sh / uninstall.sh ✓ ✓ (bash 3.2 ok) use pipx install .

mkqr --install-completion detects your $SHELL; override it with --shell zsh (or bash, fish, all). mkqr --uninstall-completion reverses it. CI runs the test suite on Ubuntu, macOS and Windows, from Python 3.10 to 3.14.

Options

flag description default
-O, --output output file or directory terminal
-s, --scale pixels per module 10
-b, --border quiet zone in modules 0 (png/svg/webp), 4 (others)
-e, --error error correction L/M/Q/H M (H with --logo)
--dark, --light colors; --light white for a white background #000 / transparent
--logo IMAGE image in the center (png/jpg/webp); --logo-size 0.1–0.3 0.22
-c, --copy copy the QR (as PNG) to the clipboard
--open open the generated file in the default viewer
--wifi SSID Wi-Fi QR; with -p PASSWORD, --security WPA/WEP/nopass, --hidden
--vcard NAME contact QR; with --phone, --email, --url, --org, --title
--micro allow Micro QR when the content fits
-f, --force overwrite an existing file
-q, --quiet don't print the output path
--install-completion install shell completion; --shell bash/zsh/fish/all
--uninstall-completion remove completion from every shell
--no-color disable colors (or set NO_COLOR)

The full help (mkqr -h) is also available as an image: docs/img/mkqr-help.svg, and the quick guide as docs/img/mkqr.svg.

Built on

segno for QR generation, qrcode-artistic/Pillow for logos and jpg/webp, argcomplete for shell completion.

Development

git clone https://github.com/berodcdev/mkqr.git && cd mkqr
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest

See CONTRIBUTING.md for the full workflow, and CHANGELOG.md for what changed between releases.

License

MIT — see LICENSE.

Metadata

Release files for mkqr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkqr 0.1.0
File Size Uploaded
mkqr-0.1.0.tar.gz 250.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkqr 0.1.0
File Interpreter ABI Platform
mkqr-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 267.4 kB

Release files / mkqr-0.1.0.tar.gz

Download URL mkqr-0.1.0.tar.gz
Size 250.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9af8190765e043e140d51bfdc1bf07bc134b7579f0515a0e26c1d7fb17054432
BLAKE2b-256 checksum
How to use checksums
89baba5d098238f6cd3cfb27cf9257b53d4855485f691828ebbe0dfee6f86e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / mkqr-0.1.0-py3-none-any.whl

Download URL mkqr-0.1.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90e938dd2a05b1ea4876545df98f54ae794dea8c32fce0aeaa061686295373be
BLAKE2b-256 checksum
How to use checksums
c6eb2bd1505e6d277b81cff0456df545325c6f8f88d634096b54046853a4db46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page