Skip to content
Command-line tool and terminal JSON viewer πŸ”₯
JavaScript Shell
Branch: master
Clone or download
Pull request Compare This branch is 3 commits behind antonmedv:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add standalone binary dist Jan 26, 2018
.travis.yml
DOCS.md Add support for query languages Dec 25, 2019
LICENSE Update LICENSE Jan 30, 2019
README.md Update README.md Dec 29, 2019
bang.js Add edit-in-place feature Dec 9, 2019
config.js
find.js Search on keys, not paths Dec 15, 2018
fx.js
index.js
install.sh
package.json Update package.json Dec 29, 2019
print.js Add lossless json Dec 13, 2019
reduce.js Add @ as map operation prefix Jan 8, 2020
std.js Add edit-in-place feature Dec 9, 2019
stream.js Add lossless json Dec 13, 2019
test.js

README.md

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 -L 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
}

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.

Links

Related

License

MIT

You can’t perform that action at this time.