ContextWeave: context-aware document translation with glossary management
Project description
English | 中文
ContextWeave
Context-aware document translation / 语境感知文档翻译
ContextWeave (语络译) is a fully automatic desktop translation app for long novels, books, PDFs, scanned documents, manga, and subtitles. It aims to preserve source formatting while keeping terminology and translation style consistent across the whole work.
Advanced documentation covers glossary memory, previous-context injection, format preservation, CLI automation, and advanced use cases.
Who ContextWeave Is For
- Novel, web novel, and light novel translation
- Long books and documents that need consistent naming and terminology
- Scanned books, PDFs, and manga that need OCR before translation
- People who want a desktop workflow instead of managing prompts by hand
Why ContextWeave
- Builds a glossary from your source material
- Carries context forward across chapters and pages, with useful summaries injected alongside glossary context
- Preserves original formatting for text-native files
- Handles text, EPUB, PDF, scanned pages, manga, and subtitles in one app
Install
Current desktop builds are unsigned, so the first launch may show an OS security warning.
macOS
- Download the latest
.dmg - Open it and drag
ContextWeave.appintoApplications - Launch
ContextWeave.appfromApplications - If macOS blocks it because the developer cannot be verified, go to
System Settings->Privacy & Security - In the
Securitysection, clickOpen AnywayforContextWeave.app, then confirmOpen
Windows
- Download the latest
.zip - Unzip it anywhere
- Run
ContextWeave.exe - If Windows SmartScreen warns that the app is unrecognized, click
More info->Run anyway
Setup
1. Open the projects screen and click Setup Wizard
This is the home screen for projects. Use Setup Wizard for the quickest first-time setup.
2. Choose providers and paste API keys
The wizard collects the providers it needs up front. For most users, DeepSeek + Gemini is the most practical starting point.
3. Review the workflow profile
The review step shows which connection and model ContextWeave will use for each workflow step.
Quality spends more for better reasoning and can get very, very expensive unless you are using only DeepSeek. Balanced is the safest default. Budget is the cheapest option when you want to minimize cost.
Translation
1. Create a project
Pick a project name, target language, and workflow profile.
2. Open the project work page
Import files in reading order so terminology and context stay consistent across the whole book, then click Translate and Export to start. Double-click a file if you want to inspect each step manually or retouch images.
3. Optional: import existing term translations
Open Terms, then use Import Terms if you already have a terminology list you want ContextWeave to reuse. A simple JSON object like {"original": "translated"} is enough.
Demo EPUBs
This sample EPUB was generated with Translate and Export directly from the French Project Gutenberg EPUB for The Count of Monte Cristo, Tome I, using DeepSeek.
Quality can be dramatically better with Gemini or GPT, but the cost is also significantly higher.
- The Count of Monte Cristo.epub - English output. Cost: under
$2.5.
CLI
ContextWeave also includes a small CLI for config-driven one-shot translation and basic book management. From a source checkout, use uv run contextweave-cli; from an installed package, use contextweave-cli.
contextweave-cli config path
contextweave-cli config init
contextweave-cli config validate
contextweave-cli run ./book.epub --output ./translated/book.epub
contextweave-cli run ./chapter.txt --output ./translated/chapter.txt --json
contextweave-cli run ./episode.srt --output ./translated/episode.srt --no-polish
contextweave-cli books list
contextweave-cli books show BOOK_ID
contextweave-cli books delete BOOK_ID --yes
The CLI resolves config from --config, then CONTEXTWEAVE_CONFIG, then the nearest contextweave.yaml/.contextweave.yaml walking upward, then the platform default shown by contextweave-cli config path. The config mirrors the setup UI: connections define provider endpoints and workflow_profiles route each translation step. Prefer api_key_env so API keys stay in environment variables instead of config files or task snapshots. Use --no-polish when a one-shot run should skip the polish pass, which can be useful for timing-sensitive subtitle output.
A commented starting point is available at docs/examples/contextweave-cli.yaml.
What To Know Before Using ContextWeave
- The setup wizard path is mainly tested with
DeepSeek+Gemini.ClaudeandGPTshould also work well, but I do not recommend going belowDeepSeek-class models. - Image editing is expensive, and hallucinations are still common. For image reembedding,
GPT Image 2is recommended when available. - OCR does not preserve original layout for PDFs and scanned books. It rebuilds from content instead. Manga is the exception.
- Import in reading order if you want the glossary and context to build correctly.
- Samples are still limited because testing across formats is expensive. Bug reports are very welcome.
Supported Formats
| Type | Import | Export | OCR needed before translation? |
|---|---|---|---|
| Text | .txt, .md |
txt |
No |
.pdf |
epub, md |
Yes | |
| Scanned book | image files or folders | epub, md |
Yes |
| Manga | .cbz, image folders |
cbz |
Yes |
| EPUB | .epub |
epub, md, docx, html |
No, but image OCR is supported |
| Subtitle | .srt, .vtt, .ass, .ssa |
srt, vtt, ass, ssa |
No |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextweave-0.2.1.tar.gz.
File metadata
- Download URL: contextweave-0.2.1.tar.gz
- Upload date:
- Size: 9.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f59f814883772a741e0e24513047ec6b720300bb6a3e4d7280183d9b6de1b27
|
|
| MD5 |
dd99895fa09a8c6ef464a773ac9bba76
|
|
| BLAKE2b-256 |
845423df1c4388419c82cc4330d3dcbdcaf9f544613f8848d73f23a4e97c0c49
|
File details
Details for the file contextweave-0.2.1-py3-none-any.whl.
File metadata
- Download URL: contextweave-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e191da425d5dcf4dbcc6260cf84af63ce5239605f5f70115538dba72d81c13b3
|
|
| MD5 |
85a9d8f3f3350c1dffe360e7b7ba0557
|
|
| BLAKE2b-256 |
c8b209459b9496cefc03e8be442062a94629e8b829aa13a8792bebb8203bf5ee
|