Live data from Hacker News

Google Workspace CLI

github.com

51–60 of 316 posts

Re: Google Workspace CLI

#51
post #30

Earlier quoted context omitted.

I found that strange as well. My guess is that `npm` is just the package manager people are most likely to already have installed and doing it this way makes it easy. They might think asking people to install Cargo is too much effort. Wonder if the pattern of using npm to install non-node tools will keep gaining traction.

Why not just downloadable binary then?

For many, installing something with npm is still easier. It chooses the right binary for your OS/architecture, puts it on your PATH, and streamlines upgrades.

Their Github releases provides the binaries, as well as a `curl ... | sh` install method and a guide to use github releases attestation which I liked.

Re: Google Workspace CLI

#53
post #45
post #26

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

They're not doing so here, but shipping a wasm-compiled binary with npm that uses node's WASI API is a really easy way to ship a cross-platform CLI utility. Just needs ~20 lines of JS wrapping it to set up the args and file system.

Doesn’t this seem excessive over just using rust’s cross platform builds?

Re: Google Workspace CLI

#54
post #5

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

I have always said that if we had done for developers what we are doing for agents the whole world would have been a much better place.

Perhaps we will finally emerge from this decades-long dark age of bloated, do-everything GUI development tools being the fashionable happy path.

Re: Google Workspace CLI

#56
post #26

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

NPM as a cross platform package distribution system works really well. The install script checks the OS and Arch, and pulls the right Rust binary. Then, they get upgrade mechanism out of the box too, and an uninstall mechanism. NPM has become the de facto standard for installing any software these days, because it is present on every OS.

Yeah except you need to install NPM, whereas with a rust binary, which can easily compile cross platform, you don’t.

Honestly I’m shocked to see so many people supporting this

Re: Google Workspace CLI

#57
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?

Re: Google Workspace CLI

#59
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?
Post reply on HN