ducaale / fx

Terminal JSON viewer

Home Page:https://fx.wtf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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

About

Terminal JSON viewer

https://fx.wtf

License:MIT License


Languages

Language:Go 97.8%Language:JavaScript 1.9%Language:Python 0.2%Language:Ruby 0.1%