

CodeGeeX is a powerful intelligent programming assistant based on LLMs. It provides functions such as code generation/completion, comment generation, code translation, and AI-based chat, helping developers significantly improve their work efficiency. CodeGeeX supports multiple programming languages.
We have updated CodeGeeX to the new CodeGeeX2-6B
model. Compare to the 1st generation model, the average improvement in all languages reaches 64% (Python +53%, C++ +80%, Java +55%, JavaScript +81%, Go +52%) on the HumanEval-X evaluation set.
Please kindly let us know if you encounter any problem or have any suggestion, via codegeex@zhipuai.cn. Or you can join our Slack or Telegram or WeChat/微信群 to give us your feedback or get support. Furthermore, welcome to fill out the survey/问卷 to tell us about all your feelings for our extension. (For more information, please check out our Homepage.)
Basic Usage
Privacy
Guidance
Stealth Mode
Interactive Mode
Ask CodeGeeX ᵇᵉᵗᵃ
Auto Comment
Code Translation
Basic Usage
After you have installed the extension, follow the notification to register and log in, or select "CodeGeeX
- CodeGeeX: Login
" from the right-click menu in VS Code to complete the login process. Then, start experiencing CodeGeeX:
Code Completion/Generation
- Stealth mode: Keep CodeGeeX activated, it will start generating codes when you stop writing (the icon at the bottom of VSCode starts spinning). When the generated code is shown in gray, just press
Tab
to insert the generated codes.
- Interactive mode: Press
Ctrl+Enter
to activate the interactive mode, CodeGeeX will generate X
candidates and show them in the right panel (X
can be modified in extension settings Candidate Num
). Then, select the best candidate by clicking on it.
AI Chatbot: Ask CodeGeeX
- In CodeGeeX sidebar, choose
Ask CodeGeeX
tab and ask any question about developing. When you have selected some code in the editor, you can ask questions about the code.
- In the right-click Menu of CodeGeeX, you can choose
Add Comment
to let CodeGeeX generate comments for selected code.
Code Translation
- In CodeGeeX sidebar, choose
Translation
tab. Then you can translate a piece of code into a specified language. Click Insert
to put the translation result to the editor.
Privacy
We highly respect the privacy of your code. The code is only used as the input of CodeGeeX to assist your programming. At the first time of usage, we will ask if you agree to share the generated code only for research purpose (disabled by default).
Guidance
Please see the details and examples for how to use the three modes in CodeGeeX:
Stealth mode
In this mode, CodeGeeX will start generating codes when you stop writing (the icon at the bottom of VSCode starts spinning). When the generated code is shown in gray, just press Tab
to insert the generated codes. You can also press Alt/Option+[
or ]
to change between candidates. If you are not satisfied with the current suggestions, you can also press Alt/Option+\
to get new suggestions. Change the number of candidates in the extension settings Candidate Num
(more candidates will slow down the generation speed). Note: The generation always starts at the current position of your cursor, thus if you modify the code before the generation is finished, it will probably cause bugs. We keep working on making the generation faster.

Interactive mode
In this mode, press Ctrl+Enter
to generate codes and visualize the candidates in another panel. Then, click on the best candidate to insert the generated codes to the current position of cursor.

Ask CodeGeeX ᵇᵉᵗᵃ
Ask CodeGeeX ᵇᵉᵗᵃ brings ChatGPT-like experience. You can ask any technical question or ask CodeGeeX to generate a function.
When you select some lines on the right, you can ask questions about the selected piece of code.
There are also some preset commands with which you can quickly ask some questions about selected code or current file:
| Command | Description |
| ------- | ----------- |
/explain
|Explain the current code.
/comment
|Add comments for current code.
/fixbug
|Find the bugs in current code and give suggestions to fix them.
Auto Comment
In the right-click Menu of CodeGeeX, you can choose Add Comment
to let CodeGeeX generate comments for selected code. The first time you use this feature, you will be asked to select a commenting language and set it as the default language. Afterward, you can modify the commenting language in the extension settings.

Code Translation
In CodeGeeX sidebar, choose the Translation
tab to translate a piece of code to a specified language. You can paste a piece of code in the input field or just select some code from the editor. After translation, when you click Insert
, the result will be inserted at the current cursor position in the editor.
