CodeGPT Can Turn You Into A Coding Ninja
Try it out and see how it may help you in your coding career!
Code GPT is a strong and flexible Visual Studio Code (VSCode) extension that allows developers to develop code snippets and complete blocks of code using the GPT-3 natural language processing framework.
This extension is incredibly useful for developers working on complicated projects since it allows them to rapidly generate code snippets matched to their specific requirements.
The CodeGPT extension is free, but the APIs from AI source OpenAI that it uses are not.
As part of the free trial period, you will receive $18 in free credit.
The OpenAI API
You must have credits in your OpenAI account to use this extension.
This plugin makes use of the premium Official OpenAI API.
Prices are available at OpenAI.
If you don’t have any credits, the extension will show the OpenAI API error: You exceeded your current quota, please check your plan and billing details
To check your account and the credits you have available, log in with your account at OpenAI.
Select Manage Account from the menu, and then in the Usage area, you can see the number of credits available and used.
In this image, $0.05 has been taken from a total of $18 as part of the free trial.
Configuration
Download Visual Studio Code
Download and install the CodeGPT Extension, or search for it in the VSCode Extensions tab.
Go to the Extensions tab in VSCode
To add CodeGPT to VSCode, open the code editor and go to the Extensions tab.
This tab is activated by clicking on the Extensions icon in the left sidebar or by using the keyboard shortcut Ctrl + Shift+ X.
Search for CodeGPT
When you’re on the Extensions tab, type CodeGPT into the search field.
The extension should show up in the search results.
Install CodeGPT
When you’ve found the CodeGPT extension, click the Install button to start the installation.
Depending on your internet connection, the installation process may take a few seconds.
Get your API key from OpenAI:
- Open an account at openai.com.
- Go to View API Keys.
- Make a new Secret Key.
Use your API Key
Search for CodeGPT using cmd + shift + p or ctrl + shift + p: Set the API KEY
Copy the secret key and input it.
Start Using CodeGPT
After you’ve set up the extension, you can use CodeGPT to generate code snippets and entire blocks of code.
Simply enter a natural language description of the code you wish to produce and hit the CodeGPT icon in the status bar to get started.
The extension will then create the code snippet or code block that matches your description.
Get code from the comments
Leave a comment requesting a specific code.
Ctrl + shift + I or cmd + shift + I
Make use of the code
Make a README.md file with Ask CodeGPT
Last Thoughts
To end, adding CodeGPT as a VSCode extension is a quick and simple approach that may greatly improve your coding experience.
This extension, which can generate code snippets and complete blocks of code using natural language, can save you time and effort while working on challenging projects.
Try it out and explore how it may help you in your coding journey!