Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
groq-cli
Advanced tools
Changelog
Readme
Currently in alpha.
Easy wrangling of JSON documents with GROQ in the command line.
The CLI tool consumes both JSON and NDJSON) documents. You can pass in data from a local file, or from piping to standard input.
Read the announcement blog post, and the getting started guide.
npm install --global groq-cli
This CLI requires Node v10 or later.
$ groq --help
Run GROQ in the command line
Usage
$ groq '*[<filter>]{<projection>}'
# Remember to alternate quotation marks inside of the query
Options
-i, --input One of: ndjson, json, null
-o, --output One of: ndjson, json, pretty
-p, --pretty Shortcut for --output=pretty
-n, --ndjson Shortcut for --input=ndjson --output=ndjson
Input formats
json Reads a JSON object from stdin.
ndjson Reads a JSON stream from stdin.
null Reads nothing.
Output formats
json Formats the output as JSON.
pretty Formats the output as pretty JSON.
ndjson Streams the result as NDJSON.
Examples
# Query data in a file
$ cat blog.json | groq 'count(posts)'
# Query data in a NDJSON file
$ cat blog.ndjson | groq --input ndjson '*[_type == "post"]{title}'
# Query JSON data from an URL
$ curl -s https://jsonplaceholder.typicode.com/todos | groq --pretty '*[completed == false]{title}'
GROQ-cli isn't the only tool to work with JSON data in the command line. If it doesn't do exactly what you need, you can check out these other tools that might help you:
MIT – Copyright 2019–present Sanity Inc.
FAQs
Run GROQ in the command line
The npm package groq-cli receives a total of 134 weekly downloads. As such, groq-cli popularity was classified as not popular.
We found that groq-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 46 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.