jnv is designed for navigating JSON,
offering an interactive JSON viewer and jq filter editor.

Features
- Interactive JSON viewer and
jqfilter editor- Syntax highlighting for JSON
- Use jaq to apply
jqfilter- This eliminates the need for users to prepare
jqon their own
- This eliminates the need for users to prepare
- Configurable features via TOML configuration
- Toggle hint message display
- Adjust UI reactivity (debounce times and animation speed)
- Editor appearance and behavior
- JSON viewer styling
- Adjust completion feature display and behavior
- Keybinds
- Capable of accommodating various format
- Input: File, stdin
- Data: A JSON or multiple JSON structures that can be deserialized with StreamDeserializer, such as JSON Lines
- Auto-completion for the filter
- Only supports:
- Hint message to evaluate the filter
Installation
Homebrew
See here for more info.
Or install via Homebrew Tap:
MacPorts
See here for more info.
Nix / NixOS
See package entry on search.nixos.org for more info.
conda-forge
See here for more info.
# or
|
# or
Docker
Build (In the near future, the image will be available on something of registries)
And Run (The following commad is just an example. Please modify the path to the file you want to mount)
Cargo
Examples
|
# or
Keymap
| Key | Action |
|---|---|
| Ctrl + C | Exit |
| Ctrl + Q | Copy jq filter to clipboard |
| Ctrl + O | Copy JSON to clipboard |
| Shift + ↑, Shift + ↓ | Switch to another mode |
Editor mode (default)
| 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(.,|,(,),[,]) |
Suggestion in Editor (after Tab)
| Key | Action |
|---|---|
| Tab, ↓ | Select next suggestion |
| ↑ | Select previous suggestion |
| Others | Return to editor |
JSON viewer mode
| 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 |
Usage
|
)
Configuration
jnv uses a TOML format configuration file to customize various features. The configuration file is loaded in the following order of priority:
- Path specified on the command line (
-cor--configoption) - Default configuration file path
Default Configuration File Location
Following the dirs crate,
the default configuration file location for each platform is as follows:
- Linux:
~/.config/jnv/config.toml - macOS:
~/Library/Application Support/jnv/config.toml - Windows:
C:\Users\{Username}\AppData\Roaming\jnv\config.toml
If the configuration file does not exist, it will be automatically created on first run.
Configuration Options
The following settings are available in config.toml:
# Whether to hide the hint message
= false
# Editor settings
[]
# Editor mode ("Insert" or "Overwrite")
= "Insert"
# Word break characters
= [".", "|", "(", ")", "[", "]"]
# Theme when editor is focused
[]
= "❯❯ "
= { = "blue" }
= { = "magenta" }
= {}
# Theme when editor is not focused
[]
= "▼ "
= { = "blue", = ["Dim"] }
= { = ["Dim"] }
= { = ["Dim"] }
# JSON display settings
[]
# Maximum number of JSON objects to read from stream
# max_streams =
# JSON theme settings
[]
= 2
= { = ["Bold"] }
= { = ["Bold"] }
= { = "cyan" }
= { = "green" }
= {}
= {}
= { = "grey" }
# Completion feature settings
[]
= 3
= "❯ "
= { = "grey", = "yellow" }
= { = "grey" }
= 100
= 50000
# Keybind settings
[]
# Application exit key
= [{ = { = "CONTROL", = { = "c" } } }]
# Copy query to clipboard key
= [{ = { = "CONTROL", = { = "q" } } }]
# Copy result to clipboard key
= [{ = { = "CONTROL", = { = "o" } } }]
# Mode switch keys
= [
{ = { = "Down", = "SHIFT" } },
{ = { = "Up", = "SHIFT" } }
]
# Editor operation keybinds
[]
# (Details omitted)
# JSON viewer keybinds
[]
# (Details omitted)
# Application reactivity settings
[]
# Delay time after query input
= "600ms"
# Redraw delay time after window resize
= "200ms"
# Spinner animation update interval
= "300ms"
For more details on configuration, please refer to default.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.