fx
Command-line JSON viewer
Last updated 4 months ago by medv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fx 
SYNC missed versions from official npm registry.

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

Current Tags

  • 18.0.1                                ...           latest (4 months ago)

42 Versions

  • 18.0.1                                ...           4 months ago
  • 18.0.0                                ...           5 months ago
  • 17.0.0                                ...           5 months ago
  • 16.0.0                                ...           6 months ago
  • 15.0.1                                ...           6 months ago
  • 15.0.0                                ...           6 months ago
  • 14.1.0                                ...           7 months ago
  • 14.0.1                                ...           a year ago
  • 14.0.0                                ...           a year ago
  • 13.0.0                                ...           a year ago
  • 12.0.2                                ...           a year ago
  • 12.0.1                                ...           a year ago
  • 12.0.0                                ...           a year ago
  • 11.1.0                                ...           a year ago
  • 11.0.1                                ...           a year ago
  • 11.0.0                                ...           a year ago
  • 10.0.0                                ...           a year ago
  • 9.0.2                                ...           a year ago
  • 9.0.1                                ...           a year ago
  • 9.0.0                                ...           a year ago
  • 8.1.0                                ...           a year ago
  • 8.0.0                                ...           a year ago
  • 3.1.0                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
  • 0.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 96
Last Day 0
Last Week 46
Last Month 104
Dependencies (5)
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |