Skip to content

Google Workspace CLI

by Google WorkspaceCLI toolGet organised

Lets you and your AI agent work with Gmail, Drive, Calendar and Sheets from the terminal

View on GitHub

About Google Workspace CLI

Google Workspace CLI (gws) is a command-line tool that reaches Drive, Gmail, Calendar, Sheets, Docs and Chat from the terminal and returns structured JSON, for people and AI agents.

For Terminal usersDevelopersAI agent users

Made by Google Workspace

Published by the googleworkspace organization on GitHub under Apache-2.0. Its README says it is not an officially supported Google product and is under active development.

Stars
★ 32k
License
Apache-2.0
Cost
Free
Platforms
Mac · Win · Linux
Level
Advanced

Overview

Google Workspace CLI, called gws, is one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat and other Workspace services. It reads Google's own API listing when it runs, so new Workspace features appear without an update, and every answer comes back as structured JSON that an AI agent can read. The repository also includes ready-made agent skills. It suits people who are comfortable in a terminal and willing to set up a Google Cloud project for sign-in.

One tool reaches every Workspace service, and it can preview a request with --dry-run before anything is sent.

Try these first

Start with the first one: it is a small task you can check easily.

  1. List my five most recent Drive files by name. Don't change anything.First try · read-only

  2. Show me the request and response fields of the Drive files list method.read-only

  3. Preview sending the message "Deploy complete." to a Chat space with --dry-run, without posting it.dry run

  4. Create a spreadsheet titled Q1 Budget.writes to Google

Example prompts written by Agent Flows Hub.

Features

From the creator's documentation.

FeatureWhat it doesRuns
Many servicesDrive, Gmail, Calendar, Sheets, Docs, Chat and Admin from one toolGoogle APIs
Structured JSONEvery response comes back as JSON that an agent or script can readYour computer
Dry runPreviews a request with --dry-run before it is sentYour computer
Always currentBuilds its commands from Google's API listing when it runsGoogle APIs
Agent skillsThe repository includes agent skills for common Workspace jobsYour agent
Sign-in optionsDesktop login, a service account, or a token you already haveYour Google account

Good to know

Work with Drive, Gmail, Calendar or Sheets from the terminal, or give an AI agent a single tool that returns structured JSON. After a one-time sign-in you list files, create a spreadsheet or preview a request before it is sent.

Limits

  • Sign-in needs a Google Cloud project and an OAuth client; the README says gws auth setup uses the gcloud tool, and an app in testing mode limits the scopes you can pick.
  • The README says this is not an officially supported Google product and that breaking changes are expected before v1.0.

Notes by (original project name: gws (Google Workspace CLI)), written from the creator's documentation, not from running it ourselves. Google Workspace CLI README

Stuck setting it up?

Tell us what happened. We take a look first; if it needs paid work, you get an estimate before anything starts.

Get help

Other cli tools

  • Graphify Maps a codebase and its docs into a knowledge graph you can ask questions of
  • Herdr Terminal Keeps coding agents running in terminal panes and shows which one is waiting for you
  • Horizon Turns the news sources you follow into a ranked daily briefing in English or Chinese
  • LLM Lets you ask many AI models questions from the terminal and keeps a log of every answer
  • llmfit Shows which AI models your computer can run, ranked by fit, speed and quality
  • MarkItDown Converts PDFs, Word, Excel, PowerPoint and more into Markdown text an AI can read

See all 29 cli tools

GitHub