https://github.com/sagargupta16/ai-code-translator
AI-powered code translator with streaming output, multi-language support, syntax highlighting, and model selection (GPT-3.5/GPT-4)
https://github.com/sagargupta16/ai-code-translator
ai code-translator codemirror gpt nextjs openai streaming tailwindcss typescript
Last synced: about 1 month ago
JSON representation
AI-powered code translator with streaming output, multi-language support, syntax highlighting, and model selection (GPT-3.5/GPT-4)
- Host: GitHub
- URL: https://github.com/sagargupta16/ai-code-translator
- Owner: Sagargupta16
- License: mit
- Created: 2023-11-14T16:55:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-15T12:13:59.000Z (about 2 months ago)
- Last Synced: 2026-04-15T14:20:10.532Z (about 2 months ago)
- Topics: ai, code-translator, codemirror, gpt, nextjs, openai, streaming, tailwindcss, typescript
- Language: TypeScript
- Homepage: https://ai-code-translator-delta-six.vercel.app
- Size: 897 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# AI Code Translator
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](https://github.com/mckaywrigley/ai-code-translator).

## Features
- Translate code between 50+ programming languages
- Syntax highlighting with CodeMirror
- Real-time streaming translation
- Clean, responsive UI with Tailwind CSS
## Tech Stack
- Next.js
- TypeScript
- OpenAI API
- CodeMirror
- Tailwind CSS
## Getting Started
1. Clone the repo:
```bash
git clone https://github.com/Sagargupta16/ai-code-translator.git
cd ai-code-translator
```
2. Install dependencies:
```bash
npm install
```
3. Set up environment variables:
```bash
cp .env.local.example .env.local
```
Add your OpenAI API key to `.env.local`.
4. Run the development server:
```bash
npm run dev
```
5. Open [http://localhost:3000](http://localhost:3000).
## Environment Variables
See `.env.local.example` for required variables:
- `OPENAI_API_KEY` - Your OpenAI API key
## License
MIT