CLI tool for quick Chinese/English translation
Top 28.0% on sourcepulse
Fānyì (翻译) is a command-line translation tool designed for quick Chinese-English translations. It targets developers and power users who frequently work with both languages and prefer terminal-based workflows. The tool leverages DeepSeek AI and Iciba for translation, offering improved speed and accuracy over previous versions.
How It Works
The tool utilizes a dual-backend approach, integrating with DeepSeek AI for advanced large language model-based translations and Iciba for more traditional dictionary-style lookups. This combination aims to provide both nuanced, context-aware translations and quick, accurate definitions. The project has undergone significant refactoring, removing less reliable or slower translation sources and dependencies like say
commands, simplifying its architecture and improving performance.
Quick Start & Requirements
npm i fanyi -g
or bun i fanyi -g
fanyi config set <key> <value>
, with options for disabling backends (iciba
, deepseek
), color output, and setting LLM_API_KEY
.Highlighted Details
list
command for viewing translation history.Maintenance & Community
The project is actively maintained, with recent updates focusing on refactoring and improving translation sources. GitHub Actions are used for testing and code coverage.
Licensing & Compatibility
The project appears to be licensed under the MIT license, allowing for commercial use and integration with closed-source projects.
Limitations & Caveats
The tool has removed support for OpenAI and Youdao translation sources, as well as word pronunciation features, to simplify installation and improve compatibility, particularly on Linux.
5 days ago
1 day