TiloBox
Back to directory
jless project preview

jless

An interactive terminal JSON viewer with structural navigation, search, line modes, and collapsible values.

LicenseMIT
GitHub stars5.5k
Last commit1 weeks ago
Tags7 topics
CliSearchRustJsonOpen SourceDeveloper ToolsTerminal Viewer
Overview

Why consider jless?

jless is an interactive command-line JSON viewer written in Rust that provides syntax highlighting, collapsible structures, vim-style navigation, and regex search. It offers developers an efficient alternative to traditional terminal combinations of jq and less.

Guided learning

Learn jless by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

4 min read 5 sections
In this guide5 sections

Exploring and Navigating Structured Data with jless

Introduction to jless

Working with deeply nested JSON documents in the terminal often involves awkward combinations of command-line utilities and text editors. According to the official documentation, jless is a command-line JSON viewer designed for reading, exploring, and searching through JSON data. Written in Rust, it delivers a specialized terminal environment tailored for inspecting complex payloads without requiring cumbersome manual formatting.

Developers frequently encounter unformatted API responses or complex event payloads that are difficult to parse in standard terminal pagers. In these scenarios, the tool pretty prints JSON and applies syntax highlighting when exploring external APIs or debugging request payloads. This visual distinction helps engineers quickly identify scalar values, nested structures, and object keys.

Structural Navigation and Tree Manipulation

Navigating large datasets requires the ability to switch between high-level hierarchy and granular leaf nodes. To facilitate this inspection, users can expand and collapse objects and arrays to inspect both high-level and low-level structures using vim-inspired navigation commands. Keys such as h, j, k, and l allow developers to traverse nodes, collapse sibling trees, and inspect individual properties without losing context.

To minimize visual noise during inspection, jless starts in data mode, presenting JSON without closing delimiters, trailing commas, or quotes around valid identifier keys. This streamlined presentation maximizes terminal real estate and allows engineers to focus on substantive data attributes. When standard formatting is required, pressing m switches the interface into line mode to display input as standard pretty-printed JSON.

Orientation within extensive files is maintained through flexible line markers. Specifically, jless supports both absolute and relative line numbers to assist in navigating large JSON payloads. Relative numbering helps users determine exact jump counts for vertical movement commands, while absolute numbers provide a stable reference to pretty-printed locations.

Advanced Search and Data Extraction

Finding specific attributes in extensive payloads can be tedious without robust query capabilities. To address this, the viewer supports full-text regular expression search to quickly locate data within string values or jump between matching keys. Users can search forward or backward using familiar slash patterns, and jump directly between occurrences of identical object keys across nested collections.

Extracting extracted values from the terminal into external scripts or configuration files is an essential requirement for command-line tools. Accordingly, developers can copy parts of the JSON data to their clipboard using dedicated y commands such as copying node values, unescaped strings, or object paths. This capability allows engineers to copy JavaScript-style dot paths, bracket notations, or unescaped string contents directly into their clipboard.

Stream Processing and YAML Compatibility

Command-line utilities thrive when they integrate cleanly into standard Unix pipelines. For pipeline workflows, jless can handle newline-delimited JSON, allowing users to pipe in output from jq or dense log files directly. This streaming support makes it possible to inspect log streams or paginated API results without manual pre-processing.

The utility is not restricted to JSON payloads alone. In addition to JSON, jless can also handle YAML data, either automatically by detecting the file extension, or by explicitly passing the --yaml flag. This enables teams managing Kubernetes manifests or CI/CD pipelines to navigate YAML hierarchies with identical keyboard shortcuts.

Getting Started with jless

To begin exploring JSON data, jless can read files directly, or read JSON data from standard input. The following commands demonstrate fetching remote data, inspecting a local file, or streaming piped content directly into the viewer:

bash
1$ curl https://api.github.com/repos/PaulJuliusMartinez/jless/commits -o commits.json
2$ jless commits.json
3$ cat commits.json | jless

When working regularly with YAML files, if you frequently view YAML data, we suggest the following alias: Setting this alias in your shell configuration simplifies daily inspection tasks:

bash
1$ alias yless="jless --yaml"

For installation across different environments, binaries for various architectures are also available on GitHub. For complete source code and release history, developers can visit the official jless repository and inspect the latest release updates on GitHub Releases.

Related tools

More options with a similar category or technology profile.

jless FAQs

jless is listed as a Developer Tools tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository and official website for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

jless is listed under the MIT license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

jless is listed as an alternative to JQ. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.