Interactive JSON filter using jq
> [!TIP] > For JSON and YAML tree browsing, subtree exploration, and side-by-side query results, try [vy](https://vy.ynqa.dev), another terminal tool by the author of jnv.
jnv is designed for navigating JSON,
offering an interactive JSON viewer and jq filter editor.
jq filter editorjq filterjq on their ownSee here for more info.
brew install jnvOr install via Homebrew Tap:
brew install ynqa/tap/jnvSee here for more info.
sudo port install jnvSee package entry on search.nixos.org for more info.
nix-shell -p jnvSee here for more info.
pixi global install jnv
# or
cat data.json | pixi exec jnv
# or
conda install jnvBuild (In the near future, the image will be available on something of registries)
docker build -t jnv .And Run (The following commad is just an example. Please modify the path to the file you want to mount)
docker run -it --rm -v $(pwd)/debug.json:/jnv/debug.json jnv /jnv/debug.jsoncargo install jnvcat data.json | jnv
# or
jnv data.json
# or write current result to stdout on exit (UNIX only)
cat data.json | jnv --write-to-stdout | some-command
# and also output to file
cat data.json | jnv -- --write-to-stdout > result.json| Key | Action |
|---|---|
| Ctrl + C | Exit |
| Ctrl + Q | Copy jq filter to clipboard |
| Ctrl + O | Copy JSON to clipboard |
| Shift + ↑, Shift + ↓ | Switch to another mode |
| Key | Action |
|---|---|
| Tab | Enter suggestion |
| ← | Move cursor left |
| → | Move cursor right |
| Ctrl + A | Move cursor to line start |
| Ctrl + E | Move cursor to line end |
| Backspace | Delete character before cursor |
| Ctrl + U | Clear entire line |
| Alt + B | Move the cursor to the previous nearest character within set(.,|,(,),[,]) |
| Alt + F | Move the cursor to the next nearest character within set(.,|,(,),[,]) |
| Ctrl + W | Erase to the previous nearest character within set(.,|,(,),[,]) |
| Alt + D | Erase to the next nearest character within set(.,|,(,),[,]) |
| Key | Action |
|---|---|
| Tab, ↓ | Select next suggestion |
| ↑ | Select previous suggestion |
| Others | Return to editor |
| Key | Action |
|---|---|
| ↑, Ctrl + K | Move up |
| ↓, Ctrl + J | Move down |
| Ctrl + H | Move to last entry |
| Ctrl + L | Move to first entry |
| Enter | Toggle fold |
| Ctrl + P | Expand all |
| Ctrl + N | Collapse all |
…jnv uses a TOML format configuration file to customize various features. The configuration file is loaded in the following order of priority:
-c or --config option)Following the dirs crate,
the default configuration file location for each platform is as follows:
~/.config/jnv/config.toml~/Library/Application Support/jnv/config.tomlC:\Users\{Username}\AppData\Roaming\jnv\config.tomlIf the configuration file does not exist, it will be automatically created on first run.
[!IMPORTANT] The syntax in TOML configurations like default.toml was revamped in v0.7.0, and the configuration shown below reflects the new format. A migration tool is not provided for this change. Please manually replace/update your local
config.tomlto match the new syntax.
The following settings are available in config.toml[!WARNING] Depending on the type of terminal and environment, characters and styles may not be displayed properly. Specific key bindings and decorative characters may not display or function correctly in certain terminal emulators.
…No open issues yet, or sync has not completed.