# 使用 Homebrew 安装 fanyi

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

## 安装

```sh
sudo av install brew:fanyi
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install fanyi
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:fanyi
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/fanyi>
- **版本:** 11.0.0
- **来源摘要:** Chinese and English translate tool in your command-line
- **主页:** <https://github.com/afc163/fanyi>
- **仓库:** <https://github.com/afc163/fanyi>
- **许可证:** MIT
- **源码归档:** <https://registry.npmjs.org/fanyi/-/fanyi-11.0.0.tgz>
- **最后更新:** 2026-06-08T21:46:19+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- fanyi (cli)
- fy (cli)
- fanyi (别名)
- fy (别名)

## 依赖

- node

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 11.0.0
- 管理器更新时间: 2026-06-08
- 本地数据: OK
- 上游仓库: https://github.com/afc163/fanyi
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Fanyi is a Chinese-English command-line translation tool. The README describes it as powered by iciba, Youdao, and LLM translation, with the `fanyi` command and shorter `fy` alias.

### 项目历史

The repository was created in December 2013, making Fanyi one of the longer-running small CLI tools in this batch. Its core workflow remains intentionally simple: install globally with npm or bun, then run `fanyi word` or `fy word` for dictionary and translation output.

In 2026, the v11.0.0 release announcement in the README highlighted a shift toward out-of-the-box LLM translation through a built-in free proxy, restored Youdao support, streaming semantic coloring, custom OpenAI-compatible LLM configuration, and an agent skill.

### 采用历史

Official project surfaces include npm distribution, Homebrew packaging in the input facts, GitHub releases, and README badges for npm version and monthly downloads. The repository metadata also shows substantial GitHub interest for a small translation CLI.

### 使用方式

The normal user flow is `fanyi <word-or-sentence>` or `fy <word-or-sentence>`, with support for Chinese and English words, phrases, and sentences. `fanyi list` shows lookup history.

Configuration lives at `~/.config/fanyi/.fanyirc` and can be managed with `fanyi config set`. Users can disable individual sources, turn color off, or set `LLM_API_KEY`, `LLM_API_BASE_URL`, and `LLM_MODEL_ID` for custom OpenAI-compatible models.

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

Fanyi is package-manager-friendly because it turns a web dictionary and translation workflow into a tiny global CLI. Its 2026 LLM and agent-skill additions also show how older Node command-line packages are being refreshed for AI-agent and model-backed workflows.

### 时间线

- 2013: Repository created.
- 2020: v4.2.0 released.
- 2023: v8.0.0 released.
- 2025: v10.0.0 released.
- 2026: v11.0.0 released with built-in LLM proxy and agent skill.

### Related projects

- iciba and Youdao are documented translation sources.
- OpenAI-compatible chat APIs are supported for custom LLM translation.
- npm is the primary JavaScript package distribution channel.

### 来源

- <https://github.com/afc163/fanyi>
- <https://raw.githubusercontent.com/afc163/fanyi/master/README.md>
- <https://api.github.com/repos/afc163/fanyi>
- <https://api.github.com/repos/afc163/fanyi/releases?per_page=100>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/fanyi/.fanyirc

## Credential files

- Unix: ~/.config/fanyi/.fanyirc
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** fanyi
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [node](https://pkg.so/zh-hans/brew/node/) - Runtime dependency declared by Homebrew.
- [translate-shell](https://pkg.so/zh-hans/brew/translate-shell/) - Shares pkgdb curated category or tags: cli, productivity, translation.
- [gtranslator](https://pkg.so/zh-hans/brew/gtranslator/) - Shares pkgdb curated category or tags: cli, productivity, translation.
- [liblouis](https://pkg.so/zh-hans/brew/liblouis/) - Shares pkgdb curated category or tags: cli, productivity, translation.
- [yuque-dl](https://pkg.so/zh-hans/brew/yuque-dl/) - Shares pkgdb curated category or tags: cli, nodejs, productivity.
- [libchewing](https://pkg.so/zh-hans/brew/libchewing/) - Shares pkgdb curated category or tags: chinese, cli, productivity.
- [tmux](https://pkg.so/zh-hans/brew/tmux/) - Shares pkgdb curated category or tags: cli, productivity.
- [vim](https://pkg.so/zh-hans/brew/vim/) - Shares pkgdb curated category or tags: cli, productivity.
- [himalaya](https://pkg.so/zh-hans/brew/himalaya/) - Shares pkgdb curated category or tags: cli, productivity.
- [taskline](https://pkg.so/zh-hans/brew/taskline/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, command-line, line, node, productivity.
- [todoist-cli](https://pkg.so/zh-hans/brew/todoist-cli/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, command-line, line, node, productivity.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
