Install the Gemini CLI
getting started
// what it does
The package is @google/gemini-cli and it installs a single binary named gemini. npm install -g puts it on your PATH system-wide; brew install gemini-cli is the Homebrew formula on macOS and Linux; npx @google/gemini-cli runs the latest release once with no global install. All three need Node.js 20 or newer.
// shell
$ npm install -g @google/gemini-cli$ brew install gemini-cli$ gemini --version// gotcha
On Node 18 or older the install may succeed but the CLI crashes at startup — check with node --version first, and use nvm to upgrade if needed. The Homebrew formula is community-maintained and often trails the npm release, so npm is the fastest path to the newest version.