Skip to content
Latchkey

jless: A Command-Line JSON and YAML Viewer

jless opens a JSON or YAML file in a foldable, searchable pager so you can explore structure without scrolling raw text.

When an API response is thousands of lines, jless lets you collapse objects and jump around like less does for text. It is an interactive tool, so it belongs in local debugging, not in a headless CI step.

What it does

jless renders a JSON (or YAML with --yaml) document as a collapsible tree in your terminal. You expand and collapse nodes, search with /, and copy paths, similar to how a code editor folds. It reads a file argument or stdin.

Common usage

Terminal
jless response.json
curl -s https://api.example.com/data | jless
jless --yaml config.yaml
jless --mode line data.json   # start in line (raw) mode

Options

FlagWhat it does
--yamlParse the input as YAML instead of JSON
--jsonForce JSON parsing (the default)
--mode <data|line>Start in the folding data view or the raw line view
--versionPrint the jless version

In CI

jless is a viewer, not a filter: it needs an interactive terminal and never emits transformable output. In a pipeline, reach for jq or gron to extract values instead. Use jless locally to understand a payload before writing the extraction you will run in CI.

Common errors in CI

Running jless in a headless job typically fails with a terminal error such as "Device not configured" or "No such device or address" because there is no TTY. A parse failure prints "Unable to parse input as JSON" (or YAML) when the file is truncated or is not the format you told it to read.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →