Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

ZBar

$ zbarimg Community Low Risk
ZBar · AI & Media · LGPL-2.1-or-later · macos / linux / windows

ZBar's zbarimg decodes QR codes, EAN-13, UPC, Code 128, and other barcodes from PNG, JPEG, or TIFF images without touching disk. It offers --raw for bare decoded values, --xml for structured symbol metadata, and -q quiet suppression.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
brew install zbar
CLI vs MCP Decision CLI Only

Decoding barcodes and QR payloads from local images via zbarimg --raw -q is fast and self-contained.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Supports --raw clean values, --xml structured output, -q quiet mode, and deterministic exit codes (0 found, 4 none found), though lacks --json.

  • Supports --raw, --xml, and -q
  • Uses exit code 4 when no barcode is detected
Trust & Safety 24 / 25

zbarimg is strictly read-only and never writes or modifies files on disk.

  • Zero filesystem write capability in zbarimg
Setup & Portability 13 / 15

Available via brew install zbar and Linux zbar-tools; Windows installation requires older binaries or WSL.

  • Available on macOS Homebrew and major Linux distros
Utility & Efficiency 13 / 15

Reliable multi-symbology decoder supporting QR, EAN/UPC, Code 128, Code 39, and multi-page TIFFs.

  • Decodes both QR and 1D retail/logistics barcodes
Maintenance & Lineage 7 / 10

Community-maintained fork (mchehab/zbar) keeping the classic ZBar suite alive on modern toolchains.

  • Maintained at mchehab/zbar on GitHub
Docs & Verifiability 7 / 10

Concise --help and man page covering exit codes (0, 1, 2, 4) and -S symbology config switches.

  • Man page and zbarimg --help documentation

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; strictly reads local image files.

Side Effects
Read-Only
Cost & Quotas

Free LGPL-2.1-or-later open-source C binary.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# ZBar (zbarimg) Agent Rules
- Expect exit code `4` when an image contains zero valid barcodes—handle exit code `4` gracefully rather than treating it as a crash.
- Pass `-q` and `--raw` (or `--xml`) for clean machine-readable output.

Agent-Ready Command Recipes

Safe Read-Only Queries

Decode QR/barcode payload cleanly
zbarimg --raw -q qr.png

Prints only the decoded string(s) without symbology prefixes or scan summary lines.

Emit structured XML barcode scan results
zbarimg --xml -q scan.png

Outputs symbology type, decoded data, quality, and polygon coordinates as XML.

Strengths for Agents

  • + Strictly read-only with --raw -q and --xml structured output.
  • + Decodes both 2D QR codes and 1D barcodes from multi-barcode images in one pass.

Caveats & Pitfalls

  • ! Returns exit code 4 when no barcode is detected in an image, which breaks naive set -e pipelines.
  • ! Outputs --xml rather than --json, and does not support Data Matrix or Aztec codes reliably.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI