mirror of
https://github.com/antonmedv/fx.git
synced 2024-11-09 13:13:51 +03:00
Command-line tool and terminal JSON viewer 🔥
docs/images | ||
dict_test.go | ||
dict.go | ||
go.mod | ||
go.sum | ||
help.go | ||
keymap.go | ||
main.go | ||
parse_test.go | ||
parse.go | ||
print.go | ||
README.md | ||
reduce.go | ||
reduce.js | ||
search_test.go | ||
search.go | ||
stringify_test.go | ||
stringify.go | ||
theme.go | ||
traverse.go | ||
util_test.go | ||
util.go | ||
viewport.go |
fx
* 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 |