Skip to content

Repository files navigation

rentl

An open-source, BYOK agentic localization pipeline that makes professional-grade game translation feel as easy and fast as simple MTL.

rentl delivers a coherent, playable v1 translation in hours through a phase-based workflow (ingest → context → pretranslation → translate → QA → edit → export), targeting both fan translators seeking accessibility and professional localization teams demanding reliability and quality.

Key Features

  • Phase-based pipeline orchestration — Run a complete localization pipeline with deterministic completion and clear phase boundaries
  • BYOK model integration — Configure any OpenAI-compatible endpoint (OpenRouter, OpenAI, Ollama, LM Studio) and switch models per phase
  • Context-aware translation — Automatically associate scene, route, and line context with source text for coherent translations
  • Multi-format support — Ingest from CSV, JSONL, or TXT formats and export localized outputs suitable for patching

Installation

Option 1: uvx (Recommended)

The fastest way to get started with rentl is using uvx, which runs the latest version without requiring installation:

uvx rentl --version

If you don't have uvx installed, install it first:

curl -LsSf https://astral.sh/uv/install.sh | sh

Option 2: From Source

For development or to run the latest unreleased changes:

git clone https://github.com/trevorWieland/rentl.git
cd rentl
uv sync --upgrade

rentl requires Python 3.14+ and uses uv for dependency management.

Quick Start

Get started with a new rentl project in four steps:

1. Initialize a new project

uvx rentl init

This interactive command will:

  • Guide you through provider selection (OpenRouter, OpenAI, Local, or custom)
  • Pre-fill configuration with sensible defaults
  • Generate a valid rentl.toml configuration file
  • Create required directory structure (input/, out/, logs/)
  • Generate a .env file for API key configuration

2. Add your API key

Edit the .env file in your project directory and add your API key. The file will already have a placeholder - replace it with your actual key:

# Set your API key for the LLM endpoint
RENTL_LOCAL_API_KEY=your_key_here

Or use sed to replace the placeholder:

sed -i 's/RENTL_LOCAL_API_KEY=.*/RENTL_LOCAL_API_KEY=your_key_here/' .env

3. Verify your setup

uvx rentl doctor

Doctor runs diagnostic checks on your configuration and environment, including:

  • Configuration file validation
  • API key presence (loads from .env files)
  • Model endpoint connectivity
  • Required directory structure

4. Run the pipeline

uvx rentl run-pipeline

Executes the full localization pipeline:

  • Ingests source text from your configured input
  • Builds context and analyzes source text
  • Translates with your configured model
  • Runs QA checks on the output
  • Exports translated lines to out/run-{run_id}/{target_language}.jsonl

Once the pipeline completes, your translated output is ready in the out/ directory. Check the pipeline output for the run ID and find your translated files:

# List output files
ls -la out/run-*/

# View translated lines
cat out/run-*/en.jsonl

Note: If you installed from source, replace uvx rentl with uv run rentl in all commands above.

Available Commands

Command Description
rentl version Display version information.
rentl help Display help for commands.
rentl doctor Run diagnostic checks on rentl configuration and environment.
rentl explain Explain pipeline phases.
rentl init Initialize a new rentl project interactively.
rentl validate-connection Validate connectivity for configured model endpoints.
rentl export Export translated lines to CSV/JSONL/TXT.
rentl run-pipeline Run the full pipeline plan.
rentl run-phase Run a single phase (with required prerequisites).
rentl status Show run status and progress.
rentl check-secrets Scan configuration files for hardcoded secrets.
rentl migrate Migrate rentl.toml config file to the current schema version.
rentl benchmark Download and compare benchmark evaluation datasets.

For detailed help on any command, run:

uvx rentl run-phase --help

Note: If you installed from source, replace uvx rentl with uv run rentl.

Configuration

After running rentl init, your configuration lives in rentl.toml. This file controls all aspects of your localization pipeline.

Configuration File Structure

[project] — Project metadata and paths

[project]
schema_version = { major = 0, minor = 1, patch = 0 }
project_name = "my-translation-project"

[project.paths]
workspace_dir = "."
input_path = "input.txt"
output_dir = "out"
logs_dir = "logs"

[project.formats]
input_format = "txt"
output_format = "txt"

[project.languages]
source_language = "en"
target_languages = ["ja"]
  • schema_version — Config file schema version (managed automatically by rentl migrate)
  • project_name — Name for this translation project
  • paths.workspace_dir — Root directory for all rentl operations
  • paths.input_path — Path to your source text file
  • paths.output_dir — Where to write pipeline outputs
  • paths.logs_dir — Where to write log files
  • formats.input_format — Input file format (txt, csv, or jsonl)
  • formats.output_format — Export file format (txt, csv, or jsonl)
  • languages.source_language — Source language code (e.g., en)
  • languages.target_languages — List of target language codes (e.g., ["ja", "es"])

