Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Code Snippets AI - Powered by OpenRouter & OpenAINew to Visual Studio Code? Get it now.
Code Snippets AI - Powered by OpenRouter & OpenAI

Code Snippets AI - Powered by OpenRouter & OpenAI

Code Snippets AI LLC

|
1,789 installs
| (1) | Free
Turn Your Questions Into Code with ChatGPT, GPT-4 & Google PaLM2. 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

VSCode Extension

Chat with the latest AI models in VSCode

Build your code snippets library

Pricing · Twitter


Features

  • 🙋 Ask general questions or use code snippets from the editor to query the AI
  • 🔬 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
  • 💾 Save and fetch your team's code snippets from your online library

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:

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 context.

Refactor code 🔧

Refactors the selected code.

Explain 💁

Explains what the selected code does.

Add tests 🧪

Creates tests for the selected code.

Find bugs 🔎

Looks for problems/errors in the selected code, fixes and explains them.

Optimize 🏎️💨

Make the selected code more concise and easier to read.

Add comments 📖

Generate comments for the selected code.

Save Code Snippets 💾

Saves your code snippet to your online library for your whole team to access.

Insert Code Snippets

Insert code snippets from anywhere using Ctrl/Cmd + Shift + Q. This opens your snippets in foldered lists, allowing you to insert them directly into your active Cursor position.


Installation

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

Get your OpenRouter API key 🔑

To use this extension, you will need an API key from OpenRouter.ai.

To get setup with Code Snippets Library Features, 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. Start your Free trial to one of our plans.
  4. Download the Desktop App!

FAQ

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


Contact Us

I hope you enjoy using Code Snippets AI.

Socials

Instagram or Twitter

Credits

Credits for Snippet Library integration, extended chat features & use of Enterprise AI Models go to Code Snippets AI.

Credits for chat display inspiration to Ali Gençay Copyright (c) 2022.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft