| Crates.io | qrai-scanner-cli |
| lib.rs | qrai-scanner-cli |
| version | 0.1.0 |
| created_at | 2026-01-20 20:26:14.986586+00 |
| updated_at | 2026-01-20 20:26:14.986586+00 |
| description | CLI for QR code validation and scannability scoring |
| homepage | |
| repository | https://github.com/SuperNovae-ai/qrai-scanner |
| max_upload_size | |
| id | 2057493 |
| size | 74,660 |
Command-line QR code validator and scannability scorer
Validate AI-generated and artistic QR codes from the command line.
cargo install qrai-scanner-cli
cargo install --git https://github.com/SuperNovae-ai/qrai-scanner qrai-scanner-cli
git clone https://github.com/SuperNovae-ai/qrai-scanner.git
cd qrai-scanner
cargo build --release -p qrai-scanner-cli
# Binary at: target/release/qraisc
# macOS/Linux
sudo cp target/release/qraisc /usr/local/bin/
# Or add to your shell profile
echo 'export PATH="$PATH:/path/to/qrai-scanner/target/release"' >> ~/.zshrc
# Full validation with visual output
qraisc image.png
# JSON output
qraisc -j image.png
# Score only (for scripts)
qraisc -s image.png
# Output: 85
# Reduced stress tests (~2x faster)
qraisc -f image.png
# Skip stress tests, just decode
qraisc -d image.png
# Show processing time
qraisc -t image.png
# Minimal output
qraisc -q image.png
| Flag | Long | Description |
|---|---|---|
-s |
--score-only |
Output only the score (0-100) |
-d |
--decode-only |
Decode without stress tests |
-f |
--fast |
Fast validation (~2x faster) |
-j |
--json |
JSON output |
-t |
--timing |
Show timing info |
-q |
--quiet |
Minimal output |
-h |
--help |
Show help |
-V |
--version |
Show version |
# Check if QR is production-ready (score >= 70)
if [ $(qraisc -s image.png) -ge 70 ]; then
echo "Production ready!"
fi
# Batch process directory
for f in *.png; do
score=$(qraisc -s "$f")
echo "$f: $score"
done
# GitHub Actions / GitLab CI
- name: Validate QR codes
run: |
for qr in assets/qr/*.png; do
score=$(qraisc -s "$qr")
if [ $score -lt 70 ]; then
echo "❌ $qr failed with score $score"
exit 1
fi
echo "✅ $qr passed with score $score"
done
# Extract content with jq
qraisc -j image.png | jq -r '.content'
# Get all stress test results
qraisc -j image.png | jq '.stress_results'
╔══════════════════════════════════════════════════════════════════╗
║ 🌟 SCANNABILITY SCORE: 100 ║
╚══════════════════════════════════════════════════════════════════╝
📄 File: image.png
⏱ Time: 54ms
📝 DECODED CONTENT
https://example.com
🧪 STRESS TEST RESULTS
✓ Original [PASS]
✓ Downscale 50% [PASS]
✓ Downscale 25% [PASS]
✓ Blur (light) [PASS]
✓ Blur (medium) [PASS]
✓ Low Contrast [PASS]
📊 QR METADATA
Version: v2 (size complexity)
Error Correction: M (~15% recovery)
Modules: 25x25 (grid size)
Decoders: rxing, rqrr
-j){
"score": 100,
"decodable": true,
"content": "https://example.com",
"metadata": {
"version": 2,
"error_correction": "M",
"modules": 25,
"decoders_success": ["rxing", "rqrr"]
},
"stress_results": {
"original": true,
"downscale_50": true,
"downscale_25": true,
"blur_light": true,
"blur_medium": true,
"low_contrast": true
}
}
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (file not found, decode failed, etc.) |
MIT