trmnl
v1.0.0
Published
Interactive terminal translator powered by DeepL. Type text, get translations, auto-copied to clipboard.
Maintainers
Readme
Why TRmnl?
AI command-line tools (Claude Code, GitHub Copilot CLI, Aider) take exclusive control of your terminal input. This blocks system-level input methods (IME) that non-English speakers rely on for typing Chinese, Japanese, Korean, and other languages.
TRmnl bridges that gap. Type in English (or any language), get instant translations, auto-copied to your clipboard — paste directly into any terminal.
Quick Start
1. Install
npm install -g trmnl2. Get a DeepL API Key
- Go to deepl.com/your-account/keys
- Sign up for the free plan (500,000 characters/month)
- Copy the API key (looks like
459ba905-xxxx-xxxx-xxxx-xxxxxxxxxxxx:fx)
3. Run
trmnlOn first run, you'll be prompted for your API key. It's saved to ~/.config/trmnl/config.json and never asked again.
Usage
$ trmnl
_____ ___ __ __ __ _ _ __
|_ _| _ \ V | \| | | \ \
| | | v / \_/ | | ' | |_ > >___
|_| |_|_\_| |_|_|\__|___| /_/____|
translating to Chinese (simplified)
Tab-complete commands: /lang <code>, /langs, /quit
TRmnl >_ Hello, how are you?
你好,你好吗?
✓ copied to clipboard
TRmnl >_ /lang ja
● Now translating to Japanese (ja)
TRmnl >_ Thank you
ありがとうございます
✓ copied to clipboard
TRmnl >_ /quit
再见 — Bye.REPL Commands
| Command | Description |
|---|---|
| /lang <code> | Switch target language (e.g. /lang ja). Press Tab for autocomplete. |
| /langs | List all 30+ supported target languages |
| /quit or /q | Exit |
CLI Flags
| Flag | Description |
|---|---|
| trmnl --setup | Reconfigure your DeepL API key |
| trmnl --help | Show help message |
Supported Languages
| Code | Language |
|---|---|
| bg | Bulgarian |
| cs | Czech |
| da | Danish |
| de | German |
| el | Greek |
| en-gb | English (British) |
| en-us | English (American) |
| es | Spanish |
| et | Estonian |
| fi | Finnish |
| fr | French |
| hu | Hungarian |
| id | Indonesian |
| it | Italian |
| ja | Japanese |
| ko | Korean |
| lt | Lithuanian |
| lv | Latvian |
| nb | Norwegian (Bokmal) |
| nl | Dutch |
| pl | Polish |
| pt-br | Portuguese (Brazilian) |
| pt-pt | Portuguese (European) |
| ro | Romanian |
| ru | Russian |
| sk | Slovak |
| sl | Slovenian |
| sv | Swedish |
| tr | Turkish |
| uk | Ukrainian |
| zh | Chinese (simplified) |
| zh-hant | Chinese (traditional) |
Shortcuts: en → en-us, pt → pt-br
Configuration
Config is stored at ~/.config/trmnl/config.json with permissions 600 (owner read/write only).
{
"apiKey": "your-deepl-api-key",
"targetLang": "zh"
}To reset your API key:
trmnl --setupTo change default language, use /lang <code> inside the REPL — it saves automatically.
Troubleshooting
"Error: Authorization failure, check auth_key"
Your DeepL API key is invalid or expired. Run trmnl --setup to enter a new key.
"Error: Quota has been exceeded"
You've hit the DeepL free tier limit (500k characters/month). Check your usage at deepl.com/your-account/usage or upgrade to DeepL Pro.
Clipboard not working
Clipboard access depends on your system:
- macOS — works out of the box (
pbcopy) - Linux — install
xcliporxsel:# Debian/Ubuntu sudo apt install xclip # Arch sudo pacman -S xclip - Windows WSL — clipboard may not work in all WSL setups. Translations still display in the terminal — copy manually if needed.
- SSH sessions — clipboard is not available over SSH. Translations are still printed to the terminal.
"command not found: trmnl"
Make sure the npm global bin directory is in your PATH:
# Check where npm installs global binaries
npm config get prefix
# Add to your shell profile (~/.zshrc, ~/.bashrc, etc.)
export PATH="$(npm config get prefix)/bin:$PATH"Tab completion not working
Tab completion works in the default Node.js readline. Some terminal emulators may intercept Tab for their own completion. If /lang + Tab doesn't show suggestions, type /langs instead to see all codes.
Node.js version
TRmnl requires Node.js 14 or later. Check your version:
node --versionHow It Works
TRmnl is a lightweight Node.js REPL that:
- Reads your input line by line
- Sends it to the DeepL API with auto-detected source language
- Prints the translation and copies it to your clipboard
- Remembers your target language between sessions
No background processes, no browser, no electron — just a terminal and an API key.
Uninstall
npm uninstall -g trmnl
rm -rf ~/.config/trmnlLicense
MIT
Contributing
Issues and PRs welcome at github.com/vauugnn/TRmnl.
