Overview
The Google Workspace CLI can be installed as an extension for the Gemini CLI, giving your Gemini agent direct access to allgws commands and Google Workspace agent skills.
Installation
Step 1: Authenticate the CLI
Before installing the extension, authenticate thegws CLI:
Step 2: Install the Extension
Install the extension into the Gemini CLI:gemini-extension.json configuration from the repository and registers the extension with Gemini.
Authentication Inheritance
The Gemini CLI extension automatically inherits yourgws CLI credentials. You don’t need to configure authentication separately for the extension.
Because gws handles its own authentication securely:
- You authenticate your terminal once using
gws auth setuporgws auth login - Credentials are encrypted at rest (AES-256-GCM) with the key stored in your OS keyring
- The extension reads these credentials when invoked by Gemini
- Your Gemini agent can execute
gwscommands without additional auth setup
Use Cases
Once installed, your Gemini agent can:Manage Google Drive Files
Automate Gmail
Schedule Calendar Events
Work with Sheets and Docs
Multi-Service Workflows
Extension Configuration
The extension is defined bygemini-extension.json in the repository:
CONTEXT.md file provides instructions to the Gemini agent on how to use the CLI effectively.
Updating the Extension
To update the extension to the latest version:Next Steps
- Agent Skills - Browse and install 100+ agent skills
- MCP Server - Use the CLI with other MCP-compatible clients
- Authentication - Learn more about auth workflows