Command-line tool and terminal JSON viewer 🔥
Go to file
2022-04-25 16:22:42 +02:00
.github/workflows Update release script 2022-04-25 16:22:42 +02:00
docs Add ruby reducers 2022-04-18 23:02:55 +02:00
pkg Fix nodejs cwd 2022-04-23 12:20:45 +02:00
snap Update release script 2022-04-25 16:22:42 +02:00
go.mod Update deps 2022-04-22 15:17:26 +02:00
go.sum Update deps 2022-04-22 15:17:26 +02:00
help.go Better usage output 2022-04-18 16:54:32 +02:00
keymap.go Refactor search result printing 2022-04-16 22:16:19 +02:00
LICENSE Add LICENSE 2022-04-16 22:16:19 +02:00
main.go Add delay before booting up interactive view 2022-04-22 15:17:09 +02:00
print.go Move part of the code to pkg 2022-04-17 22:57:12 +02:00
README.md Update README.md 2022-04-23 19:50:11 +02:00
search_test.go Move part of the code to pkg 2022-04-17 22:57:12 +02:00
search.go Move part of the code to pkg 2022-04-17 22:57:12 +02:00
util_test.go Reimplement in go 2022-04-16 22:16:19 +02:00
util.go Refactor search result printing 2022-04-16 22:16:19 +02:00
version.go Release 22.0.0 2022-04-23 19:44:53 +02:00
viewport.go Move part of the code to pkg 2022-04-17 22:57:12 +02:00

fx example

* Function eXecution

Features

  • Interactive viewer
  • Preserves key order
  • Preserves big numbers

Install

brew install fx
snap install fx
scoop install fx
pacman -S fx
go install github.com/antonmedv/fx@latest

Or download pre-built binary.

Usage

Start the interactive viewer via:

fx data.json

Or

curl ... | fx

Type ? to see full list of key shortcuts.

Pretty print:

curl ... | fx .

Reducers

Write reducers in your favorite language: JavaScript (default), Python, or Ruby.

export FX_LANG=node
fx data.json '.filter(x => x.startsWith("a"))'
export FX_LANG=python
fx data.json '[x["age"] + i for i in range(10)]'
export FX_LANG=ruby
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:

export FX_THEME=9
themes

License

MIT