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

94 lines
1.3 KiB
Markdown

2 years ago
<p align="center"><a href="https://fx.wtf"><img src="https://medv.io/assets/fx/fx-preview.gif" width="500" alt="fx preview"></a></p>
2 years ago
_* Function eXecution_
2 years ago
## Features
2 years ago
- Mouse support
- Streaming support
2 years ago
- Preserves key order
- Preserves big numbers
2 years ago
2 years ago
## Install
```bash
2 years ago
brew install fx
2 years ago
```
```bash
2 years ago
snap install fx
```
2 years ago
```bash
scoop install fx
2 years ago
```
2 years ago
```bash
pacman -S fx
```
```bash
pkg install fx
```
```bash
2 years ago
go install github.com/antonmedv/fx@latest
```
2 years ago
Or download [pre-built binary](https://github.com/antonmedv/fx/releases).
## Usage
2 years ago
Start the interactive viewer via:
2 years ago
```bash
2 years ago
fx data.json
2 years ago
```
Or
```bash
2 years ago
curl ... | fx
2 years ago
```
2 years ago
Type `?` to see full list of key shortcuts.
2 years ago
Pretty print:
```bash
curl ... | fx .
```
2 years ago
### Reducers
Write reducers in your favorite language: [JavaScript](doc/js.md) (default),
[Python](doc/python.md), or [Ruby](doc/ruby.md).
2 years ago
```bash
2 years ago
fx data.json '.filter(x => x.startsWith("a"))'
2 years ago
```
```bash
2 years ago
fx data.json '[x["age"] + i for i in range(10)]'
```
2 years ago
```bash
2 years ago
fx data.json 'x.to_a.map {|x| x[1]}'
2 years ago
```
2 years ago
## Documentation
2 years ago
2 years ago
See full [documentation](doc/doc.md).
2 years ago
2 years ago
## Themes
2 years ago
Theme can be configured by setting environment variable `FX_THEME` from `1`
to `9`:
2 years ago
```bash
2 years ago
export FX_THEME=9
2 years ago
```
2 years ago
<img width="1214" alt="themes" src="doc/images/themes.png">
2 years ago
2 years ago
Add your own themes in [theme.go](pkg/theme/theme.go) file.
2 years ago
## License
2 years ago
[MIT](LICENSE)