A command-line tool for querying and transforming JSON/NDJSON documents using the GROQ query language.
groq-cli is a command-line tool that allows developers to query and transform JSON and NDJSON documents using the GROQ query language. It enables filtering, projection, and manipulation of JSON data directly from the terminal, either from local files or piped input. The tool is designed to simplify data wrangling tasks by providing a powerful, expressive query syntax for JSON structures.
Developers and data engineers who frequently work with JSON data in command-line environments and need to perform complex queries, transformations, or validations on JSON/NDJSON documents.
groq-cli offers a specialized, GROQ-based approach to JSON processing that is more expressive for complex queries compared to tools like jq, with built-in support for NDJSON streams and schema validation. It integrates seamlessly into Unix pipelines and provides multiple output formats for flexibility.
Run GROQ in your command line
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
GROQ provides powerful, intuitive querying for complex JSON manipulations, such as filtering nested structures and aggregations, surpassing jq in expressiveness for certain tasks.
Handles newline-delimited JSON streams natively for input and output, making it ideal for processing log files or real-time data without extra conversion steps, as shown in the --ndjson flag usage.
Works effortlessly with pipes and standard I/O, allowing easy chaining with commands like curl for querying remote JSON APIs directly from the terminal, as demonstrated in the examples.
Supports type-nodes output with a --schema flag to validate queries against a schema file, enabling data integrity checks that are not commonly available in similar CLI tools.
Marked as alpha in the README, meaning it may have bugs, incomplete features, and breaking changes, making it unsuitable for critical or production workflows.
Requires Node.js v18 or later, adding installation overhead and compatibility issues in environments without Node.js or with older versions, limiting portability.
Compared to established tools like jq, groq-cli has a smaller ecosystem, with fewer examples, plugins, and community support, which can hinder troubleshooting and adoption.
GROQ is an open-source alternative to the following products: