aless

JSON, YAML, TOML, CSV, XML, INI, Markdown and more as one tree: a jless-style viewer in a terminal, and JSON on standard output for scripts and agents.

▽ {
    openapi: "3.0.0"
  ▷ info: (4) {title: "Bookshelf demo API", version: "1.0.0", …}
  ▷ servers: (1) [{…}]
  ▷ tags: (2) [{…}, {…}]
  ▽ paths: {
    ▶ "/api/shelf": (2) {get: {…}, post: {…}}
    ▷ "/api/shelf/{shelf_id}": (4) {parameters: […], get: {…}, put: {…}, …}
    ▷ "/api/shelf/{shelf_id}/book": (3) {parameters: […], get: {…}, …}
    ▷ "/api/shelf/{shelf_id}/book/{book_id}": (3) {parameters: […], get: {…}, …}
    ▷ "/api/author": (1) {get: {…}}
 bookshelf-openapi.yaml .paths["/api/shelf"]             yaml · watching · 19:3

aless opens a file in a terminal as a tree you can fold, move through with the keys of jless, search, and copy paths and values from. It reads JSON, JSON5, JSONC, JSON Lines, jsonic, YAML, TOML, INI, CSV, TSV, XML, RSS and Atom, ZON, Markdown and plain text into the same tree, and any other format an ABNF grammar describes. It watches the files it shows, and when one changes on disk it reloads it and keeps your place.

Without a terminal, aless prints JSON instead of drawing a screen: an outline of a file, the value at a path, the path at a line and column, the nodes a search finds, a report on whether files parse, or the whole document in another format. That is the interface for shell scripts, CI jobs and AI agents, and it never waits for a key.

$ aless --json --path '.info.title' bookshelf-openapi.yaml
"Bookshelf demo API"

Install #

With Homebrew, on macOS or Linux, or with a Rust toolchain:

brew install rjrodger/tap/aless
cargo install --locked aless

Install aless has the installers for Linux, macOS and Windows, the prebuilt archives, and how to check what you downloaded.

The documentation #

Tutorials #

Two lessons from the start: the viewer, and the command line a script or an agent uses.

How-to guides #

Recipes for a task you already have: extract a value, convert a file, check files in CI, read a format of your own.

Reference #

Every option and output, and every key, written from the aless binary itself.

Explanation #

Why aless works as it does: one tree for every format, where values came from, and what large inputs cost.

About #

aless is a young project with one maintainer, and 0.1.0 was its first release. Its interface follows jless, by Paul Julius Martinez, and its notices credit it; aless and jless says where the two differ. Every format is read through the parsers of tabnas, a family of parsers in TypeScript, Go and Rust. aless is MIT licensed, and its source, releases and issues are on GitHub.