Most active commenters
  • wiseowise(4)
  • berkes(4)
  • koakuma-chan(3)

←back to thread

Gemini CLI

(blog.google)
1336 points sync | 29 comments | | HN request time: 1.516s | source | bottom
Show context
ZeroCool2u ◴[] No.44377226[source]
Ugh, I really wish this had been written in Go or Rust. Just something that produces a single binary executable and doesn't require you to install a runtime like Node.
replies(12): >>44377273 #>>44377286 #>>44377337 #>>44377341 #>>44377366 #>>44377649 #>>44377914 #>>44378962 #>>44380417 #>>44382222 #>>44384234 #>>44384426 #
1. qsort ◴[] No.44377341[source]
Projects like this have to update frequently, having a mechanism like npm or pip or whatever to automatically handle that is probably easier. It's not like the program is doing heavy lifting anyway, unless you're committing outright programming felonies there shouldn't be any issues on modern hardware.

It's the only argument I can think of, something like Go would be goated for this use case in principle.

replies(6): >>44377541 #>>44377941 #>>44378149 #>>44378557 #>>44382533 #>>44382571 #
2. ZeroCool2u ◴[] No.44377541[source]
I feel like Cargo or Go Modules can absolutely do the same thing as the mess of build scripts they have in this repo perfectly well and arguably better.
3. koakuma-chan ◴[] No.44377941[source]
If you use Node.js your program is automatically too slow for a CLI, no matter what it actually does.
replies(2): >>44382334 #>>44384751 #
4. masklinn ◴[] No.44378149[source]
> having a mechanism like npm or pip or whatever to automatically handle that is probably easier

Re-running `cargo install <crate>` will do that. Or install `cargo-update`, then you can bulk update everything.

