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
# or write current result to stdout on exit (UNIX only)
| |
# and also output to file
|
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
[!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.
[!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.
# Whether to hide hint messages
= false
# Editor settings
# Uses promkit_widgets::text_editor::Config directly
[]
# Editor mode
# "Insert": Insert characters at the cursor position
# "Overwrite": Replace characters at the cursor position with new ones
= "Insert"
# Characters considered as word boundaries
# These are used to define word movement and deletion behavior in the editor
= [".", "|", "(", ")", "[", "]"]
# Style notation (termcfg)
# Format: "fg=<color>,bg=<color>,ul=<color>,attr=<token|token...>"
# Examples:
# - "fg=blue"
# - "fg=#00FF00,bg=black,attr=bold|underlined"
# - "attr=dim"
#
# Color tokens:
# - reset, black, red, green, yellow, blue, magenta, cyan, white
# - darkgrey, darkred, darkgreen, darkyellow, darkblue, darkmagenta, darkcyan, grey
# - #RRGGBB
#
# Attribute tokens (examples):
# - bold, italic, underlined, dim, reverse, crossedout, nounderline, nobold
#
# Notes:
# - ANSI 256-color index tokens (0..255, e.g. "200") are currently out of notation scope.
# - See termcfg notation reference for full token list.
#
# References:
# - https://github.com/ynqa/termcfg/blob/main/Notations.md
# - https://github.com/ynqa/termcfg
# Prefix shown before the cursor
= "❯❯ "
# Style for the prefix
= "fg=blue"
# Style for the character under the cursor
= "bg=magenta"
# Style for all other characters
= ""
# Theme settings when the editor is unfocused
[]
# Prefix shown when focus is lost
= "▼ "
# Style for the prefix when unfocused
= "fg=blue,attr=dim"
# Style for the character under the cursor when unfocused
= "attr=dim"
# Style for all other characters when unfocused
= "attr=dim"
# JSON display settings
[]
# Maximum number of JSON objects to read from streams (e.g., JSON Lines format)
# Limits how many objects are processed to reduce memory usage when handling large data streams
# No limit if unset
# max_streams =
# JSON display settings
# Uses promkit_widgets::jsonstream::Config directly
[]
# Number of spaces to use for indentation
= 2
# Style for curly brackets {}
= "attr=bold"
# Style for square brackets []
= "attr=bold"
# Style for JSON keys
= "fg=cyan"
# Style for string values
= "fg=green"
# Style for number values
= ""
# Style for boolean values
= ""
# Style for null values
= "fg=grey"
# Attribute for the selected row and unselected rows
= "bold"
# Attribute for unselected rows
= "dim"
# Behavior when JSON content exceeds the available width
# "Wrap": Wrap content to the next line
# "Truncate": Truncate content with an ellipsis (...)
= "Wrap"
# Completion feature settings
[]
# Settings for background loading of completion candidates
#
# Number of candidates loaded per chunk for search results
# A larger value displays results faster but uses more memory
= 100
# Number of items loaded per batch during background loading
# A larger value finishes loading sooner but uses more memory temporarily
= 50000
# Completion UI settings
# Uses promkit_widgets::listbox::Config directly
[]
# Number of lines to display for completion candidates
= 3
# Cursor character shown before the selected candidate
= "❯ "
# Style for the selected candidate
= "fg=grey,bg=yellow"
# Style for unselected candidates
= "fg=grey"
# Keybinding settings
[]
# Key to exit the application
= ["Ctrl+C"]
# Key to copy the query to the clipboard
= ["Ctrl+Q"]
# Key to copy the result to the clipboard
= ["Ctrl+O"]
# Keys to switch focus between editor and JSON viewer
= ["Shift+Down", "Shift+Up"]
# Keybindings for editor operations
[]
# Move cursor left
= ["Left"]
# Move cursor right
= ["Right"]
# Move cursor to beginning of line
= ["Ctrl+A"]
# Move cursor to end of line
= ["Ctrl+E"]
# Move cursor to previous word boundary
= ["Alt+B"]
# Move cursor to next word boundary
= ["Alt+F"]
# Delete character at the cursor
= ["Backspace"]
# Delete all input
= ["Ctrl+U"]
# Delete from cursor to previous word boundary
= ["Ctrl+W"]
# Delete from cursor to next word boundary
= ["Alt+D"]
# Trigger completion
= ["Tab"]
# Move up in the completion list
= ["Up"]
# Move down in the completion list
= ["Down", "Tab"]
# Keybindings for JSON viewer operations
[]
# Move up in JSON viewer
= ["Up", "Ctrl+K", "ScrollUp"]
# Move down in JSON viewer
= ["Down", "Ctrl+J", "ScrollDown"]
# Move to the top of JSON viewer
= ["Ctrl+L"]
# Move to the bottom of JSON viewer
= ["Ctrl+H"]
# Toggle expand/collapse of JSON nodes
= ["Enter"]
# Expand all JSON nodes
= ["Ctrl+P"]
# Collapse all JSON nodes
= ["Ctrl+N"]
# Application reactivity settings
[]
# Delay before processing query input
# Prevents excessive updates while user is typing
= "600ms"
# Delay before redrawing after window resize
# Prevents frequent redraws during continuous resizing
= "200ms"
# Interval for spinner animation updates
# Controls the speed of the loading spinner
= "300ms"