Install Node.js
node --version in your terminal to check — you should see a version number like v22.x.x.- Windows
- macOS
- Go to nodejs.org
- Click the big green LTS button to download the installer
- Open the downloaded
.msifile - Click Next through all the screens — the default settings are fine
- Click Install, then Finish
How do I know it worked?
How do I know it worked?
v22.x.x. If you see an error, try closing and reopening your terminal, then run the command again.Install Gemini CLI
gemini in your terminal to check it still works.- Choose “Sign in with Google”
- A browser window will open — sign in with your Google account
- Come back to the terminal when it says you’re connected
'npm' is not recognised
'npm' is not recognised
Permission denied error
Permission denied error
sudo before the command:/quit to exit Gemini CLI for now. We will start it again after installing the Google Workspace tools.Install the Google Workspace CLI (gws)
gws is a command-line tool that controls all your Google apps — Gmail, Calendar, Drive, Docs, Sheets — from the terminal. It’s what lets AI manage your Google Workspace without opening a browser.Open your terminal and type:gws auth setup do? It creates a Google Cloud project for you, enables the APIs you need, and prepares everything for sign-in. It requires the gcloud CLI — if you don’t have it, see the troubleshooting section below.gws is working.gws is free and open-source. It connects to Google’s APIs using your own Google account — there are no usage limits beyond Google’s own API quotas.'gws' is not recognised
'gws' is not recognised
gws to your system PATH. Try closing your terminal completely and opening a new one, then run gws --version. If it still doesn’t work, try reinstalling:'gcloud' is not installed
'gcloud' is not installed
gws auth setup uses the gcloud CLI to automate project creation. You have two options:- Install gcloud from cloud.google.com/sdk/docs/install, then run
gws auth setupagain - Skip gcloud — set up OAuth credentials manually in the Google Cloud Console. Create a project, enable the APIs you need, create an OAuth Desktop App client, download the JSON, and save it to
~/.config/gws/client_secret.json. Then rungws auth login.
Permission denied error
Permission denied error
sudo before the command:API not enabled error
API not enabled error
- Look for the
enable_urllink in the error message - Open that link in your browser
- Click Enable
- Wait 10 seconds, then retry your command
gws auth setup again — it enables all required APIs automatically.'Access blocked' or 403 during login
'Access blocked' or 403 during login
gws auth login.Connect Gemini CLI to gws
gws, so when you give a natural language instruction, Gemini can read your Gmail, create calendar events, and write to Google Docs on your behalf.gws commands automatically. Instead of you typing gws calendar +insert ..., you can just say “Create a calendar event for Friday” and Gemini handles the rest.The command fails or hangs
The command fails or hangs
node --version first. If that works but the extension install fails, try closing and reopening your terminal, then running the command again.Install Wispr Flow (optional)
- Sign up at wisprflow.ai/r?CHAN115
- Download and install the app for your operating system
- Configure settings — enable these options for the best experience:
- Experimental > Command Mode — Enable advanced voice commands
- Press Enter Command — Automatically press enter when you say “press enter”
- Bulk Import — Import snippets and dictionary items
What is Wispr Flow?
What is Wispr Flow?
Test the connection
Gemini says it has no Gmail or Calendar tools
Gemini says it has no Gmail or Calendar tools
/quit) and restart Gemini CLI. You can check installed extensions with /extensions list.I see a permission or authentication error
I see a permission or authentication error
gws auth login -s gmail,calendar,drive,docs,sheets again to re-authorise. Then restart Gemini CLI.Verify your setup
Node.js installed
Node.js installed
node --version in your terminal. You should see a version number.Gemini CLI installed and signed in
Gemini CLI installed and signed in
gemini in your terminal. It starts up and shows a prompt where you can type.gws installed and signed in
gws installed and signed in
gws calendar +agenda in your terminal. You should see your upcoming calendar events.Gemini CLI extension installed
Gemini CLI extension installed
/extensions list inside Gemini CLI.Gmail and Calendar access working
Gmail and Calendar access working
Connection tested
Connection tested