# jnv

> Interactive terminal JSON viewer and jq filter editor with auto-completion, using the built-in jaq engine; reads files or stdin.

Stars: 6.1k · Language: Rust · License: MIT · Categories: Data

- Repository: https://github.com/ynqa/jnv
- Page: https://www.trmn.sh/tools/jnv

## Install

- Homebrew: `brew install jnv`
- Cargo: `cargo install jnv`
- MacPorts: `sudo port install jnv`

## Overview

jnv is a terminal JSON navigator that combines a foldable, syntax-highlighted JSON viewer with an interactive jq filter editor. You type a filter in the editor and the viewer shows the result as you edit. Filters are applied with jaq, a jq clone, so a separate jq installation is not required.

Input comes from a file or stdin (`jnv data.json` or `cat data.json | jnv`). It accepts a single JSON document or multiple JSON values that serde_json's StreamDeserializer can parse, such as JSON Lines. With `--write-to-stdout` (UNIX only), the current result is printed on exit so it can be piped into another command or redirected to a file. `--default-filter` sets an initial jq filter, and `-c` selects a config file.

The editor offers Tab auto-completion for identity, object identifier-index, and array index expressions, plus hint messages for evaluating the filter. Shift+Up/Down switches focus between editor and viewer. In the viewer, Enter toggles folds and Ctrl+P / Ctrl+N expand or collapse all. Ctrl+Q copies the filter and Ctrl+O copies the JSON to the clipboard.

Behavior is configured through a TOML file (created on first run at the platform's config directory). It covers keybindings, editor and JSON styling, completion settings, debounce and animation timing, overflow mode, and a `max_streams` limit for large streams. It suits developers and operators who explore API responses, logs, or JSON Lines data and want to build jq queries interactively.

### Installation

```bash
# via Homebrew
brew install jnv
```

```bash
# via Cargo
cargo install jnv
```

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

![jnv demo](https://media.trmn.sh/cached/be7f485edb5cb445b3f9d6fe20606d79638e7f14ab9ac25da51a03f8ec7efce2.gif)

## Alternatives

- [jless](https://www.trmn.sh/tools/jless.md): Command-line JSON viewer with syntax highlighting, collapsible sections, and vim-inspired navigation commands (Rust, 5.5k stars)
- [htmlq](https://www.trmn.sh/tools/htmlq.md): HTML parser that uses CSS selectors to extract content from HTML files, similar to jq for JSON (Rust, 7.6k stars)
- [qsv](https://www.trmn.sh/tools/qsv.md): Rust CLI toolkit of composable commands for querying, transforming, validating, joining, and describing CSV, Excel, and other tabular data. (Rust, 3.8k stars)
- [angle-grinder](https://www.trmn.sh/tools/angle-grinder.md): Command-line log analysis tool that parses, filters, and aggregates log data with a pipeline query language and a live-updating terminal UI. (Rust, 3.8k stars)
- [xsv](https://www.trmn.sh/tools/xsv.md): Command line CSV data manipulation tool for indexing, slicing, analyzing, splitting and joining CSV files (Rust, 10.8k stars)

---

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