Install qrscan and scan your first QR code image
The QR Code Scanner CLI is QR Code AI’s open-source command-line reader for QR code images. It provides a single executable, qrscan, for macOS, Linux and Windows, with no account needed. Run it on your local machine to turn an image file into decoded data without opening a browser: your script invokes qrscan, parses the JSON report and checks the shell exit code.
Install the CLI
Pick the distribution channel that suits your operating system. Every channel provides the same qrscan binary.
brew install qrcode-ai-com/tap/qrscanThe distribution guide also covers Debian and Ubuntu packages, Fedora RPMs, static musl binaries, the Arch Linux AUR package, an AppImage, Termux TUR and checksum-verified release archives.
The same qrscan binary decodes linear and 2D barcodes too: see the Barcode Scanner CLI guide.
Test with the public sample image
Fetch a clean QR code sample from the scanner repository and decode it locally. Passing --pretty prints a human-readable terminal summary of the first detection instead of JSON, while --budget-ms 0 disables the time budget.
curl -fsSL -o clean-qr.png \
https://raw.githubusercontent.com/qrcode-ai-com/qrcode-barcode-scanner-rust/main/fixtures/clean/OK_68ms_100_4e875a2c.png
qrscan clean-qr.png --pretty --budget-ms 0This example targets a POSIX-compliant shell such as bash or zsh.
What the command outputs
The terminal summary returned for that sample image:
content https://qrc-ai.com/76xMa
symbology QrCode
payload Url { url: "https://qrc-ai.com/76xMa" }
symbol v2 · 25x25 modules
engines rxing+rqrr
score 100/100 (Excellent)
resolution 5/5
blur 5/5
contrast 5/5
perspective 5/5
rotation 5/5
lighting 5/5
uec margin 1.00 (grade A · worst block 0/16 ec)
iso15415 overall A (informed, not certified)
contrast 1.00/A · modulation 1.00/A · axial 0.001/A · fixed-pattern 1.00/A
took 10msThe elapsed time on the final line varies according to your hardware. Without --pretty, qrscan prints the same result as a structured JSON report.
Scan your own image file
Point qrscan at a local image file, shown here as qr-reference.png. The binary writes a JSON scan report to stdout and sets its exit code accordingly. When the symbol encodes https://qrcode-ai.com/, that exact address appears in the report.
qrscan "qr-reference.png" --profile fastChoose fast for a quick decode, full for detailed QR quality diagnostics and frame for rapid repeated decoding without scoring. If you omit --profile, qrscan defaults to full.
The “Decoded text only” example requires jq, a command-line JSON processor. Because a shell pipeline returns the exit code of jq rather than qrscan, write the JSON report to a file first to inspect qrscan’s exit code, or enable set -o pipefail in bash or zsh.
Consult the CLI reference for every flag, output mode and exit code.
