Gemini CLI and Code Assist: setup in VS Code
Learn two ways to use Gemini in VS Code, including Google sign-in, CLI folder trust prompts, and an HTML/CSS cat portfolio example.
Player not loading? Watch on YouTube
This beginner tutorial covers two ways to use Gemini as a coding assistant in VS Code: the Gemini Code Assist extension and Gemini CLI in the integrated terminal. The demonstrated workflows use browser authentication with a Google account. The tutorial does not demonstrate running a model locally or offline inference.
The extension walkthrough starts in the Extensions panel, where the presenter searches for Gemini Code Assist, installs it and accepts the publisher trust prompt. After opening a project folder, the presenter signs in through the browser, returns to the chat panel and enables agent mode. Typing a slash exposes the available commands.
For the terminal route, the presenter copies an npm installation command from geminicli.com, launches Gemini and accepts prompts to trust the folder and connect the CLI to VS Code. The sign-in menu lists Google authentication, a Gemini API key and Vertex AI; the demonstration uses Google and then restarts the CLI.
The example asks Gemini to build a cat portfolio website with HTML and CSS. The presenter allows actions for the session and enables automatic edit acceptance, then opens the generated index.html. The tutorial ends by moving the extension's chat panel to the secondary sidebar.