Skip to content

ravindra-y/ai-code-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Code Complexity Analyzer

A simple web tool that leverages the power of the Google Gemini API to analyze any code snippet. It automatically detects the programming language, determines the Time and Space Complexity (Big O notation), and provides a concise explanation.


✨ Features

  • 🤖 AI-Powered Analysis: Uses Google Gemini for accurate code inspection.
  • 🌐 Language Auto-Detection: Automatically identifies the programming language of the snippet.
  • ⏱️ Time & Space Complexity: Calculates Big O notation for both time and space efficiency.
  • 💡 Clear Explanations: Provides simple, AI-generated explanations for the analysis.
  • 🌙 Modern & Responsive UI: Sleek, dark-themed interface built with Tailwind CSS that works on all screen sizes.

🛠️ Tech Stack


🚀 Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

You will need a Google Gemini API key to use this application.

Installation

  1. Clone the repository to your local machine:

    git clone [https://github.com/your-username/ai-code-analyzer.git](https://github.com/your-username/ai-code-analyzer.git)

    (Replace your-username with your actual GitHub username)

  2. Navigate to the project directory:

    cd ai-code-analyzer
  3. Add your API Key:

    • Open the script.js file in a text editor.
    • Find the following line:
      const API_KEY = "YOUR_API_KEY";
    • Replace "YOUR_API_KEY" with your actual Google Gemini API key.
  4. Run the application:

    • Simply open the index.html file in your favorite web browser.

usage Usage

  1. Open the index.html file in your browser.
  2. Paste any code snippet into the text area.
  3. Click the "Analyze Complexity" button.
  4. View the results that appear below, including the detected language, time complexity, space complexity, and the AI's explanation.

📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors