Code Smell GPT: Your Smart Code Reviewer and Refactorer
🚀 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插件!(安装超级简单)
How to Install and Setup
- Install the Extension: Search for "Code Smell GPT" in the VSCode marketplace and click on the install button.
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"!
Todo List
- Further reduce token usage
- reduce prompt size ✅
- batch request gpt ✅
- test in gpt-3.5
- Better error handling(GPT Key Validation) ✅
- Configuration(GPT model, files exclusion)
How to Contribute
We welcome contributions from the developer community!
- Fork the Repository: Navigate to our GitHub Repository and fork the project.
- Create a Pull Request: Implement a feature or bug fix and create a pull request against the main branch.
- 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!