A command-line tool to translate large documents using language models. It preserves the file formatting and simplifies migrating documentation to other languages.
- Overview
- Key Features
- Installation
- Quick Start
- CLI Reference
- Development
- Environment Variables
- License
doculingo helps you translate documents while preserving their formatting. It currently works with Word files and aims to support additional formats in the future, making it ideal for projects that require multiple language versions without losing the original layout.
- ✨ Automatic Translation — uses OpenAI to safely translate paragraphs.
- 📝 Preserves Styles — copies fonts, colors, and alignment to the translated version.
- 📄 Document Support — currently handles large
.docxfiles with more formats planned. - 🔁 Automatic Retries — retries when the API fails.
- ⚙️ Simple CLI — clear commands with built-in help.
Run instantly with uv without installing:
uvx doculingo --helpOr install from PyPI:
pip install doculingoTranslate a Word document from Spanish to English:
doculingo word \
--input file.docx \
--output translated.docx \
--language-source spanish \
--language-target englishGet the full list of options with:
doculingo --helpThe main subcommand is word, designed for .docx files.
Install the dependencies and run the tool locally:
uv lock
uv sync --all-groups --all-extras
uv run doculingo --helpCopy .env.example to .env and set OPENAI_API_KEY with your OpenAI key.
Distributed under the MIT license. See the license file.