And it works hella better than using pip in a global python install (you really want pipx/uvx if you're installing python utilities globally).

IIRC you can install Go stuff with `go install`, dunno if you can update via that tho.

replies(3): >>44378315 #>>44378861 #>>44385984 #
5. StochasticLi ◴[] No.44378315[source]
This whole thread is a great example of the developer vs. user convenience trade-off.

A single, pre-compiled binary is convenient for the user's first install only.

replies(4): >>44378569 #>>44378838 #>>44378969 #>>44385939 #
6. mpeg ◴[] No.44378557[source]
You'd think that, but a globally installed npm package is annoying to update, as you have to do it manually and I very rarely need to update other npm global packages so at least personally I always forget to do it.
replies(1): >>44383270 #
7. masklinn ◴[] No.44378569{3}[source]
Unless you build self-updating in, which Google certainly has experience in, in part to avoid clients lagging behind. Because aside from being a hindrance (refusing to start and telling the client to update) there's no way you can actually force them to run an upgrade command.
8. MobiusHorizons ◴[] No.44378838{3}[source]
How so? Doesn’t it also make updates pretty easy? Have the precompiled binary know how to download the new version. Sure there are considerations for backing up the old version, but it’s not much work, and frees you up from being tied to one specific ecosystem
replies(1): >>44384739 #
9. re-thc ◴[] No.44378861[source]
> Re-running `cargo install <crate>` will do that. Or install `cargo-update`, then you can bulk update everything.

How many developers have npm installed vs cargo? Many won't even know what cargo is.

replies(1): >>44381362 #
10. JimDabell ◴[] No.44378969{3}[source]
I don’t think that’s true. For instance, uv is a single, pre-compiled binary, and I can just run `uv self update` to update it to the latest version.
replies(1): >>44384730 #
11. riskable ◴[] No.44381362{3}[source]
Everyone in the cult knows what cargo is.
12. frollogaston ◴[] No.44382334[source]
So are you saying the Gemini CLI is too slow, and Rust would remedy that?
replies(1): >>44383509 #
13. frollogaston ◴[] No.44382533[source]
I don't think that's the main reason. Just installed this and peaked in node_nodules. There are a lot of random deps, probably for the various local capabilities, and it was probably easier to find those libs in the Node ecosystem than elsewhere.

Also, react-reconciler caught my eye. Apparently that's a dependency of ink, which lets you write text-based UIs in React.

That and opentelemetry, whatever the heck that is

14. js2 ◴[] No.44382571[source]
Build updating into the tool. e.g.

  uv self update
  yt-dlp --update
etc.
15. drewbitt ◴[] No.44383270[source]
I used to also have outdated versions until I used mise. `mise use -g npm:@google/gemini-cli` and now `mise up` will update it. cargo, pip etc too.
16. koakuma-chan ◴[] No.44383509{3}[source]
Yes
17. wiseowise ◴[] No.44384730{4}[source]
I literally wouldn’t use uv if it weren’t available via pip.

Reasoning: it’s a Python tool, therefore it shouldn’t require anything (any 3rd party package manager) beyond Python.

replies(1): >>44385275 #
18. wiseowise ◴[] No.44384739{4}[source]
No, it doesn’t. At work everything is locked down and you either need to have separate mechanism to deliver updates or use pip.
replies(1): >>44385949 #
19. wiseowise ◴[] No.44384751[source]
If you even sneeze into performance discussion without providing benchmarks first – you’re a tool.
replies(1): >>44386928 #
20. JimDabell ◴[] No.44385275{5}[source]
It’s a standalone binary. It doesn’t require anything at all. It’s literally just one file you can put anywhere you like. It doesn’t need a third-party package manager.
replies(1): >>44385642 #
21. wiseowise ◴[] No.44385642{6}[source]
Sure it does. When you download it manually you become that package manager.
22. berkes ◴[] No.44385939{3}[source]
> A single, pre-compiled binary is convenient for the user's first install only.

Its not.

Its convenient for CIs, for deployment, for packaging, for running multiple versions. It's extremely simple to update (just replace the binary with another one).

Now, e.g. "just replacing one file with another" may not have convenience commands like "npm update". But its not hard.

My point is that a pre-compiled binary is extremely more convenient for *everyone involved in the delivery pipeline* including the end-user. Especially for delivering updates.

As someone who's packaged Javascript(node), Ruby, Go and rust tools in .debs, snap, rpms: packaging against a dynamic runtime (node, ruby, rvm etc) is a giant PIAS that will break on a significant amount of users' machines, and will probably break on everyones machine at some point. Whereas packaging that binary is as simple as it can get: most such packages need only one dependency that everyone and his dog already has: libc.

replies(1): >>44388719 #
23. berkes ◴[] No.44385949{5}[source]
That's not an argument against the difficulty of "updating a binary file" vs "updating via pip", it's merely addressing what your work deems important and possible.

(Aside from the fact that allowing "use pip" completely defeats the purpose of any other of these mechanisms, so it's a poster-child example of security-theater)

24. berkes ◴[] No.44385984[source]
Not even "cargo install" is needed.

Just `wget -O ~/.local/bin/gemini-cli https://ci.example.com/assets/latest/gemini-cli` (Or the CURL version thereof) It can pick the file off github, some CI's assets, a package repo, a simple FTP server, an HTTP fileserver, over SSH, from a local cache, etc. It's so simple that one doesn't need a package manager. So there commonly is no package manager.

Yet in this tread people are complaining that "a single binary" is hard to manage/update/install because there's no package manager to do that with. It's not there, because the manage/update/install is so simple, that you don't need a package manager!

replies(1): >>44386040 #
25. owebmaster ◴[] No.44386040{3}[source]
> is so simple, that you don't need a package manager!

You might not know the reason ppl use package managers. Installing this "simple" way make it quite difficult to update and remove compared to using package managers. And although they are also "simple", it's quite a mess to manage packages manually in place of using such battle-tested systems

replies(1): >>44387444 #
26. koakuma-chan ◴[] No.44386928{3}[source]
You don't have to believe me if you don't want to. But I strongly advise everyone who still uses prettier to try a formatter written in Rust, for example dprint. It's a world of difference.
27. berkes ◴[] No.44387444{4}[source]
> You might not know the reason ppl use package managers.

People use package managers for the following:

- to manage dependencies - to update stuff to a specific version or the latest version - to downgrade stuff - to install stuff - to remove stuff

any of these, except for the dependency management, are a single command, or easy to do manually, with a single compiled binary. They are so simple that they can easily be built into the tool. Or handled by your OSs package manager. Or with a "shell script" that the vendor can provide (instead of, or next to, the precompiled binary.

I did not say manually, you infer that. But I never meant that. The contrary: because it's so simple, automating that, or have your distro, OS or package manager do this for you, is trivial. As opposed to that awful "curl example.com/install.sh | sudo tee -" or those horrible built-in updaters (that always start nagging when I open the app - the one moment that I don't want to be bothered by updates because I need the app now)

The only reason one would then need a package manager is to manage dependencies. But a precompiled binary like Go's or Rusts typically are statically compiled so they have no (or at most one) dependency.

Imagine the ease of a single ".targz" or so that includes the correct python version, all pips, all ENV vars, config files, and is executable. If you distribute that - what do you still need pip for? If you distribute that, how simple would turning it into a .deb, snap, dmg, flatpack, appimg, brew package, etc be? (Answer: a lot easier than doing this for the "directory of .py files. A LOT)

replies(1): >>44388623 #
28. skydhash ◴[] No.44388623{5}[source]
> Imagine the ease of a single ".targz" or so that includes the correct python version, all pips, all ENV vars, config files, and is executable. If you distribute that - what do you still need pip for?

pip is there so you don't need to do that. In the deployment world, you really want one version per system for everything and know that everything is in sync. To get that the solution was a distribution of software and a tool to manage them. We then extended that to programming language ecosystem and pip is part of the result.

But for workstation, a lot of people wants the latest, so the next solution was to be able to abstract the programming language ecosystem from the distribution (And you may not have a choice in the case of macOS), so what we get is directory-restricted interactions (go, npm,..) or doing shell magic so that the tooling think it's the system (virtual env,...).

It's a neat trick, but the only reason to do so is if you want to distribute compiled version of a software to customer. But if the user have access to the code, It's better to adapt the software to the system (repositories, flatpak...) or build a system around it (VM, containers, ...).

29. skydhash ◴[] No.44388719{4}[source]
> My point is that a pre-compiled binary is extremely more convenient for everyone involved in the delivery pipeline* including the end-user. Especially for delivering updates.*

The easiest is running "sudo apt update && sudo apt upgrade" and have my whole system updated. Instead of writing some script to get it done from some github's releases page and hoping that it's not hijacked.

Having a sensible project is what make it easy down the line (including not depending on gnu libc if not needed as some people uses musl). And I believe it's easy to setup a repository if your code is proprietary (Just need to support the most likely distribution, like ubuntu, fedora, suse's tumbleweed,...)