# jqp

> A terminal UI for running jq queries interactively against JSON or NDJSON input, using the gojq implementation, with themes and query history.

Stars: 2.9k · Language: Go · License: MIT · Categories: Data

- Repository: https://github.com/noahgorstein/jqp
- Page: https://www.trmn.sh/tools/jqp

## Install

- Homebrew: `brew install jqp`
- MacPorts: `sudo port install jqp`
- Snap: `sudo snap install jqp`

## Overview

jqp is a terminal user interface for experimenting with jq queries. It loads JSON or newline-delimited JSON (NDJSON) from a file (-f/--file) or from standard input, and shows an input preview, a query field, and the query output. Queries are executed with gojq, itchyny's Go implementation of jq, rather than the jq binary. An optional query argument runs as soon as the interface loads, for example `curl ... | jqp '.[] | {"title": .title, "url": .url}'`. When both are given, stdin takes precedence over the file flag.

In the interface, `tab` and `shift-tab` cycle between sections. `enter` runs the query, and the up and down arrows move through query history. `ctrl-t` hides or shows the input panel. `ctrl-c` quits, or kills a long-running query. `ctrl-y` copies the query to the system clipboard, and `ctrl-s` saves the output to a file, or copies it to the clipboard if no file is given. On Linux and Unix, clipboard support needs xclip or xsel installed. The input preview and output panes can be scrolled with vim-style keys.

Configuration lives in a YAML file, by default `$HOME/.jqp.yaml`, or at a path given to `--config`. Command-line flags override the config file. The `-t/--theme` flag and the config file select a theme from about 50 light and dark options, including dracula, nord, monokai, gruvbox and the catppuccin variants. Chroma syntax-highlighting styles and non-syntax UI colors can be overridden in the config. jqp is aimed at developers and operators who inspect API responses or JSON logs and want to build jq filters with immediate feedback. It is written in Go on Bubbletea, Bubbles and Lipgloss.

### Installation

```bash
# via Homebrew
brew install jqp
```

```bash
# via MacPorts
sudo port install jqp
```

```bash
# via Snap
sudo snap install jqp
```

![jqp running a jq query in the terminal](https://media.trmn.sh/cached/34f76e1b840e7f29a775da7637ce8946049c9c5af1a69bd088fc26c0cddaaedc.gif)

![jqp with the monokai theme](https://media.trmn.sh/cached/a5d57476f5a5b280798253932a0eeb4ea3c98a540712a67263612f1d07f904c2.png)

## Alternatives

- [gojq](https://www.trmn.sh/tools/gojq.md): Pure Go implementation of jq command-line JSON processor with arbitrary-precision arithmetic and YAML support (Go, 3.8k stars)
- [lazysql](https://www.trmn.sh/tools/lazysql.md): Cross-platform TUI database management tool for MySQL, PostgreSQL, SQLite, and MSSQL with SQL editor and table operations. (Go, 4.4k stars)
- [qo](https://www.trmn.sh/tools/qo.md): TUI for querying JSON and CSV files with SQL syntax, reads from stdin and outputs to stdout (Go, 400 stars)
- [jid](https://www.trmn.sh/tools/jid.md): Interactive JSON explorer that takes piped input and lets you drill down with dot-path or JMESPath queries, with tab completion and suggestions. (Go, 7.2k stars)
- [dasel](https://www.trmn.sh/tools/dasel.md): Command-line tool for querying, modifying, and transforming structured data files (JSON, YAML, TOML, XML, CSV) (Go, 8.1k stars)

---

Canonical: https://www.trmn.sh/tools/jqp
