Highlights
This release ships a full command-line interface for the Veryfi SDK so AI agents and shell users can drive the API from a terminal without writing Python. The CLI is purely additive — Client's constructor and every public method are byte-identical to 5.0.1, and all existing tests pass untouched.
What's new
veryficonsole script (andpython -m veryfi) — one Typer sub-app per resource:documents,bank-statements,checks,business-cards,w2s,w8s,w9s,any-docs,classify, with nestedline-items,tags, and PDF/W-2 split commands.- Env-var-first auth —
VERYFI_CLIENT_ID,VERYFI_USERNAME,VERYFI_API_KEY(plus optionalVERYFI_CLIENT_SECRET,VERYFI_BASE_URL,VERYFI_API_VERSION,VERYFI_TIMEOUT); equivalent--flagsoverride env. Missing creds exit2with a JSON error on stderr. - Agent-friendly I/O — JSON to stdout (with
--output json|raw|pretty), structured JSON errors to stderr, exit codes mapped from the HTTP status (clipped to 1-255) so agents can branch without parsing tracebacks. veryfi schema— emits a machine-readable manifest of every command and parameter for tool/MCP registration.- Repeatable
--field KEY=VALUE/--json-bodyfor endpoints that take**kwargs. Values are JSON-coerced (total=11.23→ number,enabled=true→ bool, full JSON objects accepted). - Pipe-friendly —
--file -reads bytes from stdin. - Dynamic User-Agent —
client_base.pynow resolves the version viaimportlib.metadata, so theUser-Agent: Python Veryfi-Python/<version>header always tracks thepbr-derived release with no manual bumps.
Quick start
pip install -U veryfi
export VERYFI_CLIENT_ID=... VERYFI_USERNAME=... VERYFI_API_KEY=...
veryfi documents process --file /tmp/receipt.jpg --category Travel
veryfi classify file --file /tmp/unknown.pdf --document-type receipt --document-type invoice
veryfi schema | jq '.commands[] | .name'See the new Command-line interface section in the README for the full reference.
Compatibility
- Python 3.9+
- All existing Python (
from veryfi import Client) code works without changes. - New runtime dependency:
typer>=0.12.0.