Command-line tool and terminal JSON viewer 🔥
Go to file
2020-09-04 00:00:43 +02:00
.gitignore Add standalone binary dist 2018-01-27 06:44:19 +07:00
.travis.yml Update travis node version 2020-09-04 00:00:43 +02:00
bang.js Add edit-in-place feature 2019-12-09 13:24:33 +07:00
config.js Show status bar if pattern not found 2018-12-15 14:52:48 +07:00
DOCS.md Add support for .[] 2020-09-03 23:54:32 +02:00
find.js Search on keys, not paths 2018-12-15 14:52:48 +07:00
fx.js Add comment about terminal resize 2019-12-09 13:31:13 +07:00
index.js Add better error messages 2020-06-17 17:17:14 +03:00
json.js Add better error messages 2020-06-17 17:17:14 +03:00
LICENSE Update LICENSE 2019-01-30 10:17:39 +07:00
package.json Add support for .[] 2020-09-03 23:54:32 +02:00
print.js Add lossless json 2019-12-13 12:48:43 +07:00
README.md Add support for .[] 2020-09-03 23:54:32 +02:00
reduce.js Add support for .[] 2020-09-03 23:54:32 +02:00
std.js Add support for .[] 2020-09-03 23:54:32 +02:00
stream.js Add better error messages 2020-06-17 17:17:14 +03:00
test.js Add support for .[] 2020-09-03 23:54:32 +02:00

fx logo

fx example

* Function eXecution

Build Status Npm Version Brew Version

Command-line JSON processing tool

Features

  • Easy to use
  • Standalone binary
  • Interactive mode 🎉
  • Streaming support 🌊

Install

npm install -g fx

Or via Homebrew

brew install fx

Or download standalone binary from releases

bash <( curl https://fx.wtf )

Usage

Start interactive mode without passing any arguments.

$ curl ... | fx

Or by passing filename as first argument.

$ fx data.json

Pass a few JSON files.

cat foo.json bar.json baz.json | fx .message

Use full power of JavaScript.

$ curl ... | fx '.filter(x => x.startsWith("a"))'

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

$ curl ... | fx '_.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 .[].author.name

Print formatted JSON to stdout.

$ curl ... | fx .

Pipe JSON logs stream into fx.

$ kubectl logs ... -f | fx .message

And try this:

$ fx --life

Documentation

See full documentation.

License

MIT