fq is a powerful command-line tool designed for working with binary data using jq-like syntax and expressions. It combines the functionality of jq, hexdump, dd, and gdb into a single unified tool, making binary format inspection and manipulation accessible to developers.
The tool excels at querying and debugging binary formats across a wide range of file types. Whether you're working with media codecs like MP4 and FLAC, executable files, packet captures with TCP reassembly, or serialization formats such as JSON, YAML, XML, CBOR, and protobuf, fq provides a consistent interface for exploration and analysis.
Key capabilities include:
Basic usage is straightforward: fq . file displays the decoded structure, fq d file shows details, or fq 'some query' file executes custom jq expressions. The tool also handles common text formats and provides functions for URL manipulation, hex conversion, base64 encoding, and pattern searching.
fq is particularly valuable for developers engaged in debugging, data transformation, and format validation, offering a quick and comfortable way to inspect file structures without switching between multiple specialized tools.
$ brew install wader/tap/fq