macOS
brew install fanyilocal Homebrew formula metadata
安装
brew install fanyilocal Homebrew formula metadata
概览
Chinese and English translate tool in your command-line
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
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.
Config paths the tool may read or write during local use.
~/.config/fanyi/.fanyircCredential-bearing paths to review before unattended agent runs.
~/.config/fanyi/.fanyirc可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
fanyi | cli | 全局可执行文件 | |
fy | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/afc163/fanyi
安装元数据
| 软件包键 | brew:fanyi |
|---|---|
| 版本 | 11.0.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/fanyi |
| 主页 | https://github.com/afc163/fanyi |
| 仓库 | https://github.com/afc163/fanyi |
| 上游文档 | https://github.com/afc163/fanyi#readme |
| 许可证 | MIT |
| 源码归档 | https://registry.npmjs.org/fanyi/-/fanyi-11.0.0.tgz |
| 最后更新 | 2026-06-08T21:46:19+02:00 |
| Pulse | updated |
| 依赖 | node |
| Bottle | 可用 (于 all) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.