Live data from Hacker News

Google Workspace CLI

github.com

41–50 of 316 posts

Re: Google Workspace CLI

#41
post #30
post #26

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

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?

Re: Google Workspace CLI

#42
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.

They aren't doing that though. At least not yet. It's generated from the discovery tool, which amounts to the spec of the existing API. If they want a high powered CLI they need to dig into the servers behind Google Workspace like they have when they've improved the web apps.

Re: Google Workspace CLI

#43
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.

Re: Google Workspace CLI

#44
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.

Re: Google Workspace CLI

#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.

Re: Google Workspace CLI

#46

Earlier quoted context omitted.

No package manager is. But of the ones that are installed by users, npm is probably the most popular.

What about pip? It's either installed or immediately available on many OSes

`pip install` either doesn’t work out of the box or has the chance to clobber system files though

Re: Google Workspace CLI

#47
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.

> The install script checks the OS and Arch, and pulls the right Rust binary.

That's the arbitrary code execution at install time aspect of npm that developers should be extra wary of in this day and age. Saner node package managers like pnpm ignore the build script and you have to explicitly approve it on a case-by-case basis.

That said, you can execute code with build.rs with cargo too. Cargo is just not a build artifact distribution mechanism.

Re: Google Workspace CLI

#48
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.

Re: Google Workspace CLI

#49
post #34

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...

Really interesting. I was thinking about something similar regarding the shape of code. I have no qualms recommending my agents take static analysis to the extreme, though it would cumbersome for most people.
Post reply on HN