The following steps are required to install and configure the Gemini CLI:
environmental preparation
- Make sure Node.js is installed (version 18 or above).
- You can download and install the latest version from the Node.js website.
Installation
- Run it through npx: Execute the
npx https://github.com/google-gemini/gemini-cli - global installation: Implementation
npm install -g @google/gemini-cli
Authentication Configuration
- Personal Google Account: After running gemini, the system will lead to logging into your Google account for authentication.
- API key: Generate keys from Google AI Studio, set environment variables in terminal
export GEMINI_API_KEY="YOUR_API_KEY"
After the installation is complete, rungeminiYou can enter the interactive mode, and will be prompted to choose a color theme when you run it for the first time.
This answer comes from the articleGemini CLI: Google's open source command-line AI programming toolThe































