Translate-on-Tab — Liu Terminal

Liu Terminal Translate-on-Tab. Translate prompt line input in real-time before sending it to the coding agent to save tokens.

Translate non-English prompt text to English (or another target) on your machine before it is sent to a coding agent — shrinking tokens and improving agent accuracy.

How to trigger

While typing in a prompt that Liu associates with a supported agent, press Ctrl and Cmd together twice on macOS, or Ctrl and Super together twice on Linux, within translate_tab_window_sec (default 0.4 seconds). Liu translates the current prompt line and replaces it before you submit.

Keypress: Double-tap Ctrl+Cmd on macOS or Ctrl+Super on Linux (not Tab alone). Toggle or reconfigure from Cmd+K → Toggle Translate, Translate: Cycle Target Language, Translate: Cycle Backend, or Settings: Translate.

Backends

translate_backend is an integer enum (src/translate/translate.h):

  • 0 — Agent — Spawn a one-shot CLI agent (claude / codex / opencode / grok) to translate via a fixed prompt template.
  • 1 — Local LLM — Default. Metal-accelerated local GGUF model when USE_LOCAL_LLM is built in; fully offline.
  • 2 — API — Cloud providers: anthropic, openai, openrouter, or custom OpenAI-compatible base URL. Empty api_key falls back to ANTHROPIC_API_KEY / OPENAI_API_KEY / etc.

Active agents

Translation only runs in prompts associated with selected agents. Defaults enable Claude, Codex, OpenCode, Grok, Antigravity, Cline, and Command Code (all translate_active_in_* flags are true). Configure in Settings → Translate or config.json.

Configuration keys

In ~/.config/Liu/config.json (defaults from translate_config_default):

{
  "translate_enabled": true,
  "translate_backend": 1,
  "translate_source_lang": "Turkish",
  "translate_target_lang": "English",
  "translate_tab_window_sec": 0.4,
  "translate_active_in_claude": true,
  "translate_active_in_codex": true,
  "translate_active_in_opencode": true,
  "translate_active_in_grok": true,
  "translate_active_in_antigravity": true,
  "translate_active_in_cline": true,
  "translate_active_in_commandcode": true
}

A visual spinner shows while translation is in progress. Local model download/path management is available from Settings when the local backend is selected.

Next Configuration →

Documentation

Getting started

Guides

Reference

Other languages

Türkçe · 简体中文 · 한국어 · Español · Deutsch · Italiano · Français · 日本語 · العربية