28 lines
937 B
Markdown
28 lines
937 B
Markdown
---
|
|
title: "jq"
|
|
category: "Terminal and shell"
|
|
tagline: "Read, filter and reshape JSON on the command line."
|
|
source: "pacman"
|
|
package: "jq"
|
|
command: "jq"
|
|
website: "https://jqlang.org/"
|
|
code: "https://github.com/jqlang/jq"
|
|
---
|
|
|
|
## What it is
|
|
|
|
jq is a command-line processor for JSON. It pretty-prints JSON, pulls out the fields you want, and transforms data with a small filter language, which makes it the standard way to work with API responses and JSON files in scripts.
|
|
|
|
```
|
|
curl -s https://api.github.com/repos/jqlang/jq | jq '.stargazers_count'
|
|
```
|
|
|
|
## Why it's here
|
|
|
|
- **JSON everywhere.** APIs and many tools output JSON, and jq makes it readable.
|
|
- **Scriptable.** Shell scripts use it to pick values out of JSON.
|
|
|
|
## On CoreDesktop
|
|
|
|
jq is installed from pacman. CoreDesktop's own scripts use it too, for example `configure` reads Tailscale's status with it. `update` keeps jq current along with the rest of the pacman packages.
|