https://github.com/arvid-berndtsson/rosetta-translate
A command-line tool to translate large text files using cost-effective AI models via OpenRouter. Built with Deno.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Repository
A command-line tool to translate large text files using cost-effective AI models via OpenRouter. Built with Deno.
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
Rosetta Translate 📜
A powerful, flexible, and cost-effective command-line tool for translating large text files using your favorite AI models via OpenRouter.
Rosetta Translate is designed to handle long documents, like meeting transcripts or reports, that exceed the context window of most AI models. It intelligently splits the text into logical chunks, translates each one, and seamlessly reconstructs the document in the target language.
✨ Key Features
- 📚 Translate Large Files: Overcomes AI model context limits by translating documents paragraph by paragraph.
- 💸 Cost-Effective & Flexible: Leverages OpenRouter to let you choose from a wide variety of models.
- 🏗️ Preserves Structure: Retains original paragraph breaks, speaker labels, and overall document flow.
- 📦 Single Executable: Can be compiled into a single, dependency-free executable for Windows, macOS, or Linux.
🚀 Getting Started
Prerequisites
- Deno: You need the Deno runtime installed. You can install it from deno.land.
- OpenRouter API Key: Sign up at OpenRouter.ai and create an API key.
Installation & Setup
Option 1: Download Pre-built Binaries (Recommended)
Download the latest release for your platform from the Releases page. The latest version includes binaries for:
- Windows: rosetta-translate-windows.exe
- macOS ARM: rosetta-translate-macos-arm
- macOS Intel: rosetta-translate-macos-intel
- Linux: rosetta-translate-linux
Option 2: Build from Source
Clone the repository:
bash git clone https://github.com/arvid-berndtsson/rosetta-translate.git cd rosetta-translateCreate a
.envfile and add your OpenRouter API key:OPENROUTER_API_KEY="sk-or-your-secret-key-here"
⚙️ Usage
1. Running with Deno
bash
deno run --allow-net --allow-read --allow-write --allow-env main.ts --input <source-file.txt> --output <translated-file.txt> --api-key <API-KEY>
2. Running the Compiled Executable
On Windows:
bash
rosetta-translate-windows.exe --input transcript_en.txt --output transcript_de.txt
On macOS ARM:
bash
./rosetta-translate-macos-arm --input transcript_en.txt --output transcript_de.txt
On macOS Intel:
bash
./rosetta-translate-macos-intel --input transcript_en.txt --output transcript_de.txt
On Linux:
bash
./rosetta-translate-linux --input transcript_en.txt --output transcript_de.txt
📦 Compiling to an Executable
Create a self-contained executable with the following command.
For Windows:
bash
deno compile --allow-net=openrouter.ai --allow-read --allow-write --allow-env --output rosetta-translate.exe --target x86_64-pc-windows-msvc main.ts
For macOS or Linux:
deno compile --allow-net=openrouter.ai --allow-read --allow-write --allow-env --output rosetta-translate main.ts
📄 License This project is licensed under the MIT License.
Owner
- Name: Arvid Berndtsson
- Login: arvid-berndtsson
- Kind: user
- Location: Sweden
- Company: @LimeTip
- Website: https://arvidberndtsson.com
- Repositories: 1
- Profile: https://github.com/arvid-berndtsson
Based in Malmö, Sweden, I specialize in software development and digital sustainability. Founder of @LimeTip and Co-Founder of @merely-emissions
GitHub Events
Total
- Release event: 1
- Push event: 5
- Create event: 1
Last Year
- Release event: 1
- Push event: 5
- Create event: 1
Dependencies
- actions/cache v3 composite
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/upload-artifact v4 composite
- denoland/setup-deno v2 composite