fx

Terminal JSON viewer

README

fx preview


_* Function eXecution_

Features


- Mouse support
- Streaming support
- Preserves key order
- Preserves big numbers

Install


  1. ``` sh
  2. brew install fx
  3. ```
  1. ``` sh
  2. snap install fx
  3. ```
  1. ``` sh
  2. scoop install fx
  3. ```
  1. ``` sh
  2. pacman -S fx
  3. ```
  1. ``` sh
  2. pkg install fx
  3. ```
  1. ``` sh
  2. go install github.com/antonmedv/fx@latest
  3. ```

Or download pre-built binary.

Usage


Start the interactive viewer via:

  1. ``` sh
  2. fx data.json
  3. ```

Or

  1. ``` sh
  2. curl ... | fx
  3. ```

Type ? to see full list of key shortcuts.

Pretty print:

  1. ``` sh
  2. curl ... | fx .
  3. ```

Reducers


Write reducers in your favorite language: JavaScript (default),

  1. ``` sh
  2. fx data.json '.filter(x => x.startsWith("a"))'
  3. ```

  1. ``` sh
  2. fx data.json '[x["age"] + i for i in range(10)]'
  3. ```

  1. ``` sh
  2. fx data.json 'x.to_a.map {|x| x[1]}'
  3. ```

Documentation


See full documentation.

Themes


Theme can be configured by setting environment variable FX_THEME from 1
to 9:

  1. ``` sh
  2. export FX_THEME=9
  3. ```

themes

Add your own themes in theme.go file.

License