An OpenCode V2 terminal and Desktop plugin that shows inline grey prompt continuations you can accept with Tab.
Realmagnum/opencode-translate-selection
An OpenCode plugin that shows an inline translation tooltip when you select text in OpenCode Desktop or the terminal UI.
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit
- 2 days ago
What is it?
opencode-translate-selection is a plugin for OpenCode that translates text as you select it. In OpenCode Desktop, a floating tooltip appears above the Quote toolbar with the translation. In the terminal UI, hotkeys and slash commands open a scrollable translation modal or a persistent side panel.
Translation uses a hybrid routing approach. Short words and phrases go to Google Translate with a MyMemory fallback, while multi-line selections such as bullet lists, numbered steps, and code are sent to the active session's LLM through client.session.generate, so they do not add messages to the chat. If the LLM times out or is busy, requests fall back to the machine translation pipeline, with placeholder tokens protecting code and identifiers.
Users can set target languages, choose an engine mode (Auto, Fast MT only, or Session LLM only), adjust the LLM timeout, and pick color themes and tooltip geometry in the Translation settings page. Selections inside the integrated terminal are not supported because it renders to a canvas.
Key features
- 01Shows a translation tooltip automatically after text selection in OpenCode Desktop.
- 02Routes simple phrases to Google Translate and structured text or code to the session LLM.
- 03Provides hotkeys and slash commands for translating clipboard text and the last assistant message in the TUI.
- 04Offers a scrollable modal and a persistent side panel with keyboard navigation.
- 05Supports configurable target languages, engine modes, and visual themes.
- 06Copies translations to the clipboard on Windows, macOS, and Linux.
Use cases
- Reading English documentation or code explanations in a non-English language while working in OpenCode.
- Translating long assistant replies in the terminal into a side panel for side-by-side reading.
- Quickly checking the meaning of a foreign word or phrase in a chat without leaving the session.
Quick start
- 1
Install the plugin from GitHub with the OpenCode CLI
opencode plugin add github:Realmagnum/opencode-translate-selection - 2
Restart OpenCode Desktop after installation
Things to know
- Requires OpenCode v2.2.0 or newer.
- Desktop and terminal features are documented; the README does not describe other editors or platforms.
In collections
Topics
FAQ
- What is opencode-translate-selection?
- An OpenCode plugin that shows an inline translation tooltip when you select text in OpenCode Desktop or the terminal UI. opencode-translate-selection is a plugin for OpenCode that translates text as you select it. In OpenCode Desktop, a floating tooltip appears above the Quote toolbar with the translation. In the terminal UI, hotkeys and slash commands open a scrollable translation modal or a persistent side panel.
- Is opencode-translate-selection free to use? What license does it have?
- opencode-translate-selection is open source under the MIT license. Check the license terms before using it in commercial products.
- Is opencode-translate-selection still maintained?
- Actively maintained. The last commit to opencode-translate-selection was on Nov 5, 2026.
- What can I use opencode-translate-selection for?
- Reading English documentation or code explanations in a non-English language while working in OpenCode. Translating long assistant replies in the terminal into a side panel for side-by-side reading. Quickly checking the meaning of a foreign word or phrase in a chat without leaving the session.
- How do I install opencode-translate-selection?
- Install the plugin from GitHub with the OpenCode CLI: opencode plugin add github:Realmagnum/opencode-translate-selection Restart OpenCode Desktop after installation
- Where can I get opencode-translate-selection?
- The source code and installation instructions are on GitHub: https://github.com/Realmagnum/opencode-translate-selection
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An OpenCode V2 plugin that defers a prompt for a set delay, then submits it back into the same session.
An OpenCode Desktop plugin that shows your OpenCode Go monthly usage as a badge in the tab bar.
An OpenCode plugin that turns a session's tool calls, shell commands and diffs into a reviewable Markdown handoff brief.
A library for building terminal user interfaces, written in Zig with TypeScript, React and Solid bindings.
A CLI and TUI that searches package registries, GitHub and Hacker News for existing tools matching a plain-English dev tool idea before you build it.