Command-line translation with multiple engines — fast CLI output, optional REST service, and pluggable backends.
Open Source — GPL-3.0 Full documentation
goTrans is a Go implementation inspired by translate-shell, but with more features with simple one binary for the terminal, an optional HTTP API, and swappable engines — without shipping a full browser stack.
Large inputs are split into ordered chunks so provider limits are less likely to break long documents. Output can be brief, verbose, or plain text only.
Terminal-first workflows still deserve solid translation tools: predictable flags, --text for automation, and a small HTTP surface when you need to integrate with other services.
Google (default), Bing, Yandex, Apertium, automatic selection, and a mock engine for tests.
Run one-off translations in the terminal or start the REST API with an INI configuration file.
--text, stdin, -i / -o files, and :fr / -t language shortcuts for scripts.
Long input is split into ordered chunks so provider limits are less likely to break long documents.
gotrans "Hello, world!"
gotrans :fr "Hello"
gotrans -e bing -t es "Good morning"
echo "pipe me" | gotrans --text -t de
gotrans -i document.txt -t fr
gotrans --text -i in.txt -o out.txt -t degotrans --service --init=service-scripts/gotrans.iniThe sample config often binds to localhost:8100. Adjust host, port, engine, and languages in your INI file.
With the service running, typical entrypoints include health, engines list, languages list, and translate.
GET /api/v1/health · POST /api/v1/translateGET /api/v1/engines · GET /api/v1/languages
curl -fsS http://127.0.0.1:8100/api/v1/healthcurl -sS http://127.0.0.1:8100/api/v1/translate \
-H 'content-type: application/json' \
-d '{"text":"Hello, World!","source_lang":"auto","target_lang":"es","engine":"google"}'Prebuilt binaries (zip) for each platform.