Turning foreign ebooks into local files via LLM you already pay for
It translates ebooks through whatever LLM you already pay for, caching every block so a crash mid-novel doesn’t double your API bill.

What it does
ebook-GPT-translator ingests txt, epub, docx, pdf, and optional mobi files and outputs translated txt or epub. It wraps multiple LLM backends—OpenAI, Azure, generic compatible APIs, and local CLI tools like Codex, Claude Code, and Gemini CLI—behind a single provider abstraction. A desktop GUI and a proper CLI handle chunking, glossary injection, and long-form context memory so that multi-chapter books keep terminology consistent.
The interesting bit
The v2 rewrite treats API calls as expensive and unreliable: it stores every translated block in an SQLite cache, persists cross-chapter memory to a sidecar JSON file, and can resume an interrupted job without re-translating earlier pages. It also defaults to Codex via your existing ChatGPT subscription, effectively turning a web UI dependency into a local batch worker.
Key highlights
- Supports local CLI providers (Codex, Claude Code, Gemini CLI) alongside standard OpenAI/Azure APIs, plus an offline
mockprovider for smoke testing. - SQLite translation cache and manifest files act as the primary resume mechanism; cross-chapter memory is persisted in
.cache/jobs/*.memory.json. - Configurable chunking, token limits, and rolling context windows aim to keep long novels stylistically consistent.
- Glossary support via CSV or XLSX lets you lock in terminology before the model sees the text.
- Ships with a desktop GUI that tracks live progress and exposes provider login, model selection, and custom style prompts.
Caveats
- Despite broader input support, output is strictly
txtorepub, sodocxandpdfsources get flattened. - MOBI input and XLSX glossary support require optional extra dependencies.
- The legacy
text_translation.pywrapper remains for compatibility, suggesting the codebase is still escaping its single-file origins.
Verdict
Worth a look if you have a backlog of untranslated ebooks and an existing ChatGPT, Claude, or Gemini subscription you’d rather not paste into chapter by chapter. Skip it if you need polished, layout-preserving PDF or DOCX output, or if you’re looking for a fully free offline translation engine.
Frequently asked
- What is jesselau76/ebook-GPT-translator?
- It translates ebooks through whatever LLM you already pay for, caching every block so a crash mid-novel doesn’t double your API bill.
- Is ebook-GPT-translator open source?
- Yes — jesselau76/ebook-GPT-translator is open source, released under the MIT license.
- What language is ebook-GPT-translator written in?
- jesselau76/ebook-GPT-translator is primarily written in Python.
- How popular is ebook-GPT-translator?
- jesselau76/ebook-GPT-translator has 1.7k stars on GitHub.
- Where can I find ebook-GPT-translator?
- jesselau76/ebook-GPT-translator is on GitHub at https://github.com/jesselau76/ebook-GPT-translator.