Installing Gemini CLI requires Node.js version 18 or higher as a prerequisite. Once you have Node.js installed, you have two primary installation options. The quickest way to get started is by running npx https://github.com/google-gemini/gemini-cli
directly in your terminal, which will execute the CLI without requiring a permanent installation. This approach is ideal for testing the tool or occasional use, as it downloads and runs the latest version each time you invoke it.
For regular use, you can install Gemini CLI globally using npm with the command npm install -g @google/gemini-cli
. This installation method makes the gemini
command available from any directory on your system, allowing you to navigate to your project folders and immediately start using the CLI. After installation, you’ll need to authenticate with your Google account when you first run the command. The authentication process involves signing in with your personal Google account, which grants you access to up to 60 model requests per minute and 1,000 model requests per day using Gemini 2.5 Pro.
The installation process includes selecting a color theme for your CLI interface to personalize your experience. Once authentication is complete, you can start using Gemini CLI by navigating to any project directory and running the gemini
command. For users who need higher request limits or want to use specific models, you can generate an API key from Google AI Studio and set it as an environment variable using export GEMINI_API_KEY="YOUR_API_KEY"
. Other authentication methods are available for Google Workspace accounts and enterprise users, which are documented in the authentication guide. The tool works on macOS, Windows, and Linux, making it accessible across all major development platforms.