Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ByteMeShiv/code-commentor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

💬 Code Commenter (MVP)

AI-powered code reviewer. Send code snippets → get clean, well-structured comments back.


🚀 Features

  • Paste Python code
  • AI generates comments (docstrings + inline explanations)
  • Powered by Google Gemini

🛠 Tech Stack

  • Backend: FastAPI (Python)
  • LLM: Google Generative AI (google-generativeai SDK)

⚡ Quick Start

  1. Clone repo

    git clone https://github.com/yourusername/code-commenter.git
    cd code-commenter
  2. Setup environment

    python -m venv venv
    source venv/bin/activate # Linux/Mac
    venv\Scripts\activate # Windows
    pip install -r requirements.txt
  3. Add API key Create .env:

    GEMINI_API_KEY=your_api_key_here
  4. Run server

    uvicorn backend.main:app --reload
  5. Test with cURL or Swagger UI (http://127.0.0.1:8000/docs).


📝 Example

Input:

def fibonacci(n):
 if n <= 1:
 return n
 return fibonacci(n-1) + fibonacci(n-2)

Output: Docstring + inline comments explaining recursion and edge cases.


🔮 Next Iterations

  • Frontend UI
  • Support for multiple languages
  • Batch file upload

About

Code Commentor Built using Fastapi,GeminiAPI,Javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /