# gtt puts translation in a terminal window, with Google as the default and eight other backends behind a config file

> gtt is a Go terminal UI for translation that started as a Google Translate TUI and now routes through Apertium, Bing, DeepL, DeepLX, LibreTranslate, and Reverso as well. The interesting parts are the ones a screenshot hides: keys and colours are reconfigured by name in YAML, self-hosted backends need a host address, and DeepL is limited to the free API.

**eeeXun/gtt** — Google Translate TUI (Originally). Currently supports Apertium, Bing, ChatGPT, DeepL, DeepLX, Google, LibreTranslate, Reverso.

- Repository: https://github.com/eeeXun/gtt
- Stars: 306 · Forks: 14
- Language: Go
- License: MIT
- Published: 2026-09-14 · Updated: 2026-09-14 · Language: en
- Canonical page: https://hysenlabs.com/projects/eeexun-gtt

## The repository description names ChatGPT but the translator list does not

The project summary says it started as a Google Translate TUI and now supports Apertium, Bing, ChatGPT, DeepL, DeepLX, Google, LibreTranslate, and Reverso. The translator list further down the page names the same services with one exception: ChatGPT is not among them. Google is marked as the default, which matters because it is the only backend that works with no configuration at all.

The rest are not equal in what they require. Apertium is a rule based translation platform, Bing and Reverso are consumer facing web services, DeepL needs an API key and only the free API is supported, DeepLX is the self hosted DeepL compatible server, and Libre can be either the official hosted service with a key or your own instance with an address. That last split is the reason one provider name can mean two quite different deployments, and it is where configuration mistakes hide.

Release history reinforces that this is a slow moving, deliberately stable tool. Versions v10, v11, and v12 exist, with v11 in January 2026 and v12 on 2026-09-25, and the default branch is master rather than main. The last push to that branch was 2026-09-25.

## DeepL runs against the free API only, and its key can live in a separate file

DeepL is the one backend that cannot work without credentials. A key is obtained from the DeepL API signup page and added to the server configuration, and the page states plainly that only the free API is supported for DeepL currently. That limitation is not hidden: a user expecting the paid DeepL offering will find the request path is the free one.

The key has two forms. The obvious one is an inline value:

```yaml
api_key:
  deepl:
    value: DEEPL_API_KEY # <- Replace with your API Key
    # file: $HOME/secrets/deepl.txt # <- You can also specify the file where to read API Key
```

The commented second line is the one worth knowing about. Pointing `file` at a path keeps the secret out of the config itself, which is the difference between a config you can paste into an issue and one you cannot. The same shape works for the Libre and DeepLX keys, with the commented line naming a different path for each.

That file is `server.yaml`, and it lives at `$XDG_CONFIG_HOME/gtt/server.yaml` or `$HOME/.config/gtt/server.yaml`. An example version ships in the repository, so the shape can be copied rather than written from memory.

## Self hosted DeepLX and Libre need a host address, not just a key

DeepLX is a self hosted server, and using it means telling gtt where it is. The API key is optional there, depending on how your instance is configured, so the mandatory part of the block is the host:

```yaml
api_key:
  deeplx:
    value: DEEPLX_API_KEY # <- Replace with your TOKEN
    # file: $HOME/secrets/deeplx.txt # <- You can also specify the file where to read API Key
host:
  deepl: 127.0.0.1:1188 # <- Replace with your server IP address and port
```

Note that the sample pairs the `deeplx` key section with a `deepl` host section, which is a small trap: the host key is spelled `deepl` even though the service is DeepLX. The default port in the example is 1188.

LibreTranslate follows the same pattern with a different default port. Use the official service with a key from their portal, or run it yourself and give the address, with 5000 shown as the example port. Both configurations go into the same `server.yaml`, so a machine using several backends keeps all its endpoints in one file rather than scattered across environment variables.

## Clipboard and audio support both come down to which display server you run

Text to speech means an audio dependency, and the package names differ per distribution: `alsa-lib` on Arch Linux, `libasound2-dev` on Ubuntu or Debian, and `alsa-lib-devel` on Red Hat based distributions. Playback is bound to the source window, the destination window, or stopped, all from the key map.

Copying is more fragmented, with three separate routes. On Linux with X11 you can install `xclip`, on Linux with Wayland you can install `wl-clipboard`, and if your terminal supports OSC 52 you can enable OSC 52 on page 2 of the pop out menu instead and need neither. That third route is the one that keeps working over SSH, where no local clipboard helper exists.

The consequence for a new user is that a missing copy binding is usually a missing package rather than a broken key. The audio bindings fail for the same reason, which is why the distribution specific ALSA packages are listed as hard requirements while the clipboard helpers are marked optional.

## Six install routes, each with a different cost

Arch Linux users get a binary package from the AUR:

```sh
yay -S gtt-bin
```

Nix users can run it without installing, either through nixpkgs unstable:

```sh
nix-shell -p '(import <nixpkgs-unstable> {}).gtt' --run gtt
```

or through the flake path:

```sh
nix run github:nixos/nixpkgs#gtt
```

Prebuilt binaries are on the release page for Linux and macOS. From source there are two Go routes, an install and a clone plus build:

```sh
go install -ldflags="-s -w" github.com/eeeXun/gtt@latest
export PATH=$PATH:$HOME/go/bin
```

```sh
git clone https://github.com/eeeXun/gtt.git && cd gtt && go build -ldflags="-s -w -X main.version=$(git describe --tags)"
```

The second form stamps the version into the binary through `main.version`, which is what makes a locally built copy report something useful. Docker is the last option, with an image published as `eeexun/gtt`.

## Every action is a named key you can rebind in keymap.yaml

The key map is not a set of hardcoded chords. Each action has a name that can be overwritten in `keymap.yaml`, located at `$XDG_CONFIG_HOME/gtt/keymap.yaml` or `$HOME/.config/gtt/keymap.yaml`: `exit`, `translate`, `swap_language`, `clear`, `copy_selected`, `copy_source`, `copy_destination`, `tts_source`, `tts_destination`, `stop_tts`, `toggle_transparent`, and `toggle_below`.

The notation is explicit about what can be combined. A key combined with Ctrl can be written `C-Space`, `C-\`, `C-]`, `C-^`, `C-_`, or anything from `C-a` to `C-z`. With Alt it is `A-Space` or `A-` followed by any character, and function keys run from `F1` to `F64`.

The defaults cover translation, language swapping, clearing the source window, copying selected text or the whole source or destination window, text to speech in either direction, a transparency toggle, and a toggle for the definition, example, and part of speech panel. Navigation uses `<Esc>` for the pop out menu, `<Tab>` and `<S-Tab>` to cycle through the pop out widget, and `<1>`, `<2>`, `<3>` to switch pop out menu pages, which is also where OSC 52 is turned on.

## A theme must declare ten colours, and four of them are never explained

Themes are defined by name and must supply every colour the interface uses. The required set is `bg`, `fg`, `gray`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, and `orange`, and the file is `theme.yaml` at `$XDG_CONFIG_HOME/gtt/theme.yaml` or `$HOME/.config/gtt/theme.yaml`.

Only part of that set is described. `bg` is the background colour, `fg` is the foreground colour, `gray` is the selected colour, `yellow` is the label colour, `orange` is the key map menu colour, and `purple` is the button pressed colour. What `red`, `green`, `blue`, and `cyan` are used for is not stated anywhere in the documentation, so a theme author has to supply four values whose meaning has to be guessed.

Because the list is mandatory rather than optional, copying the shipped example is the practical route to a valid theme, since a missing colour is a different failure from an ugly one. The example files, `keymap.yaml`, `server.yaml`, and `theme.yaml`, all live together in the `example` directory of the repository.

## Language names are passed as arguments, and each backend has its own list

Source and destination languages can be set on the command line, which is how you start gtt in a specific pair without touching the interface:

```sh
gtt -src "English" -dst "Chinese (Traditional)"
```

The names are provider specific and the project sends you to the provider to check them: Apertium for Apertium, the Bing language support page for Bing, the DeepL API docs for DeepL, the Google language support page for Google, the LibreTranslate languages page for Libre, and Reverso for Reverso. DeepLX uses the same language set as DeepL.

The implementation is Go 1.25 with tview and tcell for the terminal interface, Viper for configuration, and oto and go-mp3 for audio playback and MP3 decoding. Configuration is read from YAML files under the XDG config directory, and the project credits translate-shell and other translation tools as prior art, which is a fair description of what this program is: a terminal front end over services that were built for something else.

## Conclusion

gtt suits someone who lives in a terminal and wants translation with keyboard shortcuts, text to speech, and a pop out definition panel rather than a browser tab, and it suits self hosting because the LibreTranslate and DeepLX paths only need a host and port. It does not suit anyone who needs DeepL on a paid plan, or who expects the eight advertised backends to behave identically, since each provider publishes its own language list and only the free DeepL API is wired up. Before adopting it, read your provider's language support page rather than the tool's own list, decide how you will handle the clipboard on your display server, and remember that a keybinding or theme change is a YAML edit rather than an in-app preference.

## FAQ

### Which translation services can gtt use?

Apertium, Bing, DeepL, DeepLX, Google, LibreTranslate, and Reverso are listed in the translator section, with Google as the default. The repository description also names ChatGPT, which the translator list does not repeat.

### Does gtt work with the paid DeepL API?

No. DeepL translations require an API key, and only the free API is supported currently. The key goes into server.yaml under api_key.deepl, either as an inline value or as a file path pointing at a secret on disk.

### How do I point gtt at my own LibreTranslate server?

Add the address and port under the host section in server.yaml, for example host.libre set to 127.0.0.1:5000, and add the key only if your instance requires one. The file lives at $XDG_CONFIG_HOME/gtt/server.yaml or $HOME/.config/gtt/server.yaml.

### Which keys can I change in gtt?

Twelve actions are rebindable by name in keymap.yaml, including exit, translate, swap_language, clear, copy_selected, copy_source, copy_destination, the three text to speech actions, toggle_transparent, and toggle_below. Ctrl combinations accept C-Space, C-\, C-], C-^, C-_, or C-a to C-z, Alt takes A-Space or A- with a character, and F1 to F64 are accepted.

### How do I install gtt without a package manager?

Use go install with -ldflags="-s -w", then export PATH=$PATH:$HOME/go/bin, or clone the repository and run go build with the same flags plus a version stamp from git describe --tags. Prebuilt binaries for Linux and macOS are also attached to the release page, and a Docker image is published as eeexun/gtt.

## Sources

- [eeeXun/gtt on GitHub](https://github.com/eeeXun/gtt)
- [Issues](https://github.com/eeeXun/gtt/issues)
- [License: MIT](https://github.com/eeeXun/gtt/blob/master/LICENSE)
- [README](https://github.com/eeeXun/gtt/blob/master/README.md)
- [Releases](https://github.com/eeeXun/gtt/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/eeexun-gtt
