A terminal viewer for plain text data files

View JSON (and variants), YAML, TOML, CSV, XML, Markdown, and many more formats directly in your terminal. Review the tree structure of the data format directly with your keyboard. If the file changes, aless reloads and keeps your place. Great for reviewing generated OpenAPI specs, XML documents, CSV files and other large mucky things.

And a quick shout out to jless, which was the inspiration for this project.

Take the tutorial Install aless

aless 0.8.0 · MIT licensed · github.com/rjrodger/aless

This screen shows an OpenAPI document in YAML. The command is aless --depth 2 bookshelf-openapi.yaml, so only the first two levels start open:

▼ {
    openapi: "3.0.0"
  ▽ info: {
      title: "Bookshelf demo API"
      version: "1.0.0"
      description: "A small API for keeping books on shelves, written for aless…
    ▷ license: (1) {name: "MIT"}
  ▽ servers: [
    ▷ (2) {url: "https://bookshelf.example/v1", …}
  ▽ tags: [
    ▷ (2) {name: "shelf", description: "Shelves, and the books on them"}
    ▷ (2) {name: "author", description: "The people who wrote the books"}
  ▽ paths: {
    ▷ "/api/shelf": (2) {get: {…}, post: {…}}
    ▷ "/api/shelf/{shelf_id}": (4) {parameters: […], get: {…}, put: {…}, …}
    ▷ "/api/shelf/{shelf_id}/book": (3) {parameters: […], get: {…}, …}
 bookshelf-openapi.yaml .                                 yaml · watching · 1:1 

The tutorial, Look around a file in the viewer, walks through that document. The tutorial takes about 10 minutes.

When a file changes, aless marks what changed and keeps the version it replaced. Here a save changed a year in books.json and removed a tag:

▼ [
└─▽ {
  │   title: "A Book of Examples"
  │   author: "A. N. Author"
  ├─~ year: 2001
  └─▽ tags: [ −1
        "examples"
── 2 changes in version 2 · [ older · d next change ────────────────────────────
  ~ [0].year     1999 → 2001
  − [0].tags[1]  "reference"
 14:00:05 ○──────────────────────────────────────────────────● 14:02:11  2 of 2
 books.json .                                             json · watching · 1:1 
Reloaded books.json: 1 changed, 1 removed

A ~ marks a changed value, and −1 counts a removed one. The timeline above the status bar has a dot for each version. For more information, see Compare the versions of a file.

Install #

aless is one binary. Each release has builds for Linux, macOS, and Windows. Each platform gets an x86_64 build and an aarch64 build. With Homebrew or Cargo, one command installs aless:

With Command
Homebrew, on macOS or Linux brew install rjrodger/tap/aless
A Rust toolchain cargo install --locked aless
cargo binstall cargo binstall aless

An installer script puts the newest release's binary in ~/.cargo/bin. On Linux or macOS, run:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rjrodger/aless/releases/latest/download/aless-installer.sh | sh

On Windows, in PowerShell, run:

powershell -ExecutionPolicy Bypass -c "irm https://github.com/rjrodger/aless/releases/latest/download/aless-installer.ps1 | iex"

For more information about checking what you downloaded, see Install aless.

Formats #

aless reads every format into the same tree, so the keys, the search, the paths you copy, and the source positions work the same way on every format. aless can also read a format it has no built-in grammar for, with a custom grammar of your own. You write the custom grammar in ABNF.

Reads json jsonl jsonic jsonc json5 yaml toml ini csv tsv xml zon markdown feed css proto pgn c abnf ebnf gbnf expr semver text any ABNF grammar

For more information about the extensions that imply each format, and about what each format becomes in the tree, see Formats.

Documentation #

Project #

Who writes it #

Richard Rodger writes aless. aless is a tabnas project. The tabnas parsers are a family of parsers in TypeScript, Go, and Rust. aless reads every format through the tabnas parsers, so a new format is a grammar rather than a feature.

What it owes jless #

jless inspired aless. Paul Julius Martinez wrote jless. aless has the interface of jless: the key map, the data mode and line mode, the folded previews, the search, and the copy commands. aless is an independent implementation. Its notices credit jless as the design it follows. For more information about where aless differs from jless, see aless and jless.

Licence and source #

aless is MIT licensed. Its source, its releases, and its issues are on GitHub. The crate is on crates.io. For more information about what each release changed, see Releases.