# translate-shell

> Command-line translator powered by Google Translate, Bing, Yandex, and Apertium translation engines

Stars: 7.5k · Language: AWK · License: Unlicense · Categories: Productivity

- Repository: https://github.com/soimort/translate-shell
- Website: https://www.soimort.org/translate-shell
- Page: https://www.trmn.sh/tools/translate-shell

## Install

- Direct Download: `wget git.io/trans && chmod +x ./trans`
- Git Clone: `git clone https://github.com/soimort/translate-shell && cd translate-shell/ && make && make install`
- Docker: `docker pull soimort/translate-shell`

## Overview

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.

### Installation

```bash
# via Direct Download
wget git.io/trans && chmod +x ./trans
```

```bash
# via Git Clone
git clone https://github.com/soimort/translate-shell && cd translate-shell/ && make && make install
```

```bash
# via Docker
docker pull soimort/translate-shell
```

## Alternatives

- [Himalaya](https://www.trmn.sh/tools/himalaya.md): Rust CLI for managing email across IMAP, SMTP, JMAP, Gmail, Microsoft Graph and Maildir backends, with multi-account TOML config and JSON output. (Rust, 7.6k stars)
- [jrnl](https://www.trmn.sh/tools/jrnl.md): Command-line journal application that creates, searches, and views entries stored as plain text, with optional AES encryption. (Python, 7.4k stars)
- [gopass](https://www.trmn.sh/tools/gopass.md): Command-line password manager compatible with pass, supporting GPG encryption, Git versioning, and team collaboration (Go, 7.3k stars)
- [buku](https://www.trmn.sh/tools/buku.md): Command-line bookmark manager with search, browser import, encryption, and local web UI (Python, 7.2k stars)
- [ncspot](https://www.trmn.sh/tools/ncspot.md): Cross-platform ncurses Spotify client written in Rust on librespot, with Vim keybindings and an IPC socket for remote control. Requires Spotify Premium. (Rust, 6.8k stars)

---

Canonical: https://www.trmn.sh/tools/translate-shell
