Skip to main content

LLM-Conductor

CLI pipeline for localizing nested JSON string resources with language models (Ollama or any OpenAI-compatible API). Optional second stage proofreads with a separate endpoint.

This is not a local machine-translation product, offline dictionary, or GUI translator. There is no built-in MT engine — you supply the model and the prompts; quality follows them. Think “batch orchestration for LLM localization,” not “install and translate offline.”

Language pair = prompt only. The engine does not hard-code source or target languages. Name them in llm.toml. The default init profile is one working example (often English→another language), not a product limit.

Features

  • Recursive JSON of any depth; non-strings left untouched
  • Per-string isolation (no batching unrelated keys into one prompt)
  • Key-name linguistic hints (_male / _female / _plural / …)
  • Glossary injection, formatting-tag masking, disk cache + in-run dedup
  • Reply validation, consecutive-failure breaker, OS locks, progress heartbeat
  • Independent transports for translation vs verification

Quick start

1. Install or grab a binary

pip install -e ".[dev]"          # from a clone
# or download llm-conductor.exe from GitHub Releases (when published)

PyPI upload is prepared (packaging metadata is in place) but may not be live yet — prefer a Release .exe, pip install from a clone, or pip install git+https://github.com/Necrofox/llm-conductor.git once the repo is public.

2. Configs next to the program

llm-conductor init               # conductor.toml + llm.toml
# portable checkout:
python llm-conductor.py init

Configs resolve beside the entry point (exe / wrapper / installed shim), not cwd. Edit llm.toml for your endpoint and prompts; set [validation].allowed_scripts for the target writing system (e.g. ["cyrillic"], ["latin"], ["cjk"]). Prefer key_env over literal keys.

3. Run

llm-conductor run --target path/to/strings.json
llm-conductor run --target path/to/strings.json --stage translate --strict
llm-conductor run --target project/ui.list --result2target

Results land under result/<target-name>/ (translated/, redacted/, final/) unless --result2target. See doc/cli.md.

Ollama vs OpenAI-compatible

Ollama OpenAI-compatible
type ollama openai
URL …/api/chat …/v1/chat/completions
Key ignored key_env / key required

Point translation and verification at different hosts if you want.

Example

Input (see examples/sample.json):

{
  "npc": {
    "greeting_male": "Welcome, traveler.",
    "greeting_female": "Welcome, traveler."
  }
}

Same English text, different key suffixes → separate requests and (usually) different grammatical forms in the target language. Full prompt rules: doc/prompts.md.

Key-name conventions

Pattern Hint
*_male, *_female, *_neutral gender
*_plural, *_singular, *_few, *_zero, count_* number
*_formal, *_informal formality

Documentation

Doc Topic
doc/concepts.md What it is / is not; isolation; language=prompt
doc/configuration.md TOML split, paths, secrets
doc/cli.md Commands, results, exit codes
doc/prompts.md Authoring prompts
doc/pipeline.md Cache, validation, resilience
CONTRIBUTING.md Dev setup and conventions
AGENTS.md Notes for AI coding agents

Cache note

Rejected model replies are not cached. A warm-cache rerun that only hits residual misses can exit with code 5 even if an earlier full run was 0. Fix prompts/model or remeasure with --no-cache (doc/cli.md).

Roadmap (high level)

  • Richer input formats (e.g. subtitle adapters)
  • Optional in-stage parallelism with single-flight on the full cache key
  • Stage-local resume orthogonal to the LLM cache (concept)

License

MIT — see LICENSE.


Кратко (RU)

LLM-Conductor — CLI-конвейер: гоняет строковые листья JSON через LLM (Ollama / OpenAI-совместимые API), опционально второй моделью вычитывает перевод. Это не локальный переводчик и не движок MT — модель и промпты ваши. Пара языков задаётся только текстом промпта в llm.toml, не схемой движка. Быстрый старт: init → правки профиля → run --target …. Документация на английском в doc/.

Metadata

Release files for llm-conductor 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-conductor 1.0.0
File Size Uploaded Provenance Actions
llm_conductor-1.0.0.tar.gz 107.5 kB With provenance Details for llm_conductor-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-conductor 1.0.0
File Interpreter ABI Platform Actions
llm_conductor-1.0.0-py3-none-any.whl Python 3 none any Details for llm_conductor-1.0.0-py3-none-any.whl

Total release size: 226.4 kB

Release files / llm_conductor-1.0.0.tar.gz

Download URL llm_conductor-1.0.0.tar.gz
Size 107.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cfc90e0172a932e564d54f001d3aa69de73d491b0b73a472340f31732d9ab3ce
BLAKE2b-256 checksum
How to use checksums
328745864866819c5d6543653ce6df993bf0210b5a740b08309ab7f11a2c3765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / llm_conductor-1.0.0-py3-none-any.whl

Download URL llm_conductor-1.0.0-py3-none-any.whl
Size 118.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
678a35c322d5e3cc4b05ae9c0444df65f11bf523004666e3c1220ccda2088364
BLAKE2b-256 checksum
How to use checksums
7b998360adb16eb7b6179b9bbc54f4c100ea0cdb15092551d76d485d8d5d3b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for llm-conductor 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_conductor-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page