In the previous code generation tool Copilot, it was generated by Github based on a large amount of repository code. If you are interested, you can refer to the article I wrote before. It includes installation, usage methods, etc. Since Copilot now requires payment, I have been looking for a more reasonable (free and easy to use) code generation tool to help me complete repetitive and boring code. Recently, I have also used several similar tools, and below are my experiences using these tools.
(PS: For more detailed content, you can check this GitHub page: https://github.com/llq20133100095/AICodeGeneration)
Tutorial:
-
Copilot
-
Installation: In the vscode software, find and install Github Copilot.
-
Usage:
- Auto-generation: In Python code auto-generation, just enter the "function name" + "English description", and Copilot will provide code suggestions based on the corresponding English description.
- If you are not satisfied with the above code, Copilot can also be replaced using shortcuts.
- Get more detailed suggestions: You can use the shortcut Ctrl+Enter to get more detailed programming assistance information from Copilot.
-
Tabnine
-
Installation: In the vscode software, find and install Tabnine.
-
Usage:
- Tabnine has a free version and a paid version. The free version can only help you complete the code you want.
- The paid version can generate more lines of code and understand your contextual requirements.
-
Mutable AI
-
Installation: In the vscode software, find and install Mutable AI.
-
Usage:
- Coding guidance: Select Mutable AI: Give a coding instruction and enter the content you need guidance on.
- Code completion and generation.
-
Cheat.sh
-
Installation: In the vscode software, find and install Snippet.
-
Usage: Open the command line and enter "snippet" to activate it.
-
CodeGeeX
-
Installation: In the vscode software, find and install CodeGeeX.
-
Usage:
- Stealth mode: In this mode, CodeGeeX will generate from the cursor when you stop typing. After generation, it will be displayed in gray and can be inserted by pressing Tab.
- Interactive mode: In this mode, press Ctrl+Enter to activate the interactive mode, and CodeGeeX will generate X candidates and display them in the right window.
- Translation mode: In the text editor of the current language, enter or paste code from another language. Select the code with the mouse, then press Ctrl+Alt+T to activate the translation mode. Choose the language of the code according to the prompt, and CodeGeeX will translate the code into code that matches your current editor language. Click "use code" above the translation result to insert it.
- Prompt mode (experimental feature): In this mode, you can add additional prompts in the input to achieve some interesting functions, including but not limited to code explanation, summarization, and generating in specific styles. CodeGeeX uses its powerful few-shot generation ability in this mode. When you provide some examples in the input, CodeGeeX will imitate these examples and implement the corresponding functions. For example, you can customize a template that provides an example of explaining code line by line. Select the code you want to explain, press Alt/Option+t to trigger the prompt mode, and select the template you have written (such as "explanation"), and CodeGeeX will explain the code you entered.
-
CodeWhisperer
-
Installation: Currently, there is no public version available, but you can go to the official website and join the waitlist for beta testing.
-
Usage:
- Customizing existing code.
- Detecting vulnerabilities in the code and providing reference suggestions.
Overall rating: