System Requirements
Before installing Gemini CLI, ensure your system meets the following requirements:Operating System
- macOS 15+
- Windows 11 24H2+
- Ubuntu 20.04+
Runtime & Tools
- Node.js 20.0.0+
- Bash, Zsh, or PowerShell
- Internet connection required
Recommended Hardware
- Casual Usage
- Power Usage
4GB+ RAMSuitable for:
- Short sessions
- Common tasks and edits
- Basic code analysis
Cloud Users: Gemini CLI comes pre-installed on Cloud Shell and Cloud Workstations.
Installation Methods
Choose the installation method that best fits your environment:Install with npm (Recommended)
The standard method to install Gemini CLI globally:Install with Homebrew (macOS/Linux)
If you prefer using Homebrew:Install with MacPorts (macOS)
For MacPorts users:Install with Anaconda (Restricted Environments)
Ideal for environments with restricted package managers:Running Gemini CLI
After installation, you can run Gemini CLI using several methods:Standard Usage
Simply run thegemini command:
Run with npx (No Installation)
You can run Gemini CLI without permanent installation:Run in a Sandbox (Docker/Podman)
For security and isolation, run Gemini CLI inside a container:Sandbox mode is the default way that the CLI executes tools that might have side effects, providing an extra layer of security.
Run from Source (Contributors)
If you’re contributing to Gemini CLI, you can run it directly from source:- Development Mode
- Production-like Mode
Provides hot-reloading for active development:
Release Channels
Gemini CLI offers three release channels to suit different needs:Stable (Recommended)
New stable releases are published weekly. This is the default and recommended channel:Stable releases are promoted from the previous week’s preview release along with any bug fixes.
Preview
Test upcoming features before they reach stable. Published weekly but may contain issues:Nightly
Get the latest changes from the main branch. Published daily:Non-Interactive Mode (Scripting)
Gemini CLI can be used in automated workflows and scripts:Verifying Installation
After installation, verify everything is working:Troubleshooting
Node.js version too old
Node.js version too old
Gemini CLI requires Node.js 20.0.0 or higher. Update Node.js:
Permission denied on npm install
Permission denied on npm install
If you get permission errors, try:
Command not found after installation
Command not found after installation
Make sure your PATH includes the npm global bin directory:
Next Steps
Set Up Authentication
Configure OAuth, API key, or Vertex AI authentication
Quick Start Guide
Get to your first working command in minutes