Skip to content

Sagargupta16/ai-code-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

395 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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:

    git clone https://github.com/Sagargupta16/ai-code-translator.git
    cd ai-code-translator
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.local.example .env.local

    Add your OpenAI API key to .env.local.

  4. Run the development server:

    npm run dev
  5. Open http://localhost:3000.

Environment Variables

See .env.local.example for required variables:

  • OPENAI_API_KEY - Your OpenAI API key

License

MIT

About

AI-powered code translator with streaming output, multi-language support, syntax highlighting, and model selection (GPT-3.5/GPT-4)

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors