# 使用 Homebrew, apk, MacPorts, Nix, pacman, zypper, scoop 安装 fx

查看 fx 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:fx
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install fx
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install fx
```

  证据: MacPorts ports tree: sysutils/fx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add fx
```

  证据: Alpine Linux edge package indexes: fx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#fx
```

  证据: nixpkgs package indexes: pkgs/by-name/fx/fx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S fx
```

  证据: Arch Linux sync databases: fx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install fx
```

  证据: openSUSE Tumbleweed package metadata: fx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/fx
```

  证据: Scoop official bucket manifest trees: bucket/fx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:fx
- **软件包管理器:** Homebrew
- **版本:** 39.2.0
- **来源摘要:** Terminal JSON viewer
- **主页:** <https://fx.wtf>
- **仓库:** <https://github.com/antonmedv/fx>
- **最后更新:** 2026-07-25T20:54:35-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- fx (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 39.2.0
## 项目历史与用法

fx is a terminal JSON viewer and processor that combines an interactive TUI with a JavaScript-powered command-line transformation model. Its current official site describes it as a CLI for JSON that can show JSON interactively, transform input with JavaScript, process streaming JSON, and also handle YAML and TOML.

### 项目历史

The GitHub repository was created in January 2018, and GitHub Releases show 1.0.3 published the next day. The project is styled as f(x) in its README and documentation, with the docs explaining the name as the idea of applying a function to input data.

fx is now written in Go and embeds the goja JavaScript engine. Its release checklist shows a multi-channel distribution workflow: version bumps in the Go source, Snapcraft metadata, and npm package metadata, followed by npm publication, GitHub Actions for brew, snap, and Docker, and binary uploads to GitHub Releases.

### 采用历史

fx fits into the post-jq wave of terminal JSON tools: it keeps JSON exploration in the terminal but adds a navigable interface, path suggestions, regex search, printing selected values to stdout, and JavaScript expressions instead of a separate query DSL. Supplied package-manager facts list packaging across Homebrew, apk, MacPorts, Nix, Arch, Scoop, and zypper.

### 使用方式

Typical use is either `fx data.json` or piping JSON into `fx` for interactive browsing. In processing mode, arguments are JavaScript functions or shorthand expressions such as `.name`, and input data flows through each expression in sequence. The docs also describe streaming mode for line-delimited or concatenated JSON and a slurp option for collective array processing.

### 为什么软件包爱好者会关心

Package maintainers care about fx because it ships as a single Go-based terminal binary while still exposing JavaScript as the transformation language. It is a representative modern CLI package that crosses TUI browsing, JSON pretty-printing, shell pipelines, npm distribution, binary releases, Homebrew, Snap, and Docker.

### 时间线

- 2018: GitHub repository created.
- 2018: GitHub Release 1.0.3 published.
- 2025: GitHub Release 39.2.0 published.
- 2026: Repository metadata showed continued activity.

### Related projects

- The upstream README lists other Anton Medvedev terminal projects as related work: walk, howto, and countdown. In everyday package-manager context, fx is often evaluated near jq-style JSON processors, but the official sources emphasize fx's own TUI and JavaScript processing model rather than positioning it as a jq clone.

### 来源

- <https://api.github.com/repos/antonmedv/fx>
- <https://fx.wtf/>
- <https://fx.wtf/getting-started>
- <https://github.com/antonmedv/fx>
- <https://github.com/antonmedv/fx/releases>
- <https://raw.githubusercontent.com/antonmedv/fx/master/README.md>
- <https://raw.githubusercontent.com/antonmedv/fx/master/RELEASE.md>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - fx: normalized package name match | nixpkgs package indexes: pkgs/by-name/fx/fx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - fx - 39.2.0-r7: normalized package name match | Alpine Linux edge package indexes: fx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line tool and terminal JSON viewer | https://github.com/antonmedv/fx
- apk - fx-doc - 39.2.0-r7: normalized package name match | Alpine Linux edge package indexes: fx-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line tool and terminal JSON viewer (documentation) | https://github.com/antonmedv/fx
- pacman - fx - 39.2.0-1: normalized package name match | Arch Linux sync databases: fx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command-line tool and terminal JSON viewer | https://github.com/antonmedv/fx
- zypper - fx - 39.2.0-1.7: normalized package name match | openSUSE Tumbleweed package metadata: fx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Terminal JSON viewer | https://fx.wtf/
- MacPorts - fx: normalized package name match | MacPorts ports tree: sysutils/fx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/fx: normalized package name match | Scoop official bucket manifest trees: bucket/fx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/fx.yml](https://github.com/mxcl/pkgdb/blob/main/combined/fx.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
