| title | DeepL CLI |
|---|---|
| description | Install and use the DeepL CLI to translate text, documents, and more from your terminal. |
| public | true |
This page shows you:
- How to install the DeepL CLI from source
- How to authenticate and run your first translation
- What commands are available for translation, writing, voice, and more
The DeepL CLI is an open-source (MIT license) command-line tool for interacting with the DeepL API. It covers text translation, document translation, writing enhancement, voice translation, glossary management, and admin operations — all from your terminal.
The CLI requires [Node.js](https://nodejs.org/) (v18+) and build tools for native compilation: - **macOS**: Xcode Command Line Tools (`xcode-select --install`) - **Linux**: `python3`, `make`, `gcc` (`apt install python3 make gcc g++`) - **Windows**: Visual Studio Build Toolsgit clone https://github.com/DeepLcom/deepl-cli.git
cd deepl-cli
npm install
npm run build
npm link
deepl --versionUse the interactive setup wizard:
deepl initOr set your API key directly:
deepl auth set-key YOUR_API_KEYOr use an environment variable:
export DEEPL_API_KEY=YOUR_API_KEYdeepl translate "Hello, world!" --to es
# ¡Hola, mundo!deepl write "Their going to the stor tommorow" --lang en-us
# They're going to the store tomorrow.| Command | Description |
|---|---|
deepl translate |
Translate text with support for formality, context, and custom instructions |
deepl translate --file |
Translate text files while preserving code blocks and formatting |
deepl document |
Translate documents (PDF, DOCX, PPTX, XLSX) with format preservation |
deepl write |
Enhance grammar and style via DeepL Write |
deepl voice |
Stream real-time speech translation via WebSocket |
deepl watch |
Monitor files and auto-translate on change |
deepl glossary |
Create, list, and manage glossaries |
deepl admin |
Manage API keys, usage limits, and team access |
deepl usage |
Check API usage and character quotas |
deepl config |
Configure defaults (target language, formality, model) |
deepl translate "Thank you for your patience" --to de --formality more \
--context "Customer support email to a long-standing client"deepl document translate report.pdf --to fr --output report-fr.pdfdeepl translate --file src/locales/en/ --to de,fr,es --output src/locales/deepl watch ./content/en --to de,fr --output ./content/Automatically translate changed files before each commit:
deepl hooks install --pre-commit --languages de,fr- Local SQLite cache with LRU eviction avoids redundant API calls
- Monitor billed characters for budget planning with
deepl usage - Use
--quietand--no-inputflags for CI/CD pipelines - Generate shell completions for bash, zsh, fish, and PowerShell
- DeepL CLI on GitHub — full documentation, changelog, and source code
- DeepL API authentication — set up your API key
- Client libraries — official SDKs for six languages