Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Code Snippets AI - GPT-4New to Visual Studio Code? Get it now.
Code Snippets AI - GPT-4

Code Snippets AI - GPT-4

Code Snippets AI

|
5,438 installs
| (4) | Free
Turn Your Questions Into Code with GPT-4. Works with JavaScript, TypeScript, Python, C++, Java, PHP, Ruby & Others.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Snippets AI - Turn Your Questions Into Code with GPT-4!

Hi! I'm Stefan, the full-time solo creator/founder of Code Snippets. I hope you enjoy using this Visual Studio Code extension.

If you have any issues or would like some support, please Join the Discord before writing a review!

NEW in v1.0.4

You can now continue the conversation with follow-up questions to the AI 💬

NOTE: If you Stop the AI from generating a response, it will not remember the code you provided

Features

  • 🙋 Ask general questions or use code snippets from the editor to query the AI
  • 🖱️ Right click on selected code to perform one of the following commands Create Documentation Explain code Refactor/Optimize code Debug and fix Errors
  • 🔬 View AI responses in the sleek side panel
  • 👀 See the responses as they are being generated
  • 📝 Insert code from the AI's response into the active editor by clicking on them
  • 💾 Save and fetch your code snippets from your online library

Built with GPT-4 & ChatGPT

We use GPT-4 & ChatGPT, which provides faster and more accurate responses to your questions, compared to GPT-3 or Codex.

Installation

To use this extension, install it from the VSCode marketplace.

Get your API key

To use this extension, you will need an API key from your dashboard.

To get one, follow these steps:

  1. Go to codesnippets.ai
  2. If you don't have an account, you will need to create one or sign up.
  3. Sign up to the free trial.
  4. Copy the API key from the dashboard and paste it into the Access Token field in the extension settings.
  5. After completing these steps, the extension should be ready to use.

Why not use an OpenAI API key?

After asking the development community, we have found a few key points that influenced our decision to introduce a pricing model:

  • ChatGPT Plus is expensive at $24/month.
  • Using GPT-4 can lead to more expensive monthly cost for users, which averages over $30/month!
  • Our GPT-4 PRO Plan is only $10/month and uses the same GPT-4 API as ChatGPT Plus.
  • Code inserted into the Code Snippets AI extension is NEVER read or used for training purposes.

Usage

  1. Open a file in Visual Studio Code and click on the CodeSnippets icon in the sidebar.
    • This will open the side panel with an input field.
  2. Enter your prompt or question.
  3. Click Enter.
    • The prompt will be sent to the AI.
    • The response will be displayed below the input field in the sidebar.

Add context to your request with selected code

Select some code in the editor, right click on it and choose one of the following commands from the context menu:

  • AI -> Ask anything : Opens the custom command window for you to insert your own prompt. (You can also press Ctrl + Shift + A). With or without selected code for added prompt context.
  • AI -> Add tests : Creates tests for the selected code.
  • AI -> Find bugs : Looks for problems/errors in the selected code, fixes and explains them.
  • AI -> Optimize : Make the selected code more concise and easier to read.
  • AI -> Explain : Explains what the selected code does.
  • AI -> Add comments : Generate comments for the selected code.
  • AI -> Refactor code: Refactors the selected code.
  • AI -> Documentation : Creates detailed documentation for the selected code.
  • Save Code Snippet : Saves your code snippet to your online library for your whole team to access.

Example Usage

Refactoring selected code

Generic questions

Optimizing Code

FAQ

Answers to our most popular questions can be found here: FAQ

GPT-4 is only available on our Pro plan.

ChatGPT is used for all other plans.

Join the Discord!

Please direct your support questions and report any issues on the Discord, where I will be happy to assist you.

You can chat with other developers, join a study session, talk about AI or just send eachother memes!

Pricing

Our pricing models can be found here: Pricing

Contact Us

I hope you enjoy using Code Snippets AI.

If you have any questions or wish to request a feature, please get in touch with me on the Discord, where I will be happy to assist you.

Join the Discord!

You can chat with other developers, join a study session, talk about AI or just send eachother memes!

Social Contacts

Instagram or Twitter

Credits

Credits for chat functionality go to Ali Gençay, Copyright (c) 2022.

Credits for Snippet Library integration and extented chat features go to Code Snippets AI.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft