You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Anton Medvedev a574d75e41
Theme 🔵
9 months ago
.github/workflows Add npm 1 year ago
doc Split reducers docs 2 years ago
npm Refactor main 9 months ago
path path 9 months ago
scripts Update release process 1 year ago
snap Bump version in snapcraft.yaml 1 year ago
testdata More themes 9 months ago
LICENSE Update LICENSE 9 months ago
README.md Update README.md 9 months ago
RELEASE.md Bump version 9 months ago
go.mod New fx 9 months ago
go.sum New fx 9 months ago
help.go Show help by default 9 months ago
install.sh Update install.sh 1 year ago
json.go New fx 9 months ago
keymap.go Remove ? 9 months ago
main.go Search for values 9 months ago
main_test.go New fx 9 months ago
node.go New fx 9 months ago
reduce.go Add reducer 9 months ago
ring.go New fx 9 months ago
search.go Move to utils.go 9 months ago
theme.go Theme 🔵 9 months ago
utils.go Move to utils.go 9 months ago
version.go Add reducer 9 months ago
wrap.go New fx 9 months ago

README.md

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