LLM-powered subtitle translation CLI with batch memory and review passes.
Project description
subbake
subbake is an agent-first subtitle translation CLI.
It translates .srt, .vtt, and line-based .txt subtitles with LLMs, while preserving subtitle structure and keeping long-running translation work recoverable through cache, translation memory, glossary, and resume state.
The main entrypoint is the interactive agent:
sbake
Inside the agent, you can point at files or folders, switch model profiles, resume sessions, inspect SubBake failure logs, make constrained edits to generated translated subtitles, and perform simple project-local file operations.
Typing / opens the command picker; keep typing to filter, then use Tab to complete or Up/Down and Enter to choose. Shift+Tab toggles plan mode, where mutating actions are proposed for approval before execution. /session, /model, and /profile open compact inline pickers for previous sessions and model profiles, with an inline new profile wizard available when creating a profile interactively.
If no config file is found, the interactive agent can create the first model profile for you.
@episode01.srt
@Season01
/model
/session
分析 @.subbake/runs/.../failures/translate_batch_0001.json
把 @episode01.translated.srt 里的角色名统一一下
创建 @notes.txt 记录后续需要检查的术语
把 @notes.txt 改名成 @translation-notes.txt
For detailed setup, provider configuration, examples, and workflow guidance, use the project Wiki.
Why SubBake
- Agent workflow: run
sbake, reference@fileor@folder, switch profiles with/model, switch sessions with/session, and toggle plan mode withShift+Tab. - Subtitle-safe translation: preserves ids, order, timing, cue settings, and line counts.
- Series support: translate a whole season folder with shared glossary and translation memory.
- Runtime repair: malformed model output can be logged, diagnosed, and automatically repaired during translation.
- Review pass: high-risk batches can receive targeted consistency review.
- Practical persistence: cache, run state, failure samples, glossary, and translation memory live under
.subbake. - Config profiles:
subbake.tomlsupports multiple provider/model setups for quick switching.
Agent Boundaries
The agent can translate subtitle files, translate folders as a series, switch configured profiles, diagnose SubBake failure logs, edit generated translated subtitles, and perform simple project-local file work such as creating, appending, replacing text, renaming, and deleting files.
It does not expose low-level file tools as user commands; describe the task naturally and the agent decides which internal tool to use. In plan mode, mutating tool calls are held until /approve and can be discarded with /reject. It also does not operate outside the current project root. File edits and deletes are limited to project-local text files; protected runtime or repository paths such as .git, .venv, and .subbake are blocked. Mutating file operations create backups under .subbake/agent/backups.
Install
pip install subbake
Then configure a provider profile. See the configuration example and the Wiki.
CLI Modes
Interactive agent:
sbake
sbake resume
Classic single-file command:
sbake translate input.srt --profile chatgpt
Series command:
sbake series ./Season01 --profile chatgpt
Credential and cleanup utilities:
sbake check-key --profile chatgpt
sbake clean .
Documentation
The Wiki is the primary user guide:
Command help is also available from the CLI:
sbake --help
sbake translate --help
sbake series --help
sbake check-key --help
sbake clean --help
Project details
Release history Release notifications | RSS feed
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 subbake-0.4.1.tar.gz.
File metadata
- Download URL: subbake-0.4.1.tar.gz
- Upload date:
- Size: 104.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a72189f2c2ee4d6dabb02632ef1ec4ad228a87022402ccaba4f081f45c2ef59c
|
|
| MD5 |
7b06dae50c66b38a0f2b12fb5b8d008f
|
|
| BLAKE2b-256 |
bf84fc4d10ad1fe1d88b2fca977fcaeeab0c4e23fc683bb7ce0f7116f03da98f
|
Provenance
The following attestation bundles were made for subbake-0.4.1.tar.gz:
Publisher:
release.yml on heyifan142857/subbake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subbake-0.4.1.tar.gz -
Subject digest:
a72189f2c2ee4d6dabb02632ef1ec4ad228a87022402ccaba4f081f45c2ef59c - Sigstore transparency entry: 1710600346
- Sigstore integration time:
-
Permalink:
heyifan142857/subbake@9e45c6f4032336c4e33d38b4a31ff8cbfb7dc639 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/heyifan142857
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e45c6f4032336c4e33d38b4a31ff8cbfb7dc639 -
Trigger Event:
push
-
Statement type:
File details
Details for the file subbake-0.4.1-py3-none-any.whl.
File metadata
- Download URL: subbake-0.4.1-py3-none-any.whl
- Upload date:
- Size: 92.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37b58c76c6780dd5f05eebbbdb75209c069deb4684e88764927bf09dfbca1db4
|
|
| MD5 |
465ed30701d24dd51218c36835e14d7e
|
|
| BLAKE2b-256 |
729d532a5a90e59c476611d4f941de4b733ade28c62bcb64027092590d6887f9
|
Provenance
The following attestation bundles were made for subbake-0.4.1-py3-none-any.whl:
Publisher:
release.yml on heyifan142857/subbake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subbake-0.4.1-py3-none-any.whl -
Subject digest:
37b58c76c6780dd5f05eebbbdb75209c069deb4684e88764927bf09dfbca1db4 - Sigstore transparency entry: 1710600381
- Sigstore integration time:
-
Permalink:
heyifan142857/subbake@9e45c6f4032336c4e33d38b4a31ff8cbfb7dc639 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/heyifan142857
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e45c6f4032336c4e33d38b4a31ff8cbfb7dc639 -
Trigger Event:
push
-
Statement type: