Command-line tool and terminal JSON viewer 🔥
Go to file
2022-04-16 22:16:19 +02:00
docs/images Add README.md 2022-04-16 22:16:19 +02:00
dict_test.go Refactor to use separate path vars 2022-04-16 22:16:19 +02:00
dict.go Refactor to use separate path vars 2022-04-16 22:16:19 +02:00
go.mod Add themes 2022-04-16 22:16:19 +02:00
go.sum Add themes 2022-04-16 22:16:19 +02:00
help.go Reimplement in go 2022-04-16 22:16:19 +02:00
keymap.go Refactor search result printing 2022-04-16 22:16:19 +02:00
main.go Add themes 2022-04-16 22:16:19 +02:00
parse_test.go Reimplement in go 2022-04-16 22:16:19 +02:00
parse.go Reimplement in go 2022-04-16 22:16:19 +02:00
print.go Add themes 2022-04-16 22:16:19 +02:00
README.md Add README.md 2022-04-16 22:16:19 +02:00
reduce.go Add themes 2022-04-16 22:16:19 +02:00
reduce.js Add reduce 2022-04-16 22:16:19 +02:00
search_test.go Better handling of search edge cases 2022-04-16 22:16:19 +02:00
search.go Better handling of search edge cases 2022-04-16 22:16:19 +02:00
stringify_test.go Better handling of search edge cases 2022-04-16 22:16:19 +02:00
stringify.go Better handling of search edge cases 2022-04-16 22:16:19 +02:00
theme.go Add themes 2022-04-16 22:16:19 +02:00
traverse.go Reimplement in go 2022-04-16 22:16:19 +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
viewport.go Refactor search result printing 2022-04-16 22:16:19 +02:00

fx

fx example

* Function eXecution

Install

go install github.com/antonmedv/fx

Or via Homebrew

TODO

Or download pre-built binary.

Usage

$ fx data.json

Or

$ curl ... | fx

Reducers

$ fx data.json '.filter(x => x.startsWith("a"))'

Access all lodash (or ramda, etc) methods by using .fxrc file.

$ fx data.json 'groupBy("commit.committer.name")' 'mapValues(_.size)'

Update JSON using spread operator.

$ echo '{"count": 0}' | fx '{...this, count: 1}'
{
  "count": 1
}

Extract values from maps.

$ fx commits.json | fx .[].commit.author

Pretty print.

$ curl ... | fx .

Documentation

See full documentation.

Themes

FX_THEME=1 FX_THEME=2 FX_THEME=3
FX_THEME=4 FX_THEME=5 FX_THEME=6
FX_THEME=7 FX_THEME=8 FX_THEME=9

License

MIT