Translate TXT
by @litousteven
Translate text files using OpenAI-compatible APIs (e.g. SiliconFlow, DeepSeek, OpenAI). Use when the user wants to: translate a txt file, translate text to C...
The script reads config from the .env file in the skill root directory, falling back to environment variables.
| Variable | Default | Description |
|---|---|---|
| TRANSLATE_API_KEY | (none, required) | API key for the translation service |
| TRANSLATE_BASE_URL | https://api.siliconflow.cn/v1 | Base URL for OpenAI-compatible API |
| TRANSLATE_MODEL | Qwen/Qwen2.5-7B-Instruct | Model name to use |
| TRANSLATE_THINKING | auto | Thinking mode: auto/disabled (recommended) or enabled |
| TRANSLATE_MAX_TOKENS | 4096 | Max output tokens per chunk |
| TRANSLATE_TEMPERATURE | 1 | Model temperature |
| TRANSLATE_TIMEOUT | 300 | API request timeout in seconds |
Priority: environment variables > .env file > defaults.
--concurrency 1 to disable parallel translation if the API has strict rate limitsclawhub install smart-translate-txt