Go to file
Anton Medvedev 9c81b09720
Add reducer
2023-09-13 16:25:11 +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 Throw error on control chars in JSON string 2023-09-07 16:36:21 +02:00
path path 2023-09-13 15:52:31 +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
testdata New fx 2023-09-12 17:00:23 +02:00
go.mod New fx 2023-09-12 17:00:23 +02:00
go.sum New fx 2023-09-12 17:00:23 +02:00
help.go New fx 2023-09-12 17:00:23 +02:00
install.sh Update install.sh 2023-04-07 15:45:18 +02:00
json.go New fx 2023-09-12 17:00:23 +02:00
keymap.go New fx 2023-09-12 17:00:23 +02:00
LICENSE Update LICENSE 2023-09-12 16:53:55 +02:00
main_test.go New fx 2023-09-12 17:00:23 +02:00
main.go Add reducer 2023-09-13 16:25:11 +02:00
node.go New fx 2023-09-12 17:00:23 +02:00
README.md Update README.md 2023-09-12 17:03:28 +02:00
reduce.go Add reducer 2023-09-13 16:25:11 +02:00
RELEASE.md Update RELEASE.md 2023-04-07 15:50:14 +02:00
ring.go New fx 2023-09-12 17:00:23 +02:00
theme.go New fx 2023-09-12 17:00:23 +02:00
utils.go New fx 2023-09-12 17:00:23 +02:00
version.go Add reducer 2023-09-13 16:25:11 +02:00
wrap.go New fx 2023-09-12 17:00:23 +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