Expand description
§tl - Streaming Translation CLI
tl is a command-line tool for translating text using OpenAI-compatible API endpoints.
It supports streaming output, caching, and multiple provider configurations.
§Features
- Streaming translations: See translations as they arrive
- Caching: Avoid redundant API calls with SQLite-based caching
- Multiple providers: Configure and switch between different API providers
- Interactive mode: Chat-style translation sessions with
tl chat
§Quick Start
# Translate a file
tl ./notes.md
# Translate from stdin
cat report.md | tl
# Override target language
tl --to ja ./notes.md
# Interactive chat mode
tl chat§Configuration
Settings are stored in ~/.config/tl/config.toml:
[tl]
provider = "ollama"
model = "gemma3:12b"
to = "ja"
[providers.ollama]
endpoint = "http://localhost:11434"
models = ["gemma3:12b", "llama3.2"]Modules§
- cache
- Translation cache management using
SQLite. - chat
- Interactive chat mode for translation sessions. Interactive chat mode for translation sessions.
- cli
- Command-line interface definitions and handlers. Command-line interface definitions and handlers.
- config
- Configuration file management and provider settings.
- input
- Input reading from files and stdin.
- translation
- Translation client for OpenAI-compatible APIs.
- ui
- Terminal UI components (spinner, colors).