Saviio / vscode-code-smell-gpt

A grammarly extension for programming languages. Automatically review the code you write, give you suggestion, and fix errors with one click.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Smell GPT: Your Smart Code Reviewer and Refactorer

logo

🚀 Elevate your coding experience with automated, AI-driven code reviews and refactor suggestions directly in your VSCode!

What is Code Smell GPT?

Code Smell GPT is an innovative VSCode extension designed to be your intelligent coding companion, helping you to write cleaner, more efficient, and maintainable code. It utilizes the power of GPT to review and refactor your code in real-time, providing you with smart, context-aware suggestions for improving code quality across various programming languages.

Features

  • 🧠 Intelligent Code Suggestions: Real-time code review and refactor suggestions as you type.
  • 🔄 One-Click Refactor: Easily accept suggested refactorings with a single click.
  • 📚 Supports Multiple Languages: Versatile code review for your favorite programming languages.
  • 💰 Save Your Token: Many people worry about whether this plugin will spend a huge amount of tokens, I introduce several mechanism for preventing so:
    • 🤖 Increment Review: CodeSmellGPT only review the code you have changed, which means it will not review the whole file, but only the changed part.(It will review whole file when you first save though.)
    • 🚃 Batch Request: CodeSmellGPT will accumulate code change until more than 30 words to review, preventing sending too many code fragments to gpt.

Demos

EN: Youtube: CodeSmellGPT: Super Simpe Auto Code Review VSCode Extension!

CN: 哔哩哔哩: CodeSmellGPT: 一个让GPT4看着你写代码的VSCode插件!(安装超级简单)

Usage1

Usage2

Usage3

How to Install and Setup

  1. Install the Extension: Search for "Code Smell GPT" in the VSCode marketplace and click on the install button.

install1

  1. Setting Up GPT Key :

    • After installation, you'll need to configure your GPT API key.
    • Open the command palette with Ctrl + Shift + P (Cmd + Shift + P on macOS).
    • Type "Preferences: Open User Settings (JSON)" and select it.
    • Add the following config in the JSON object:
        {
            "vscode-code-smell-gpt.gptKey": "<Your OPEN AI API Key>"
        }
    
    • Save the settings(You may need to hit 'save' multiple times or reopen VSCode so that the icon at right-bottom corner is became ready), and you're ready to code smarter with "Code Smell GPT"!

install2

install3

Todo List

  1. Further reduce token usage
    • reduce prompt size ✅
    • batch request gpt ✅
    • test in gpt-3.5
  2. Better error handling(GPT Key Validation) ✅
  3. Configuration(GPT model, files exclusion)

How to Contribute

We welcome contributions from the developer community!

  1. Fork the Repository: Navigate to our GitHub Repository and fork the project.
  2. Create a Pull Request: Implement a feature or bug fix and create a pull request against the main branch.
  3. Issue Tracking: Feel free to create issues in the GitHub repository to suggest features, report bugs, or discuss implementation details.

Your insights and contributions will be valuable in enhancing "Code Smell GPT"!

Useful Links

License

"Code Smell GPT" is licensed under the MIT License. See the LICENSE file for more details.


🚀 Boost your coding efficiency and produce top-tier, clean code with "Code Smell GPT" – Your AI-powered coding companion for impeccable code quality!


About

A grammarly extension for programming languages. Automatically review the code you write, give you suggestion, and fix errors with one click.

License:MIT License


Languages

Language:TypeScript 100.0%