fx
Terminal JSON viewer
README
_* Function eXecution_
Features
- Mouse support
- Streaming support
- Preserves key order
- Preserves big numbers
Install
- ``` sh
- brew install fx
- ```
- ``` sh
- snap install fx
- ```
- ``` sh
- scoop install fx
- ```
- ``` sh
- pacman -S fx
- ```
- ``` sh
- pkg install fx
- ```
- ``` sh
- go install github.com/antonmedv/fx@latest
- ```
Or download pre-built binary.
Usage
Start the interactive viewer via:
- ``` sh
- fx data.json
- ```
Or
- ``` sh
- curl ... | fx
- ```
Type ? to see full list of key shortcuts.
Pretty print:
- ``` sh
- curl ... | fx .
- ```
Reducers
Write reducers in your favorite language: JavaScript (default),
- ``` sh
- fx data.json '.filter(x => x.startsWith("a"))'
- ```
- ``` sh
- fx data.json '[x["age"] + i for i in range(10)]'
- ```
- ``` sh
- fx data.json 'x.to_a.map {|x| x[1]}'
- ```
Documentation
See full documentation.
Themes
Theme can be configured by setting environment variable FX_THEME from 1
to 9:
- ``` sh
- export FX_THEME=9
- ```
Add your own themes in theme.go file.