Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Gemini CLI by Melhem ShokerNew to Visual Studio Code? Get it now.
Gemini CLI by Melhem Shoker

Gemini CLI by Melhem Shoker

Melhem Shoker

|
3 installs
| (0) | Free
Gemini chat in the VS Code sidebar - persistent agent, tool approvals, slash commands, @file context. Unofficial; not affiliated with Google.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Gemini CLI by Melhem Shoker

Unofficial. Not affiliated with, endorsed by, or sponsored by Google. "Gemini" is a trademark of Google LLC. This is an independent front-end for the open-source Gemini CLI.

A Gemini chat panel in the VS Code sidebar. It runs the Gemini CLI as a persistent agent over the Agent Client Protocol, so it streams reasoning, asks before touching your files, and answers in about a third of the time a fresh-process approach takes.

Setup

Nothing to configure by hand. Open the panel and it checks three things:

Node.js needed to run the CLI
Gemini CLI one click installs it via npm
API key one click, free from AI Studio

The key goes into VS Code Secret Storage - encrypted by the OS keychain, never written to a file in your project, never committed, never bundled. It is injected into the agent process as an environment variable at spawn time and nowhere else. An existing ~/.gemini/.env or a GEMINI_API_KEY environment variable is picked up automatically if you already have one.

Why it is fast

The obvious design spawns gemini -p "..." per message and pays process startup every time. This runs one gemini --acp process for the workspace instead:

spawn per message persistent agent
startup ~1.9s every message ~1.9s once
warm turn ~7.2s ~2.5s

Conversation context lives in the agent session, so follow-ups cost nothing extra to send.

What it does

  • Streams reasoning - a collapsible Thinking section, separate from the answer
  • Approval modes - Default / Auto Edit / YOLO / Plan (read-only), switchable live from the header without restarting the session
  • Inline permission prompts - in Default mode the agent asks before each tool, with Allow/Reject buttons and the exact file it wants
  • Slash commands - type / for the agent's own commands (memory, tools, and more)
  • @file context - type @ to fuzzy-search workspace files
  • Tool calls - live rows with a kind glyph, click to open the file
  • Editor-aware - the agent reads your unsaved buffer, not the version on disk
  • Custom tools - your own one-click prompt buttons
  • Transcript survives window reloads

Custom tools

geminiMS.customTools renders a button row. Four placeholders:

Placeholder Expands to
${selection} selected text, or the whole file if nothing is selected
${file} absolute path of the active file
${fileName} basename of the active file
${language} VS Code language id
"geminiMS.customTools": [
  { "label": "Arabic", "prompt": "Explain in Lebanese Arabic:\n\n${selection}" },
  { "label": "SQL",    "prompt": "Optimize this query:\n\n${selection}" }
]

Ships with Explain / Fix / Tests / Refactor / Review / Docs. The row refreshes on save.

Settings

Setting Default Purpose
geminiMS.approvalMode default starting mode for new sessions
geminiMS.includeActiveFile true prepend active file path + selected range
geminiMS.eagerStart true warm the agent when the panel opens
geminiMS.customTools 6 presets your prompt buttons
geminiMS.nodePath "" override the node executable
geminiMS.geminiJsPath "" override CLI auto-detection

Keyboard

Key
Ctrl+Shift+G focus the chat
Enter / Shift+Enter send / newline
Esc cancel the current turn
Up Down Tab navigate the / and @ popups

Commands

Gemini: Ask... / New Session / Cancel / Set API Key / Clear API Key / Install Gemini CLI / Settings

Releasing

Add a repository secret VSCE_PAT (an Azure DevOps token scoped to Marketplace > Manage), then:

npm version patch
git push --follow-tags

.github/workflows/publish.yml syntax-checks, verifies the tag matches package.json, packages, publishes, and attaches the .vsix to a GitHub Release.

Requirements

Node 20+ / @google/gemini-cli / a Gemini API key. The panel installs the last two for you.

MIT (c) Melhem Shoker

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