# jless — Command-Line JSON Viewer with Interactive Navigation > jless is a Rust-based terminal JSON viewer designed for reading, exploring, and searching through large JSON data with vim-like key bindings and collapsible tree navigation. ## Install Save in your project root: # jless — Command-Line JSON Viewer with Interactive Navigation ## Quick Use ```bash # Install brew install jless # macOS cargo install jless # via Cargo # View a JSON file jless data.json # Pipe from another command curl -s https://api.example.com/data | jless ``` ## Introduction jless is a terminal-based JSON viewer that renders JSON data as a collapsible tree you can navigate, search, and explore interactively. It fills the gap between piping JSON through jq for extraction and opening files in a text editor for manual inspection. ## What jless Does - Displays JSON as an interactive, collapsible tree in the terminal - Supports vim-like key bindings for navigation (j/k/h/l) - Provides search functionality to locate keys and values - Handles large JSON files efficiently with lazy rendering - Supports YAML input in addition to JSON ## Architecture Overview jless parses input into a tree data structure and renders visible nodes to the terminal using a TUI framework. Navigation moves a cursor through the tree without re-parsing. Collapsed subtrees skip rendering entirely, allowing large documents to remain responsive. The search function walks the tree and highlights matching nodes. ## Self-Hosting & Configuration - Install via Homebrew, Cargo, or download prebuilt binaries for Linux and macOS - No configuration file is needed; jless works out of the box - Pass files as arguments or pipe JSON through stdin - Use `--mode line` for a flat line-based view instead of the tree - Supports reading from compressed files when piped through zcat or similar ## Key Features - Collapsible tree view with expand/collapse on individual nodes - Vim-style key bindings including gg, G, Ctrl-d, Ctrl-u for fast navigation - Regex-based search with n/N to jump between matches - Data mode that shows raw values vs. line mode for source-level view - Handles deeply nested documents without performance degradation ## Comparison with Similar Tools - **jq** — Powerful JSON processor for filtering and transforming, not an interactive viewer - **fx** — Interactive JSON viewer with JavaScript-based filtering, heavier runtime - **gron** — Flattens JSON to greppable lines, no tree view - **bat** — Syntax-highlighted file viewer, no JSON-specific navigation or collapse ## FAQ **Q: Does jless support editing JSON?** A: No. jless is read-only. Use jq or a text editor to modify JSON data. **Q: Can jless handle very large files?** A: Yes. jless uses lazy rendering so only visible nodes are drawn, making it responsive even with multi-megabyte files. **Q: Does it support YAML?** A: Yes. jless auto-detects YAML input and renders it as a navigable tree. **Q: How do I copy a value from jless?** A: Press y to yank the value at the cursor position to the system clipboard (where supported). ## Sources - https://github.com/PaulJuliusMartinez/jless - https://jless.io --- Source: https://tokrepo.com/en/workflows/asset-a308475a Author: AI Open Source