An AI-powered code translation tool that converts code between programming languages using OpenAI's API. Built with Next.js and TypeScript.
Originally forked from mckaywrigley/ai-code-translator.
- Translate code between 50+ programming languages
- Syntax highlighting with CodeMirror
- Real-time streaming translation
- Clean, responsive UI with Tailwind CSS
- Next.js
- TypeScript
- OpenAI API
- CodeMirror
- Tailwind CSS
-
Clone the repo:
git clone https://github.com/Sagargupta16/ai-code-translator.git cd ai-code-translator -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.local.example .env.local
Add your OpenAI API key to
.env.local. -
Run the development server:
npm run dev
-
Open http://localhost:3000.
See .env.local.example for required variables:
OPENAI_API_KEY- Your OpenAI API key
MIT
