Command-line translator powered by Google Translate, Bing, Yandex, and Apertium translation engines
Translate Shell is a command-line translator that provides terminal access to multiple translation engines including Google Translate (default), Bing Translator, Yandex.Translate, and Apertium. The tool can translate text between languages with automatic source language detection, display detailed explanations or brief translations, and operate in an interactive shell mode for continuous translation sessions.
The tool supports advanced features including dictionary mode for word definitions, language identification, text-to-speech functionality, and proper handling of Right-to-Left scripts like Arabic and Hebrew through GNU FriBidi integration. It can process input from command arguments, standard input, or files, with output options including terminal paging and various formatting modes. The interactive shell mode allows users to translate text line by line without repeatedly invoking the command.
Translate Shell runs on POSIX-compliant systems including GNU/Linux, macOS, BSD variants, Android (via Termux), and Windows (via WSL, Cygwin, or MSYS2). It requires GNU Awk 4.0+ and either Bash or Zsh, with optional dependencies for enhanced functionality like curl for network requests, media players for text-to-speech, and spell checkers. The tool is distributed as a single self-contained executable script written in AWK.
# via Direct Download
wget git.io/trans && chmod +x ./trans
# via Git Clone
git clone https://github.com/soimort/translate-shell && cd translate-shell/ && make && make install
# via Docker
docker pull soimort/translate-shell