fq is a command-line tool and query language for decoding, inspecting, and transforming binary file formats.
The tool addresses the challenge of working with binary data by providing a jq-like query language adapted for binary formats. It decodes binary structures into a queryable tree representation, allowing users to inspect nested formats, extract specific fields, slice and concatenate binary data, and perform bit-level operations. The approach combines a structural hex viewer with an interactive REPL that supports auto-completion, making binary exploration more accessible than traditional hex editors or custom parsing scripts.
Developers working with media files, network protocols, or other binary formats should consider fq if they need to quickly inspect or extract data without writing custom parsers. The tool suits projects involving audio and video codecs, network packet analysis, compression formats, and serialization protocols. It supports a broad range of formats including MP4, FLAC, PNG, ELF, TLS, DNS, and many others. For those familiar with jq, the learning curve is minimal since fq uses the same expression language and behaves similarly, though fq extends this to binary-specific operations like bit-level decoding and byte slicing.
The project shows active development with regular format additions and refinements. Maintenance includes consistent updates to the decoder library and responsiveness to issues. The codebase demonstrates attention to both breadth of format support and depth of implementation for individual formats. Development activity reflects a focus on expanding the range of supported binary formats while maintaining the core tool's usability and performance.