# jid

> Interactive JSON explorer that takes piped input and lets you drill down with dot-path or JMESPath queries, with tab completion and suggestions.

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

- Repository: https://github.com/simeji/jid
- Page: https://www.trmn.sh/tools/jid

## Install

- Homebrew: `brew install jid`
- Scoop: `scoop install jid`
- Go: `go install github.com/simeji/jid/cmd/jid@latest`

## Overview

jid (JSON Incremental Digger) is a terminal tool for exploring JSON interactively. You pipe JSON into it (for example `curl -s <url> | jid` or `jid < file.json`) and type a filter query in a `[Filter]>` prompt. The JSON view updates as you type, and pressing Enter prints the current result and exits.

Queries use jq-like dot-path notation such as `.bb.aaa[2]`. jid also supports JMESPath, which it switches to automatically when a query contains pipes, wildcards (`[*]`), filter expressions (`[?`), or function calls. Tab completes field names and cycles through candidates, and the matching key is highlighted in the JSON view, which scrolls to it. After a `|`, jid suggests JMESPath functions filtered by the type of the preceding expression (array, object, string, number). It fills in argument templates, such as `sort_by(@, &field)`, and completes `&field` names from the base array. It also rewrites patterns like `[*].field[0]` to `[*].field | [0]` so `[0]` indexes the projected array.

Other features include query history, scroll and cursor keybindings, a toggle between whole-JSON and keys-only view, and options for an initial query as the first argument, `-q` (output the query, for use with jq), and `-M` (monochrome). A TOML config file (`~/.config/jid/config.toml` on Linux, with macOS and Windows equivalents) customizes keybindings, history path and size, and `exit_on_enter`. It is aimed at developers and ops engineers who inspect API responses or large JSON files in the shell.

### Installation

```bash
# via Homebrew
brew install jid
```

```bash
# via Scoop
scoop install jid
```

```bash
# via Go
go install github.com/simeji/jid/cmd/jid@latest
```

![jid drill-down navigation demo](https://media.trmn.sh/cached/6d8513ece298bf2696222713cf1c01cd5b7d82d6ff5930b206482f922529895c.gif)

![jid JMESPath demo](https://media.trmn.sh/cached/07b1779e2c10cf3761a3c37e756a46f2d6ddf5f868d65f6e06b3c55fb26bb8b6.gif)

![jid with an initial query](https://media.trmn.sh/cached/eff5bc507f400ae763de0026e626df39f906ae564d6b55879db6efe8c6a13f93.gif)

## Alternatives

- [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)
- [pup](https://www.trmn.sh/tools/pup.md): Command line HTML processing tool using CSS selectors to filter and extract data from HTML documents (Go, 8.4k 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)
- [miller](https://www.trmn.sh/tools/miller.md): Command-line data processing tool for CSV, TSV, JSON, and JSON Lines with field-based operations (Go, 10.1k stars)
- [usql](https://www.trmn.sh/tools/usql.md): Universal command-line SQL client with PostgreSQL psql-inspired interface for multiple databases (Go, 10.2k stars)

---

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