[endpoint] — Model provider configuration

[endpoint]
provider_name = "openrouter"
base_url = "https://openrouter.ai/api/v1"
api_key_env = "RENTL_LOCAL_API_KEY"
  • provider_name — Provider identifier (for display and logging)
  • base_url — OpenAI-compatible API endpoint URL
  • api_key_env — Name of the environment variable containing your API key

[pipeline] — Pipeline model and phase configuration

[pipeline.default_model]
model_id = "qwen/qwen3-30b-a3b"

[[pipeline.phases]]
phase = "ingest"

[[pipeline.phases]]
phase = "context"
agents = ["scene_summarizer"]

[[pipeline.phases]]
phase = "pretranslation"
agents = ["idiom_labeler"]

[[pipeline.phases]]
phase = "translate"
agents = ["direct_translator"]

[[pipeline.phases]]
phase = "qa"
agents = ["style_guide_critic"]

[[pipeline.phases]]
phase = "edit"
agents = ["basic_editor"]

[[pipeline.phases]]
phase = "export"
  • default_model.model_id — Model identifier to use for all phases (unless overridden)
  • phases — Ordered list of pipeline phases to execute
  • phases[].phase — Phase name (ingest, context, pretranslation, translate, qa, edit, export)
  • phases[].agents — Which agents to run during this phase

[agents] — Agent configuration paths

[agents]
prompts_dir = "packages/rentl-agents/prompts"
agents_dir = "packages/rentl-agents/agents"
  • prompts_dir — Directory containing agent prompt templates
  • agents_dir — Directory containing agent configuration files

[logging] — Logging configuration

[logging]
[[logging.sinks]]
type = "file"

[[logging.sinks]]
type = "console"
  • sinks — Where to write logs (file writes to logs_dir, console writes to stdout)

[concurrency] — Parallel execution settings

[concurrency]
max_parallel_requests = 1
max_parallel_scenes = 1
  • max_parallel_requests — Maximum concurrent API requests per scene
  • max_parallel_scenes — Maximum scenes to process in parallel

[retry] — Retry and backoff configuration

[retry]
max_retries = 3
backoff_s = 1.0
max_backoff_s = 60.0
  • max_retries — Maximum number of retry attempts on API failures
  • backoff_s — Initial backoff delay in seconds
  • max_backoff_s — Maximum backoff delay in seconds

[cache] — Response caching

[cache]
enabled = false
  • enabled — Whether to cache API responses (useful for development/testing)

Environment Variables

Store API keys and sensitive configuration in .env or .env.local files in your project directory. Never commit these files to version control.

Pipeline API keys

# Primary API key (used by default for all pipeline phases)
RENTL_LOCAL_API_KEY=your_key_here

Quality evaluation API keys (optional)

# Quality evals: API key for the model provider
RENTL_QUALITY_API_KEY=your_key_here

# Quality evals: base URL for the model provider
RENTL_QUALITY_BASE_URL=https://api.openai.com/v1

# Quality evals: model ID used for agent evaluation runs
RENTL_QUALITY_MODEL=gpt-5-nano

# Quality evals: judge model ID used for LLM-as-judge evaluations
RENTL_QUALITY_JUDGE_MODEL=gpt-5-nano

# Quality evals: base URL for the judge model provider
RENTL_QUALITY_JUDGE_BASE_URL=https://api.openai.com/v1

These environment variables are loaded automatically from .env files in your workspace directory.

Documentation

Project Structure

rentl/
├── packages/          # Core packages
│   ├── rentl-core/    # Core pipeline logic
│   ├── rentl-schemas/ # Pydantic schemas
│   ├── rentl-io/      # I/O operations
│   ├── rentl-llm/     # LLM integration
│   ├── rentl-agents/  # Agent implementations
│   └── rentl-tui/     # Terminal UI
├── services/          # Service applications
│   ├── rentl-cli/     # CLI application
│   └── rentl-api/     # API service (future)
└── tests/             # Test suite

Development

Run tests:

make test         # All tests with coverage
make unit         # Unit tests only
make integration  # Integration tests
make quality      # Quality tests

Run verification gates:

make check       # Format, lint, type, unit tests
make all         # Full gate (format, lint, type, unit, integration, quality)

Format code:

make format

Contributing

This project is in active development. Contributions, issues, and feature requests are welcome.

See our contribution guidelines for details on how to contribute.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Benchmark Data

The benchmark evaluation set uses text from Katawa Shoujo Re-Engineered (KSRE), which is licensed under CC BY-NC-ND. This text is not bundled in any installable package — it is downloaded on demand via rentl benchmark and cached locally at ~/.cache/rentl/eval_sets/. The sample project data (samples/golden/) is original content released under CC0 1.0.

Links

About

A multi-agent, context-aware translation pipeline for visual novels—turning raw scene text and metadata into high-quality, consistent JP→EN localizations.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages