Installation, Google Sign-In, Terminal Q&A, Model Selection, and Piped Data Automation
0% (0/14)
Lesson 1Step S01
Verify Node.js & npm Runtime
Google Gemini CLI is distributed as a global npm package requiring Node.js 18+.
Verify that Node.js and npm are installed and available in your terminal path.
(Missing Node? Windows: winget install OpenJS.NodeJS.LTS · macOS: brew install node · Linux: sudo apt install -y nodejs npm)
Lesson 1Step S02
Inspect npm Global Prefix & Shell PATH
Inspect your global npm binary prefix. Confirm that npm's global bin directory is registered in your PATH
so the gemini command is recognized immediately after installation.
Lesson 2Step S03
Install @google/gemini-cli via npm
Install the official Google Gemini CLI globally via npm. This registers the gemini binary
executable on your machine for both interactive and scripted terminal usage.
Lesson 2Step S04
Verify gemini Binary & Version
Confirm that the gemini command runs without errors and prints a valid semantic version string.
Lesson 3Step S05
Interactive Google Browser Sign-In
Authenticate your CLI with your Google account. Run gemini auth login to launch your browser,
sign in with any Google account (@gmail.com or Workspace), and authorize developer access.
Lesson 3Step S06
Configure Headless GEMINI_API_KEY (Optional)
For headless Linux servers, Docker containers, or CI/CD pipelines, configure your API key from Google AI Studio.
(Optional for workstation users: if you completed Step S05 browser login, you can proceed directly to S07.)
Lesson 3Step S07
Verify Authentication & Quotas
Confirm your authentication status and review active developer tier quota and model permissions.
Lesson 4Step S08
Interactive Terminal Chat Session
Launch interactive chat mode by running gemini without arguments. Ask questions, explore code snippets,
and type /exit when finished.
Lesson 4Step S09
Execute Single-Shot Prompts
Run non-interactive prompts directly from terminal arguments. Gemini streams the response to stdout and returns
to your prompt, making it suitable for quick explanations and build automation.
Lesson 4Step S10
Pipe STDIN into gemini
Pipe files, error logs, or git diffs directly into Gemini via standard input for immediate code analysis and debugging.
Lesson 5Step S11
Switch Models (Pro vs Flash)
Toggle between gemini-1.5-flash (low latency, high velocity) and gemini-1.5-pro
(deep reasoning, complex architecture) using the --model flag.
Lesson 5Step S12
Run Reversible Test in Sandbox
Practice running file transformations in a disposable directory (gemini-sandbox), verifying that output
generates properly, and cleanly deleting the sandbox directory afterward.
Lesson 6Step S13
Command Flags & Built-In Help
Inspect all supported CLI options including --json, --model, and system prompt flags using
gemini --help.
Lesson 6Step S14
Run It Later Reference Card
Save high-velocity commands for your daily terminal workflow. Bookmark this reference card for everyday use.
Terminal Command
node -v; npm -v
Verification Checkpoint
Confirm Node.js (v18+) and npm version outputs before continuing.
Frequently Asked Questions
🚀 'Run It Later' Quick Reference Card
Essential Google Gemini CLI commands for daily developer workflows:
geminiLaunch interactive terminal chat session
gemini "prompt"Execute single-shot prompt in print mode
cat file | gemini "review"Pipe file contents into Gemini on STDIN
gemini --model gemini-1.5-proSelect Gemini 1.5 Pro for deep reasoning
gemini auth statusVerify active Google login and quota tier
gemini --helpDisplay full list of command flags and options
BuildBotsBetter's original characters, character designs, artwork, logos, graphics, scripts, animations, and original productions are owned by BuildBotsBetter or their respective rights holders, to the extent applicable. These materials are protected by copyright, trademark, and other applicable intellectual property laws, to the extent such protection is available under applicable law. No permission is granted to use BuildBotsBetter-owned materials in a manner that infringes applicable rights, except as permitted by law. Third-party footage, trademarks, and other materials remain subject to their respective owners' rights and applicable license terms. Attribution does not imply ownership, endorsement, or permission to reuse third-party content.