Skip to content

How to Integrate Gemini with VS Code

Set up Gemini CLI integration with Visual Studio Code for seamless AI-assisted development directly in your editor environment.

  1. 1

    Install the Gemini VS Code Extension

    Open the VS Code Extensions panel and search for 'Gemini CLI'. Install the official extension to enable inline AI assistance, chat panels, and command palette integration.

  2. 2

    Configure Extension Settings

    Open VS Code settings and navigate to the Gemini section. Set your API key, preferred model, and workspace-specific configurations like skill directories.

  3. 3

    Use Inline Completions

    With the extension active, Gemini provides context-aware code completions as you type. Accept suggestions with Tab or cycle through alternatives with keyboard shortcuts.

  4. 4

    Access the Chat Panel

    Open the Gemini chat panel from the sidebar to have conversations about your code. Select code in the editor and ask questions about it directly in the chat.

  5. 5

    Run Skills from the Command Palette

    Press Ctrl+Shift+P and type 'Gemini' to see available skill commands. Run any configured skill directly from VS Code without switching to the terminal.

  6. 6

    Set Up Keyboard Shortcuts

    Bind frequently used Gemini actions to keyboard shortcuts for faster access. Common bindings include code explanation, refactoring suggestions, and test generation.