Update README.md

pull/268/head
Anton Medvedev 9 months ago
parent 6971270a0a
commit 85755ca76c
No known key found for this signature in database

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

@ -13,16 +13,10 @@ Or use **npx**:
cat file.json | npx fx .field cat file.json | npx fx .field
``` ```
Or use **node**:
```sh
cat file.json | node <(curl -s https://fx.wtf) .field
```
Or use **deno**: Or use **deno**:
```sh ```sh
cat file.json | deno run https://fx.wtf .field cat file.json | deno run -A https://fx.wtf .field
``` ```
## Usage ## Usage

Loading…
Cancel
Save