Skip to content

chenzhigang00/vscode-gemini

Repository files navigation

Gemini Sidebar Extension

A VS Code extension that runs Gemini CLI directly inside a sidebar terminal view with real TUI support.

Features

  • Activity Bar icon: Gemini
  • Sidebar view with embedded terminal (xterm.js)
  • Real PTY backend (node-pty) for interactive CLI behavior
  • Command Palette commands:
    • Gemini: Open CLI
    • Gemini: Restart CLI

Settings

  • geminiSidebar.command (default: gemini)
  • geminiSidebar.autoStartOnOpen (default: true)
  • geminiSidebar.shellPath (default: empty)
  • geminiSidebar.shellArgs (default: [])
  • geminiSidebar.extraEnv (default: {})

Linux notes

  • The extension now falls back through common Linux shells ($SHELL, bash, zsh, sh) when VS Code does not expose a shell path.
  • If gemini works in your normal terminal but not inside the sidebar, set geminiSidebar.shellPath to your login shell and use geminiSidebar.extraEnv to pass missing variables such as PATH, GEMINI_API_KEY, or proxy settings.
  • node-pty is a native dependency. On Linux, if install/build fails, make sure your system has the usual native build toolchain for Node addons.

Run locally

npm install
npm run compile

Then press F5 in VS Code to start Extension Development Host.

Package and publish

This extension uses node-pty, so publish platform-specific builds instead of a single generic VSIX.

Local packaging:

npm install
npm run vsix:linux-x64
npm run vsix:win32-x64

Manual publish from a machine authenticated to the Visual Studio Marketplace:

npx @vscode/vsce login zhigang
npm run publish:linux-x64
npm run publish:win32-x64

GitHub Actions publish:

  1. Create a Visual Studio Marketplace publisher whose ID matches the publisher field in package.json.
  2. Create a Personal Access Token in the Marketplace with the publish/manage scope.
  3. Add that token to the GitHub repository as the secret VSCE_PAT.
  4. Run the Publish VS Code Extension workflow, or publish a GitHub Release.

The workflow publishes:

  • linux-x64 from ubuntu-latest
  • win32-x64 from windows-latest

About

VS Code Gemini sidebar extension with PTY + xterm TUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors