Get up and running in 5 minutes! This guide assumes you have Python installed.
Open your terminal and run:
# Download
git clone https://github.com/yourusername/code-translator.git
cd code-translator
# Install
pip3 install -r requirements.txtChoose ONE provider:
Option A: OpenAI (Recommended)
- Go to https://platform.openai.com/api-keys
- Sign in → Create new secret key → Copy it
Option B: Google (Free tier available)
- Go to https://makersuite.google.com/app/apikey
- Sign in → Create API key → Copy it
# Start the app
python3 src/main.py- Click the ⚙ Settings button
- Go to API Keys tab
- Paste your key
- Click OK
-
Paste some Python code in the left panel:
def hello(name): print(f"Hello, {name}!")
-
Select JavaScript as target language
-
Press Ctrl+Enter or click Translate
-
See the result on the right:
function hello(name) { console.log(`Hello, ${name}!`); }
- Ctrl+Enter: Translate
- Ctrl+D: Toggle dark/light theme
- Ctrl+H: View history
- Ctrl+M: Click-through mode
You're ready to translate code! For more features, see the full documentation.
- Drag & drop code files directly into the window
- Enable real-time translation in settings
- Star your favorite translations with ⭐
- Run
python3 test_comprehensive.pyto check your setup - See INSTALLATION.md for troubleshooting
- Check the FAQ for common questions