jless

A command-line JSON viewer and pager — navigate, search, and explore JSON documents interactively in the terminal.

Screenshot of jless

jless is an interactive, keyboard-driven JSON viewer for the terminal. Rather than piping JSON through python -m json.tool or squinting at a wall of minified text, jless gives you a collapsible tree view with syntax highlighting, vim-style navigation, and a search mode — all without leaving the terminal.

Features

  • Collapsible tree view — expand and collapse objects and arrays to focus on the parts of the document you care about
  • Vim-style navigationhjkl, gg/G, {/}, Ctrl+d/Ctrl+u all work as you'd expect
  • Search/ searches forward, ? searches backward, through both keys and values
  • Multiple view modes — toggle between the default line-oriented view and a raw data view
  • Copy to clipboard — yank the current node's value or path with a keypress
  • Piped input — reads from stdin or a file, works naturally in shell pipelines
  • YAML support — can also display YAML documents in addition to JSON

Installation

cargo install jless

Or via your system package manager:

# macOS
brew install jless

# Arch Linux
pacman -S jless

# Nix
nix-env -iA nixpkgs.jless

# Debian / Fedora
# Pre-built Linux binaries are available on the
# [releases page](https://github.com/PaulJuliusMartinez/jless/releases).

Usage

# View a JSON file
jless data.json

# Pipe JSON from a command
curl -s https://api.github.com/repos/PaulJuliusMartinez/jless | jless

# View a YAML file
jless config.yaml

# Start with all nodes collapsed
jless --collapse data.json

Keybindings

KeyAction
h / Collapse the current node
l / Expand the current node
j / Move down one line
k / Move up one line
SpaceToggle collapse/expand
iEnter insert mode (scroll through data view)
ggJump to the top
GJump to the bottom
Ctrl+d / Ctrl+uScroll half a page down / up
{ / }Jump to previous / next sibling node
/Search forward
?Search backward
n / NNext / previous search match
yyCopy the current node's value to clipboard
ypCopy the path to the current node
qQuit

Tips

  • Collapse everything first — press c to recursively collapse all nodes, then expand only what you need. This is the fastest way to navigate a deeply nested document.
  • Use with jq — pipe jq output into jless for a great exploration workflow:
    curl -s https://api.github.com/orgs/rust-lang/repos | jq '.[] | {name, stars: .stargazers_count}' | jless
  • Use the path display — the current node's full JSON path is always shown at the bottom of the screen, so you always know where you are in the document.