avz
A blistering-fast Avro CLI tool — a modern replacement for Java's avro-tools and Python's fastavro.
Supports local files, glob patterns, and S3 URIs.
Install
Or build from source:
# binary at target/release/avz
Quick Start
# peek at the first 5 records
# pretty-print with syntax highlighting
# search for a record by regex
# search for a literal string (no regex)
# count records across files using a glob
# works with S3 too
Note: Quote glob patterns and S3 URIs to prevent your shell from expanding them.
Commands
| Command | Description |
|---|---|
cat |
Print all records as JSON (--pretty for color output) |
head |
Print the first N records (default 10) |
schema |
Print the Avro schema (colorized) |
count |
Count records in one or more files |
meta |
Print file metadata (codec, sync marker, user metadata) |
grep |
Search records by regex or literal string (-F) |
fromjson |
Convert newline-delimited JSON to an Avro file |
concat |
Concatenate multiple Avro files into one |
recodec |
Re-encode with a different codec |
fingerprint |
Print schema fingerprint (CRC-64-AVRO, MD5, SHA-256) |
validate |
Validate file integrity or check schema compatibility |
random |
Generate random records from a schema |
Usage
Reading files
# single file
# glob pattern
# multiple files
# S3 URI (uses default AWS credentials)
# S3 glob
Grep
Search through records and print the entire matching record as JSON:
# regex search
# literal string (-F), useful when pattern has special chars
# case-insensitive
# invert match (show non-matching records)
# count matches only
# pretty-print matches
Writing and converting
# JSON to Avro
# from stdin
|
# with compression
# re-encode existing file with a different codec
Inspection
# schema
# metadata (codec, sync marker)
# schema fingerprints
# validate file integrity
# check schema compatibility
Generate test data
# random JSON records from a schema
# reproducible output with a seed
# write directly to Avro
Supported Codecs
null, deflate, snappy, zstandard, bzip2, xz
License
MIT OR Apache-2.0