* Function eXecution
Command-line JSON processing tool
Features
- Easy to use
- Standalone binary
- Interactive mode
π - Streaming support
π
Install
npm install -g fxOr via Homebrew
brew install fxOr download standalone binary from releases
bash <( curl https://fx.wtf )Usage
Start interactive mode without passing any arguments.
$ curl ... | fxOr by passing filename as first argument.
$ fx data.jsonPass a few JSON files.
cat foo.json bar.json baz.json | fx .messageUse 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.namePrint formatted JSON to stdout.
$ curl ... | fx .Pipe JSON logs stream into fx.
$ kubectl logs ... -f | fx .messageAnd try this:
$ fx --lifeDocumentation
See full documentation.
Links
Related
- gofx β fx-like JSON tool (go)
- eat β converts anything into JSON
- ymlx β fx-like YAML cli processor
- fx-completion β bash completion for fx
- fx-theme-monokai β monokai theme
- fx-theme-night β night theme

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


