Go to file
2023-04-19 11:04:08 +02:00
.github/workflows Add npm 2023-04-08 03:17:17 +02:00
doc Split reducers docs 2022-05-10 21:39:34 +02:00
npm Add skip test 2023-04-19 11:04:08 +02:00
pkg Update deps 2023-04-07 15:13:58 +02:00
scripts Update release process 2023-04-07 15:33:19 +02:00
snap Bump version in snapcraft.yaml 2023-04-07 15:50:23 +02:00
go.mod Update deps 2023-04-07 15:13:58 +02:00
go.sum Update deps 2023-04-07 15:13:58 +02:00
help.go add flag: -h, --help (#218) 2022-07-05 14:06:44 +02:00
install.sh Update install.sh 2023-04-07 15:45:18 +02:00
keymap.go Refactor search result printing 2022-04-16 22:16:19 +02:00
LICENSE Update LICENSE 2023-04-08 22:06:06 +02:00
main.go move cursor to view when jumping around (#217) 2023-04-07 14:57:09 +02:00
print.go Add FX_SHOW_SIZE config option 2022-05-08 16:15:13 +02:00
README.md Update README.md 2023-04-08 22:08:32 +02:00
RELEASE.md Update RELEASE.md 2023-04-07 15:50:14 +02:00
search_test.go Move part of the code to pkg 2022-04-17 22:57:12 +02:00
search.go Better search cursor jumps 2022-05-03 22:57:23 +02:00
stream.go Refactor reducers 2022-05-08 15:13:09 +02:00
util_test.go Reimplement in go 2022-04-16 22:16:19 +02:00
util.go Add FX_SHOW_SIZE config option 2022-05-08 16:15:13 +02:00
version.go Release 24.1.0 2023-04-07 15:33:40 +02:00
viewport.go Move part of the code to pkg 2022-04-17 22:57:12 +02:00

fx preview

* Function eXecution

Features

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

Install

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

Or download pre-built binary via:

curl https://fx.wtf/install.sh | sh

Take a look at the JavaScript version of the fx: npm i fx.

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.

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

Add your own themes in theme.go file.

License

MIT