Here are step-by-step instructions on how to connect GPT to your favorite VS Code to write code even faster and smarter.
🔧 What will the integration of GPT into VS Code give?
✨ Auto-complete code based on meaning
📚 Generate comments and documentation
🧪 Explain what the code snippet does
🔄 Rewrite the code with improved readability
🤯 Help with debugging and bug hunting

🧩 What are the extensions?
Expansion | Features | Free |
|---|---|---|
CodeGPT | Generation, explanation, code translation | Partially |
Continue | LLM agent with auto-completion, supports OpenAI and others. | ✅ |
Ghostwriter | From Replit, code and sentence generation | ❌ |
Cody (Sourcegraph) | GPT prompts based on project context | ✅ |
⚙️ Installing CodeGPT
Open VS Code
Go to Extensions (Ctrl + Shift + X)
Find CodeGPT and click Install
📝 After installation, you will need to configure the API key from OpenAI.
🔑 Where can I get the OpenAI API Key?
Click Create new secret key
Copy the key (it will be shown once)
📌 Do not publish the key in plain text and do not upload it to public repositories.
🔧 Setting up CodeGPT
Open the command palette (Ctrl+Shift+P) and select:
> CodeGPT: Set API KEYInsert the key from OpenAI. After that, you can run the commands:
CodeGPT: Explain Code
CodeGPT: Generate Code
CodeGPT: Refactor Code
CodeGPT: Ask Anything
📐 Example of use
Highlight a code snippet and call Explain Code. GPT will explain what the code does, in Russian or English. It's convenient if you're working with someone else's project.
Want to make the code more beautiful and cleaner? Call Refactor Code.
⚡️ Alternative: Continue
If you want more flexibility and don't want to pay, try Continue:
Supports OpenAI, LocalAI, Ollama, and others
Works as an assistant alongside the editor
You can connect local models
📁 An excellent option if you want to use GPT on your server or even without the Internet.
📣 Join the Kodika community
In our Kodik app you can:
Learn to write code from scratch in Python, JavaScript, HTML, etc.
Ask AI questions directly inside the exercises
Pump skills through real mini-projects
And in Telegram channel we discuss interesting topics, share life hacks and support each other. Join us! 💬
💬 Write in the comments
Do you use GPT in the editor? Which plugin did you like the most? Or would you like us to create a guide on how to connect a local model?
