Command-line tool and terminal JSON viewer 🔥
Go to file
2019-01-30 10:24:29 +07:00
snap Update snapcraft.yaml 2018-12-19 23:30:27 +07:00
.gitignore Add standalone binary dist 2018-01-27 06:44:19 +07:00
.gitpod.yml Added gitpod config (#71) 2019-01-30 10:16:22 +07:00
.travis.yml ci: test Node.js 8, 10 and 11 (#26) 2018-11-08 14:42:32 +07:00
config.js Show status bar if pattern not found 2018-12-15 14:52:48 +07:00
docs.md Fix small typo 2019-01-08 12:36:15 +07:00
find.js Search on keys, not paths 2018-12-15 14:52:48 +07:00
fx.js feat: add cmd support (#77) 2019-01-30 09:34:25 +07:00
index.js Added h and help argument support (#78) 2019-01-30 10:16:47 +07:00
LICENSE Update LICENSE 2019-01-30 10:17:39 +07:00
package.json Add compression of assets 2019-01-30 10:17:39 +07:00
print.js Fix style on search cancel 2018-12-15 15:04:22 +07:00
README.md Update snap version 2019-01-30 10:24:29 +07:00
reduce.js Add better detection of functions in reduce 2018-12-07 23:33:55 +07:00
test.js Add better detection of functions in reduce 2018-12-07 23:33:55 +07:00

fx logo

fx example

* Function eXecution

Build Status Npm Version Brew Version Snap Version

Command-line JSON processing tool

Features

  • Formatting and highlighting
  • Standalone binary
  • Interactive mode 🎉
  • Themes support 🎨

Install

$ npm install -g fx

Or via Homebrew

$ brew install fx

Or download standalone binary from releases page.

Usage

Start interactive mode without passing any arguments.

$ curl ... | fx

Or by passing filename as first argument.

$ fx data.json

Pipe into fx any JSON and anonymous function for reducing it.

$ curl ... | fx 'json => json.message'

Or same as above but short.

$ curl ... | fx this.message
$ curl ... | fx .message

Pass any numbers of arguments as code.

$ curl ... | fx 'json => json.message' 'json => json.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
}

Pretty print JSON with dot.

$ curl ... | fx .

Documentation

See full documentation.

Contributing

Open in Gitpod

Or clone locally and run:

# install dependencies
npm install

# run fx
node index.js package.json

# run the build
npm run build

# try the built binary
./dist/fx-linux package.json

License

MIT