Skip to main content

LLM-powered subtitle translation CLI with batch memory and review passes.

Project description

subbake

PyPI version Python versions CI License

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 — reference files with @ and use / commands:

sbake
翻译 @episode01.srt         translate a subtitle file
翻译 @Season01              translate a folder as a series
/model chatgpt              switch model profiles
/session                    switch between agent sessions

No config file? The agent creates your first profile on startup.

For detailed setup and examples, use the project Wiki.

Why SubBake

  • Agent workflow: run sbake, reference @file/@folder, switch profiles with /model or sessions with /session, toggle plan mode with Shift+Tab.
  • Subtitle-safe: preserves ids, timing, cue settings, and line counts.
  • Series support: translate a whole season with shared glossary and translation memory.
  • Runtime repair: malformed model output is logged and repaired automatically.
  • Review pass: high-risk batches receive targeted consistency review.
  • Persistence: cache, run state, glossary, and translation memory live under .subbake.
  • Config profiles: subbake.toml supports multiple provider presets for quick switching.

Agent Boundaries

The agent handles translation, series, profile switching, failure diagnosis, subtitle editing, and project-local file operations (create, append, replace, rename, delete).

It does not expose low-level file tools as direct commands — describe the task naturally and the agent selects the tool. In plan mode (Shift+Tab), mutating actions wait for /approve before execution. The agent is sandboxed to the project root; .git, .venv, .subbake, and __pycache__ are blocked. Destructive 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subbake-0.4.2.tar.gz (120.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subbake-0.4.2-py3-none-any.whl (114.4 kB view details)

Uploaded Python 3

File details

Details for the file subbake-0.4.2.tar.gz.

File metadata

  • Download URL: subbake-0.4.2.tar.gz
  • Upload date:
  • Size: 120.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for subbake-0.4.2.tar.gz
Algorithm Hash digest
SHA256 823c31f000900b803968920bf86672ff86398672520fedaf903bb4dfc8a5440c
MD5 6aacfc542ff1f3e8a6bbe0bc715a3216
BLAKE2b-256 d28377b3ab164844f9bbf3b5b70c48c76b0872bb947f5435714a37618c3c1ed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for subbake-0.4.2.tar.gz:

Publisher: release.yml on heyifan142857/subbake

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file subbake-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: subbake-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 114.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for subbake-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04bc9cdeb0def1a662971f0d67009eab97e14548a77c6ae80479d82a7d11b984
MD5 559ca4c9d7d267d37eb8676117f6b680
BLAKE2b-256 072e7ccda066f7a7f4625be1f248637bfb5e32f93cc3d5d964af04889c5a316e

See more details on using hashes here.

Provenance

The following attestation bundles were made for subbake-0.4.2-py3-none-any.whl:

Publisher: release.yml on heyifan142857/subbake

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page