https://i.redd.it/mhl0c65d7pph1.gif I've released v0.1.0 of vy, a TUI (Terminal User Interface) viewer for exploring JSON / YAML in the terminal. I'm the author of jnv, which lets you try jq filters while browsing JSON interactively. vy builds on jnv's approach of trying queries as you browse, expanding it into a JSON / YAML viewer. It adds the ability to view YAML in its own format, explore subtrees, and navigate query input and results side by side. When reading API responses or YAML configuration files, you may want to check the structure first, open a record of interest, and extract the values you need. vy lets you browse the tree, explore individual sections, and transform data in a single session. One of the main features is the combination of focus and jaq. :focus opens the selected subtree as a temporary root, letting you search just that section or query it with :jaq. You can also use :focus to open part of a query result, and press Esc while browsing to return to the previous view. For example, the following commands open the first record in items and extract its name and processing time converted to seconds: :focus @0 .items[0] :jaq {name, seconds: (.duration_ms / 1000)} You can display the query input and results side by side, and browse the results as a tree. The overview GIF shows navigating to a record with goto, opening that section with focus, then returning to the original input and using jaq to extract failed records and inspect the input and results side by side. It also supports: Loading JSON / YAML from files or standard input, including JSON Lines and multiple YAML documents. Vim-style keybindings, path navigation with completion, and regex search. Listing and filtering paths and values with :flatten, and jumping to the corresponding node. Copying selected values or subtrees, saving them to a file, and writing them to standard output. Saving command and search history, and customizing keybindings and display settings. The interface opens after all input has been read, so it does not support following unending input such as tail -f. Queries use an embedded jaq engine, so there is no need to install an external jq command. It supports jq-like expressions, but is not fully compatible with jq. Other tools for similar tasks include fx and jless. With vy, you can view YAML in YAML format, explore subtrees with focus, and navigate jaq input and results side by side. The feature comparison with fx and jless covers differences in input formats, navigation and search, queries, output, and configuration. It includes the versions compared and supporting references for each item, so you can check how it differs from the tools you already use. It's built with Rust and my terminal UI library, promkit. promkit lets you build interactive terminal UIs in Rust by combining components such as text editors and JSON / YAML displays. Install it with cargo install vy-cli --locked or brew install ynqa/tap/vy. The source is available on GitHub under the MIT license. Some of the code was implemented with AI assistance. I'd appreciate feedback on how you usually inspect JSON / YAML and anything you found confusing while using it.   submitted by   /u/aqny [link]   [comments]