# Install fanyi with Homebrew

Chinese and English translate tool in your command-line. Version 11.0.0 via Homebrew; verified 2026-06-08.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install fanyi
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:fanyi
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/fanyi>
- **Version:** 11.0.0
- **Source summary:** Chinese and English translate tool in your command-line
- **Homepage:** <https://github.com/afc163/fanyi>
- **Repository:** <https://github.com/afc163/fanyi>
- **Upstream docs:** <https://github.com/afc163/fanyi#readme>
- **License:** MIT
- **Source archive:** <https://registry.npmjs.org/fanyi/-/fanyi-11.0.0.tgz>
- **Last updated:** 2026-06-08T21:46:19+02:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- fanyi (cli)
- fy (cli)
- fanyi (alias)
- fy (alias)

## Dependencies

- node

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 11.0.0
- Package-manager updated: 2026-06-08
- Local data: ok
- Upstream repository: https://github.com/afc163/fanyi
- info: No cached GitHub release or tag data was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- 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 Details

- **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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [node](https://www.automicvault.com/pkg/brew/node/) - Runtime dependency declared by Homebrew.
- [gtranslator](https://www.automicvault.com/pkg/brew/gtranslator/) - Shares av.db curated category or tags: cli, productivity, translation.
- [translate-shell](https://www.automicvault.com/pkg/brew/translate-shell/) - Shares av.db curated category or tags: cli, productivity, translation.
- [libchewing](https://www.automicvault.com/pkg/brew/libchewing/) - Shares av.db curated category or tags: chinese, cli, productivity.
- [liblouis](https://www.automicvault.com/pkg/brew/liblouis/) - Shares av.db curated category or tags: cli, productivity, translation.
- [yuque-dl](https://www.automicvault.com/pkg/brew/yuque-dl/) - Shares av.db curated category or tags: cli, nodejs, productivity.
- [a2ps](https://www.automicvault.com/pkg/brew/a2ps/) - Shares av.db curated category or tags: cli, productivity.
- [abook](https://www.automicvault.com/pkg/brew/abook/) - Shares av.db curated category or tags: cli, productivity.
- [acronym](https://www.automicvault.com/pkg/brew/acronym/) - Shares av.db curated category or tags: cli, productivity.
- [taskline](https://www.automicvault.com/pkg/brew/taskline/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, command-line, line, node, productivity.
- [todoist-cli](https://www.automicvault.com/pkg/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/automic-vault/db/blob/main/combined/fanyi.yml)


## Sources

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