2022-04-16 20:15:18 +00:00
|
|
|
# fx
|
|
|
|
|
|
|
|
<p align="center"><img src="https://medv.io/assets/fx.gif" width="562" alt="fx example"></p>
|
|
|
|
|
|
|
|
_* Function eXecution_
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
```bash
|
2022-04-17 15:48:42 +00:00
|
|
|
go install github.com/antonmedv/fx@latest
|
2022-04-16 20:15:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Or via Homebrew
|
|
|
|
|
|
|
|
```bash
|
|
|
|
TODO
|
|
|
|
```
|
|
|
|
|
|
|
|
Or download [pre-built binary](https://github.com/antonmedv/fx/releases).
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
Start the interactive viewer via:
|
|
|
|
|
2022-04-16 20:15:18 +00:00
|
|
|
```bash
|
|
|
|
$ fx data.json
|
|
|
|
```
|
|
|
|
|
|
|
|
Or
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ curl ... | fx
|
|
|
|
```
|
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
Type `?` to see full list of key shortcuts.
|
|
|
|
|
2022-04-16 20:15:18 +00:00
|
|
|
### Reducers
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ fx data.json '.filter(x => x.startsWith("a"))'
|
|
|
|
```
|
|
|
|
|
|
|
|
Access all lodash (or ramda, etc) methods by
|
|
|
|
using [.fxrc](https://github.com/antonmedv/fx/blob/master/DOCS.md#using-fxrc)
|
|
|
|
file.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ fx data.json 'groupBy("commit.committer.name")' 'mapValues(_.size)'
|
|
|
|
```
|
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
## Documentation
|
2022-04-16 20:15:18 +00:00
|
|
|
|
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
See full [documentation](https://github.com/antonmedv/fx/blob/master/DOCS.md).
|
2022-04-16 20:15:18 +00:00
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
## Themes
|
2022-04-16 20:15:18 +00:00
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
Theme can be configured by setting environment variable `FX_THEME` from `1` to `9`:
|
2022-04-16 20:15:18 +00:00
|
|
|
|
|
|
|
```bash
|
2022-04-17 21:04:58 +00:00
|
|
|
export FX_THEME=9
|
2022-04-16 20:15:18 +00:00
|
|
|
```
|
|
|
|
|
2022-04-17 21:04:58 +00:00
|
|
|
<img width="1214" alt="themes" src="docs/images/themes.png">
|
2022-04-16 20:15:18 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
[MIT](https://github.com/antonmedv/fx/blob/master/LICENSE)
|