Need help with fx?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

antonmedv
10.7K Stars 346 Forks MIT License 248 Commits 38 Opened issues

Description

Command-line tool and terminal JSON viewer 🔥

Services available

!
?

Need anything else?

Contributors list

# 9,160
PHP
Shell
JavaScr...
configu...
231 commits
# 22,462
gtk
vala
brook
spotify
2 commits
# 9,486
TypeScr...
eclipse
Electro...
Node.js
1 commit
# 1,191
Markdow...
vercel
node
open-gr...
1 commit
# 160,630
aws-lam...
lambda
amphp
Racket
1 commit
# 30,253
vanilla...
inputma...
maskedi...
nim-lan...
1 commit
# 21,671
Ruby
Rails
GitHub ...
GitHub
1 commit
# 41,315
Apache ...
Spring
cql
golang
1 commit
# 133,957
gpx
python3
CSS
Shell
1 commit
# 28,295
cloudfl...
Svelte
C#
keystro...
1 commit
# 5,874
React
meta-ta...
favicon
Electro...
1 commit
# 106,472
HTML
yarn
npm
React
1 commit
# 78,336
Emacs
ESLint
ecmascr...
reposit...
1 commit
# 274,405
JavaScr...
1 commit
# 4,047
css-fra...
xmlhttp...
executa...
node-mo...
1 commit
# 259,985
opensou...
CSS
C#
apache
1 commit

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

bash
brew install fx
Or download standalone binary from releases

Usage

Start interactive mode without passing any arguments.

bash
$ curl ... | fx

Or by passing filename as first argument.

bash
$ fx data.json

Pass a few JSON files.

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

Use full power of JavaScript.

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

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

bash
$ curl ... | fx '_.groupBy("commit.committer.name")' '_.mapValues(_.size)'

Update JSON using spread operator.

bash
$ echo '{"count": 0}' | fx '{...this, count: 1}'
{
  "count": 1
}

Extract values from maps.

bash
$ fx commits.json | fx .[].author.name

Print formatted JSON to stdout.

bash
$ curl ... | fx .

Pipe JSON logs stream into fx.

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

And try this:

bash
$ fx --life

Documentation

See full documentation.

Links

Related

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.