Google Workspace CLI

github.com

461 points by gonzalovargas 7 hours ago


fergie - 22 minutes ago

> gws doesn't ship a static list of commands. It reads Google's own Discovery Service at runtime and builds its entire command surface dynamically.

What is the practical difference between a "discovery service"+API and an MCP server? Surely humans and LLMs are better off using discovery service"+API in all cases? What would be the benefit of MCP?

tclancy - 5 hours ago

Interesting post from the main contributor about this (at least I assume it’s what he’s referencing) https://justin.poehnelt.com/posts/rewrite-your-cli-for-ai-ag...

mogili1 - an hour ago

I was excited to see this but all of that went away when I realized you need to create an app in GCP to use it. Can't really expect non technical users to set this up across the company.

virgildotcodes - 4 hours ago

God, getting this set up is frustrating. I've spent 45 minutes trying to get this to work, just following their defaults the whole way through.

Multiple errors and issues along the way, now I'm on `gws auth login`, and trying to pick the oAuth scopes. I go ahead and trust their defaults and select `recommended`, only to get a warning that this is too many scopes and may error out (then why is this the recommended setting??), and then yeah, it errors out when trying to authenticate in the browser.

The error tells me I need to verify my app, so I go to the app settings in my cloud console and try to verify and there's no streamlined way to do this. It seems the intended approach is for me to manually add, one by one, each of the 85 scopes that are on the "recommended" list, and then go through the actual verification.

Have the people that built and released this actually tried to install and run this, just a single time, purely following their own happy path?

betaby - 5 hours ago

I'm curious why `npm` is used to install a `rust` binary?

swaminarayan - 33 minutes ago

This reminds me a bit of how the GitHub CLI evolved into a foundation for automation and tooling. Do you see the Google Workspace CLI primarily as something for humans using the terminal, or more as a stable interface that automation and AI agents can build on?

pimlottc - 3 hours ago

> gws doesn't ship a static list of commands.

Clever, but frustrating that they don’t bother to provide any docs on the actual commands this supports.

internet2000 - 5 hours ago

Claude Opus 4.6 couldn't figure out how to use it to write to a Google Sheet (something to do with escaping the !?) and fell back to calling the sheets API directly with gcloud auth.

avaer - 6 hours ago

Is this basically a CLI version of [1]? If so, I'm glad Google is being forward thinking about how developers actually want to use their apps.

Better this than a Google dashboard, or slopped together third party libs. I know Google says they don't support it, but they'll probably support it better than someone outside of Google can support it.

[1] https://workspaceupdates.googleblog.com/2025/12/workspace-st...

benkaiser - 2 hours ago

Would be nice if the MCP implemented the Streamable HTTP MCP spec instead of the CLI one. I know this is already a HTTP API, but making it available as an MCP server that clients like Joey[1] can consume easily over network would be nice.

[1] https://github.com/benkaiser/joey-mcp-client

iosjunkie - 5 hours ago

Basically Google’s take on GAM https://github.com/GAM-team/GAM

tgma - 4 hours ago

"This is not an officially supported Google product."

Probably someone's hobby project or 20% time at best.

sbinnee - 6 hours ago

I can already see all the CTOs are getting excited to plug this in their OpenClaw instances.

_wizard - 2 hours ago

Neat. I've been running something very similar to this locally for a few months now. They introduced all their documentation into markdown recently. I still rely on discover API and lenient cloud project permissions, so maybe some gains there. Will compare note later.

jngiam1 - an hour ago

Honestly, easier with MCP straight up: https://gmail.mintmcp.com/ https://gcal.mintmcp.com/ https://gdocs.mintmcp.com/ https://gsheets.mintmcp.com/

(all pass through)

epicprogrammer - 5 hours ago

I've built a few internal tools using the Workspace APIs, and while they are powerful, the rate limits on the Drive API can be brutal if you are doing bulk operations. Does this repository handle automatic backoff and retries, or do we need to wrap it ourselves?

lewisjoe - 4 hours ago

How to expose my product suite's API to AI has been a roller coster ride. First it was tool calling hooks, then MCP, then later folks found out AI is better at coding so MCPs suddenly became code-mode, then people realized skills are better at context and eventually now Google has launched cli approach.

Remember this repo is not an agent. It's just a cli tool to operate over gsuite documents that happens to have an MCP command and a bunch of skills prebundled.

That's a new one. I guess the hope is agents are good at navigating cli and it also democratizes the ecosystem to be used by any agent as opposed to Microsoft (which only allows Copilot to work in its ecosystem)

drewda - 4 hours ago

While I prefer Google's productivity apps to the Microsoft world in this case Google is just catching up to the APIs and tooling that Microsoft has provided for a long time: https://learn.microsoft.com/en-us/powershell/microsoftgraph/...

sega_sai - 6 hours ago

Interesting, but scary, given that this is not a google product. Who knows whether that breaks any TOS somehow.

OpenWaygate - 5 hours ago

very similar to gogcli(https://github.com/steipete/gogcli), but in RUST

larodi - an hour ago

Would it help to backup all my mailboxes and be ready to ditch gmail?

outlore - 4 hours ago

Are integration vendors like Pipedream in trouble now that every company is pushing out MCP servers and CLIs to ride the AI craze? After the Twitter and Reddit API troubles of prior years, I can't imagine any company would willingly bring down the walls of their gardens and give easy access to precious user data. I'm waiting for the rug pull

shivam310 - an hour ago

I'm surprised that this didn't officially exist before.

cyrusradfar - 4 hours ago

Correct me if I'm wrong but the UX difficulty with the Google API ecosystem isn't resolved. It's the goddamn permissioning and service accounts. Great to have a CLI that every other minute says, "you can't do this" -- the CLI really needed to solve this to check my boxes.

mace01 - 5 hours ago

Seems weird to require another tool (gcloud) to set it up, but it does look to be tightly integrated with google cloud.

wonderfuly - 4 hours ago

Why cli instead of just HTTP API doc? The agent can use curl or write code to send requests.

ernsheong - an hour ago

Archived in 3… 2… 1…

skybrian - 6 hours ago

Having the available commands change on you dynamically seems like an anti-pattern, but I suppose an AI can deal with it.

arthurcolle - 2 hours ago

My agents will follow this repo with great interest

mmaunder - 5 hours ago

Forget the Gemini extension - Gemini CLI sucks. Forget the MCP - MCP is beyond dead. But for codex or claude cli this is a game changer. Next question is how programmatic have they made the sheets interface... because Gemini sucks at sheets.

loveparade - 5 hours ago

Great, i hope this becomes a trend now that agent skills want clis

hsaliak - 6 hours ago

GCP Next is Apr 22-24. Hope this continues to live afer that.

mmaunder - 5 hours ago

Google really know how to screw up a product experience.

npm install -g @googleworkspace/cli

gws auth setup

{ "error": { "code": 400, "message": "gcloud CLI not found. Install it from https://cloud.google.com/sdk/docs/install", "reason": "validationError" } }

Which takes you to...

https://docs.cloud.google.com/sdk/docs/install-sdk

Where you have to download a tarball, extract it and run a shell script.

I mean how hard is it to just imitate everyone else out there and make it a straight up npm install?

jitl - 4 hours ago

> quick setup

> requires setting up gcloud cli first, necessitates making a Google Cloud project

cmon google how come even your attempts at good ux start out with bad ux? let me just oauth with my regular google account like every other cli tool out there. gh cli, claude, codex - all are a simple “click ok” in the browser to log in. wtf.

and the slow setup - i need to make my own oauth app & keys??

EDIT: oh yeah and get my oath app verified all so i can use it with my own account

sciencesama - 5 hours ago

Would be useful if it can atleast show google drive storage in folder structure

- 6 hours ago
[deleted]
yakkomajuri - 5 hours ago

For all people have to say about Pete the openclaw guy he's been perhaps one of the most vocal voices about CLIs > MCPs (or maybe his is just the loudest?) and he also built a GSuite CLI that probably inspired this project.

I mean it's great that we get this, hopefully it can continue to be maintained and I'd love to see a push for similar stuff for other products and at other companies.

tedk-42 - 6 hours ago

Haha in the world of AI/MCPs, all of a sudden we have a push for companies to properly build out APIs/CLI tools.

pdyc - 5 hours ago

wow this will gel very well with my current project. Main hurdle i was facing was connecting with individual services via google oauth to get the data.

sjeiuhvdiidi - 44 minutes ago

Very uninteresting post. Why is this the number one post on Hacker News ? Honestly, absolutely disgusting and you can be ashamed, or ashamed for them.

evanjrowley - 6 hours ago

Hoping Apple will do the same with iCloud.

blondin - 6 hours ago

This is a very interesting way of building agent skills. Seems like the imperative way of orchestration/automation is making a comeback.

mosajjal - 4 hours ago

AI Agents are becoming first-class citizens for SaaS

bpiroman - 2 hours ago

written in Rust lol

tonymet - 5 hours ago

[flagged]

shubhamintech - 5 hours ago

[flagged]