The Green Code AI extension enhances your Visual Studio Code experience by integrating with Green Code AI services, providing advanced code analysis capabilities.
The Green Code AI extension provides the following features:
- Code Analysis: Leverage the power of Green Code AI to analyze your code for best practices, potential issues, and improvements.
- Secure Configuration: Safely store and manage your OpenAI API key and other sensitive information using VS Code's secure storage.
We welcome contributions from everyone. Here are a few ways you can help:
-
Fork the repository: Start by forking the project repository to your own GitHub account.
-
Clone the repository: Clone the forked repository to your local machine.
git clone https://github.com/<your-username>/<repository-name>.git
-
Create a new branch: Create a new branch for your changes. This helps to keep the work organized.
git checkout -b <branch-name>
-
Make your changes: Make the changes or additions in your local project. Be sure to test your changes!
-
Commit your changes: Once you've made changes, commit them with a clear and descriptive commit message.
git commit -m "<your-commit-message>"
-
Push to your fork: Push your changes to the forked repository on GitHub.
git push origin <branch-name>
-
Submit a pull request: Go to your forked repository on GitHub and click the "New pull request" button. Fill out the form and then submit the pull request for review.
Thank you for your interest in contributing to our project!
For testing the application locally, follow these steps:
-
Compile the project:
npm run compile
You should now see the
out
folder appear at you root directory. -
Build the project:
npm run build
-
Install
vsce
, a command-line tool for packaging, publishing and managing VS Code extensionsn vsce:npm install -g @vscode/vsce
-
Create a package of the extension, a
.vsix
file of the extension is created:vsce package
-
Install the extension:
- Go to the Extensions view.
- Click Views and more actions in the upper right corner.
- Select Install from VSIX.
- Install the
green-code-ai-1.0.0.vsix
file.
-
Open Green Code AI from VS Code's primary sidebar:
-
If it is your first time using the extension, a registration window will prompt you for your OpenAI API key and other relevant details. You can choose between using an Azure OpenAI resource or an OpenAI account. In both cases, you will need an API key to utilize the tool.
-
If you have already registered your information and have set a password for your account, you might be asked for your password at startup.
-
-
Test the extension on some code:
- After entering your information and saving or submitting it, you can begin by highlighting a section of your code that you would like to receive feedback on. Then, press "Get Feedback" to receive detailed tips on how to make your code greener.
If you encounter a bug while using our project, we would appreciate it if you could report it to us. Here's how you can do it:
-
Check existing issues: Before creating a new issue, please check our issue tracker to see if someone else has already reported the same bug. If it's already reported, you can add your information to the existing issue.
-
Create a new issue: If the bug hasn't been reported yet, create a new issue in our issue tracker. Please provide as much information as possible to help us understand and reproduce the bug. Here's what we would like to know:
- A clear and descriptive title.
- Steps to reproduce the bug.
- Expected behavior.
- Actual behavior.
- Screenshots or screen recordings (if applicable).
- Your operating system, browser version, and project version.
-
Submit the issue: Once you've filled out all the necessary information, submit the issue.
We appreciate your help in making our project better. Thank you for taking the time to report bugs!
This project is licensed under the MIT License. Please see the license.md file for the full text.
Enjoy coding sustainably with Green-Code-AI!
© Tietotevry Corporation (2024)