You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fx/README.md

71 lines
1.8 KiB
Markdown

<p align="center"><img src="https://user-images.githubusercontent.com/141232/35405308-4b41f446-0238-11e8-86c1-21f407cc8460.png" height="100" alt="fx"></p>
<p align="center"><img src="https://user-images.githubusercontent.com/141232/47933350-f0f22900-df06-11e8-9cf2-88492c1be774.gif" width="530" alt="fx example"></p>
_* Function eXecution_
7 years ago
[![Build Status](https://travis-ci.org/antonmedv/fx.svg?branch=master)](https://travis-ci.org/antonmedv/fx)
6 years ago
[![Npm Version](https://badgen.net/npm/v/fx)](https://www.npmjs.com/package/fx)
[![Brew Version](https://badgen.net/homebrew/v/fx)](https://formulae.brew.sh/formula/fx)
7 years ago
Command-line JSON processing tool
## Features
* Don't need to learn new syntax
* Plain JavaScript
* Formatting and highlighting
6 years ago
* Standalone binary
* Interactive mode 🎉
7 years ago
## Install
```
$ npm install -g fx
```
6 years ago
Or via Homebrew
```
$ brew install fx
```
7 years ago
7 years ago
Or download standalone binary from [releases](https://github.com/antonmedv/fx/releases) page.
6 years ago
<a href="https://www.patreon.com/antonmedv">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>
7 years ago
## Usage
6 years ago
Start interactive mode without passing any arguments.
7 years ago
```
$ curl ... | fx
7 years ago
```
6 years ago
Or by passing filename as first argument.
```
6 years ago
$ fx data.json
6 years ago
```
6 years ago
6 years ago
Pipe into `fx` any JSON and anonymous function for reducing it.
```bash
$ curl ... | fx 'json => json.message'
```
Or same as above but sorter.
```bash
$ curl ... | fx this.message
$ curl ... | fx .message
```
6 years ago
## Documentation
6 years ago
6 years ago
See full [documentation](https://github.com/antonmedv/fx/blob/master/docs.md).
7 years ago
## Related
6 years ago
* [xx](https://github.com/antonmedv/xx) - fx-like JSON tool (*go*)
6 years ago
* [ymlx](https://github.com/matthewadams/ymlx) - fx-like YAML cli processor
7 years ago
## License
[MIT](https://github.com/antonmedv/fx/blob/master/LICENSE)