jnv
An interactive JSON viewer that applies jq filters and updates results as the expression is edited.
Why consider jnv?
jnv is an interactive command-line JSON navigator and jq filter editor built with Rust. It provides real-time preview, syntax highlighting, and autocompletion for navigating complex JSON data directly in the terminal.
Learn jnv by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide5 sections
Interactive JSON Navigation and Filtering
Navigating large or nested JSON structures in the terminal often requires repetitive trial-and-error with CLI query tools. According to the official README, jnv is designed for navigating JSON, offering an interactive JSON viewer and jq filter editor. This terminal interface enables developers to inspect deep hierarchical payloads with immediate feedback as expressions are written.
Traditional workflows typically require installing and configuring standalone jq binaries alongside other shell utilities. As documented in the project repository documentation, by embedding the jaq engine directly into the binary, jnv eliminates the need for users to prepare jq on their own. This self-contained architecture allows immediate execution in diverse environments without external dependency management.
Input Handling and Filter Autocompletion
Data ingestion flexibility is essential when processing logs, API responses, and database exports. As stated in the jnv README, the utility accommodates multiple input formats including standard input streams, single files, and JSON Lines data. Users can pipe live streams directly into the interface or pass file paths as command-line arguments during operational debugging.
Writing complex jq path expressions manually can introduce syntax errors when navigating intricate structures. As outlined in the README specifications, auto-completion assists filter authoring by supporting identity, object identifier indexing, and array index notation. Key suggestions reduce typing overhead and help operators explore available object keys efficiently.
Installation and Package Distribution
Operators can install jnv using standard package managers across various operating systems. The official build configuration in Cargo.toml specifies that the package metadata defines jnv as a JSON navigator and interactive filter leveraging jq. For Rust developers, installing via the Cargo toolchain provides a direct compilation path.
cargo install jnvFor macOS and Linux systems, Homebrew package manager support provides another official distribution channel. As documented in the official README, official installation options include Homebrew formulae allowing users to install jnv via brew install jnv. This allows developers using macOS or Linux Homebrew environments to install the utility with a single command.
brew install jnvIn addition to package managers, the project publishes compiled executables for multiple CPU architectures. According to the v0.7.1 release notes, release distributions provide prebuilt binaries across multiple platforms along with an automated installer script. This ensures rapid setup on continuous integration workers or bare-metal Linux instances.
Practical Usage and Pipeline Execution
Once installed, jnv can be invoked directly with a file path or fed via Unix pipeline streams. According to the usage instructions, execution options include the write-to-stdout flag to pipe evaluated JSON results directly to downstream commands upon exit. This makes it possible to interactively craft a query and feed the final filtered payload into subsequent scripts.
cat data.json | jnv# orjnv 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 filecat data.json | jnv -- --write-to-stdout > result.jsonConfiguration and Licensing
Fine-tuning terminal behavior is supported via local TOML settings files. According to the configuration guide, users can configure debounce durations, styling, completion behaviour, and custom keybindings through a TOML configuration file. This allows teams to tailor debounce intervals, theme colors, and navigation keys to match their terminal workflows.
Project licensing and repository maintenance adhere to permissive open-source standards. Based on the Cargo package definition and repository details at ynqa/jnv, the official package configuration specifies that the project is distributed under the MIT license. This licensing grant allows unrestricted commercial and non-commercial adoption, modification, and integration into existing developer tooling stacks.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.