Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Comment2GPT
Comment2GPT

Comment2GPT

Merry Yellow

|
14,807 installs
| (7) | Free
🚀 Use OpenAI ChatGPT, Google Gemini, Anthropic Claude, DeepSeek and Ollama directly through your code comments. No extra windows, no switching context—just write a comment, hit Enter, and let AI 🤖 do the rest! ✨
Download

🚀 Try my other extension, CodeLens2GPT!

Use OpenAI ChatGPT, Google Gemini, Anthropic Claude, DeepSeek and Ollama directly through your code comments. No extra windows, no switching context—just write a comment, hit Enter, and let AI 🤖 do the rest! ✨

🟢 Code completion

ezgif.com-optimize__1_.gif

💬 Chat

ezgif.com-optimize__5_.gif

🖍 Edit

ezgif.com-optimize__7_.gif

➕ Add

2025-05-22_13-03-30-ezgif.com-optimize.gif

🧑‍💻 How to use:

  • Type "//gpt " (or "#gpt " "'gpt " etc.)
  • Type your prompt
  • Press Enter key

🧠 Keywords:

  • gpt => default (complete)
  • gptc => chat
  • gpte => edit
  • gptm => complete
  • gpta => add

🗂️ Supported languages/files:

  • Batch .bat ::
  • C# .cs .csx .aspx .razor .cshtml //
  • C .c .cc //
  • C++ .cpp .cxx .c++ .h .hh .hpp .hxx .h++ //
  • Cmake .cmake #
  • CoffeeScript .coffee .litcoffee #
  • F# .fs .fsi .fsx .fsscript //
  • Fortran .f .for .f90 !
  • Go .go //
  • Groovy .groovy .gvy .gy .gsh //
  • Html .html .htm <!--
  • Ini .ini ;
  • Java .java .class .jmod .jar //
  • JavaScript .js .cjs .mjs //
  • Less .less //
  • Lisp .lisp .lsp .l .cl .fasl ;
  • Lua .lua --
  • Make .mak .make #
  • Objective C .m .mmi //
  • Perl .pl .pm #
  • PHP .php .phtml .php3 .php4 .php5 .phps //
  • Python .py .pyi .pyc .pyd .pyo .pyw .pyz #
  • R .r .rdata .rds .rda #
  • Ruby .rb .rake #
  • Rust .rs .rlib //
  • Scheme .scm .ss ;
  • Shader .shader .compute .shadervariant .shadervariants .raytrace .hlsl .glsl .glfs .glvs .glgs .glinc .glslv .glslf .glsls .vert .tesc .tese .geom .frag .comp .vsh .fsh .gsh .tcsh .tesh //
  • ShellScript .sh .csh #
  • Sql .sql --
  • Swift .swift //
  • TypeScript .ts .tsx //
  • Visual Basic .vb .vbe .vbs '
  • Xml .xml <!--
  • YAML .yaml .yml #

✨ Additional Features:

  • 🌐 Proxy support: Can use proxies to connect to LLMs. (All platforms supported except Gemini & Vertex AI)
  • ☁️ Web/cloud services: Can use web and cloud services which have OpenAI API compatibility; such as OpenRouter, Open WebUI, LiteLLM etc.

📝 Requirements (OpenAI ChatGPT): You need an OpenAI account and provide it's API key to this extension https://platform.openai.com/account/api-keys

Provide key by one of the below 🔑

  • Create an environment variable called OPENAI_API_KEY with the API key
  • Create a file with name .openai under user profile directory with the API key
  • Set API key in options, Tools->Options->Comment2GPT->Authentication

📝 Requirements (Google Gemini): You need a Google account and provide it's API key to this extension https://ai.google.dev/gemini-api/docs/api-key

Provide key by one of the below 🔑

  • Create an environment variable called GOOGLE_API_KEY with the API key
  • Create a file with name .gemini under user profile directory with the API key
  • Set API key in options, Tools->Options->Comment2GPT->Authentication

📝 Requirements (Anthropic Claude): You need an Anthropic account and provide it's API key to this extension https://console.anthropic.com/settings/keys

Provide key by one of the below 🔑

  • Create an environment variable called ANTHROPIC_API_KEY with the API key
  • Create a file with name .anthropic under user profile directory with the API key
  • Set API key in options, Tools->Options->Comment2GPT->Authentication

📝 Requirements (DeepSeek): You need a DeepSeek account and provide it's API key to this extension https://platform.deepseek.com/api_keys

Provide key by one of the below 🔑

  • Create an environment variable called DEEPSEEK_API_KEY with the API key
  • Create a file with name .deepseek under user profile directory with the API key
  • Set API key in options, Tools->Options->Comment2GPT->Authentication

💲 Pricing: This extension is free to use, but you may need to pay for OpenAI, Google AI, Anthropic or DeepSeek services

  • https://openai.com/pricing
  • https://ai.google.dev/pricing
  • https://www.anthropic.com/pricing#anthropic-api
  • https://api-docs.deepseek.com/quick_start/pricing

🐞 Bug/error report & suggestions: Either use e-mail or Q&A here

📢 Notice: This extension may collect telemetry data about your use of the software for error tracking and usage metrics. Data is anonymous and telemetry can be disabled in the options if you have privacy concerns.

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