A comprehensive training course for mastering Google Gemini CLI - the open-source AI agent that brings Gemini directly into your terminal.
This 5-hour hands-on workshop covers everything from basic installation to advanced MCP configurations, custom commands, and enterprise workflows.
- Installation & Setup: Authentication strategies, environment configuration
- Core Commands: Interactive mode, one-shot prompts, file references
- Context Management: GEMINI.md files, hierarchical context loading
- Safety & Control: Sandbox modes, approval policies, checkpointing
- Advanced Features: MCP integration, extensions, custom commands
- Practical Skills: Real-world exercises in Python, JavaScript, and Java
- Node.js 18+ installed
- Command-line experience
- Basic programming knowledge in at least one language
- Git familiarity
- Docker (optional, for sandbox mode)
- Google account for API access
gemini-training/
├── slides.md # Slidev presentation
├── lab_handout.md # Progressive hands-on labs
├── exercises/ # Hands-on lab projects
│ ├── python/ # Python projects
│ │ └── weather-app/ # Flask weather application
│ ├── javascript/ # JavaScript/TypeScript projects
│ │ └── task-manager/ # Node.js task manager
│ └── java/ # Java projects
│ └── bookstore-api/ # Spring Boot REST API
├── config-examples/ # Sample configurations
│ ├── settings-basic.json # Starter settings
│ ├── settings-advanced.json # Full-featured settings
│ ├── settings-safe.json # Safety-focused settings
│ └── settings-mcp.json # MCP-focused settings
├── gemini-md-examples/ # GEMINI.md templates
│ ├── python-flask.md # Python Flask template
│ ├── java-spring.md # Spring Boot template
│ └── javascript-react.md # React project template
└── commands/ # Custom command examples
├── review.toml # Code review command
└── test-gen.toml # Test generation command
# Via npm (recommended)
npm install -g @google/gemini-cli
# Verify installation
gemini --version# Set API key (get from https://aistudio.google.com/apikey)
export GEMINI_API_KEY="your-api-key"
# Or add to ~/.gemini/.env
echo 'GEMINI_API_KEY=your-api-key' >> ~/.gemini/.envgemini "Hello! What can you help me with?"# Clone this repository
git clone https://github.com/kousen/gemini-training
cd gemini-training
# Install dependencies for slides
npm install
# Start the presentation
npm run dev
# Open browser to http://localhost:3030| Section | Duration |
|---|---|
| Introduction & Setup | 10 min |
| Installation & Prerequisites | 15 min |
| Authentication & Account Setup | 10 min |
| First Steps & Basic Interface | 15 min |
| Core Commands & Functionality | 65 min |
| Configuration & Customization | 65 min |
| Advanced Features & Extensions | 65 min |
| Practical Applications & Workflows | 45 min |
| Wrap-up & Q&A | 15 min |
- Interactive REPL and one-shot modes
- File references with
@syntax - Shell integration with
!prefix - Sandbox mode for safe execution
- YOLO mode for autonomous operation
- GEMINI.md context files (hierarchical)
- settings.json customization
- Environment variables
- Custom commands
- Model Context Protocol (MCP) servers
- Extensions system
- Agent Skills
- Session management and checkpointing
- IDE integration (VS Code)
- Agent Skills stable and default-on; SDK +
SessionContext(0.30) - Policy Engine replaces
--allowed-tools/tools.exclude(0.30) - Gemini 3.1 Pro Preview available via
/model(0.31) - Workspace model steering + parallel extension loading (0.32)
- A2A remote agents over authenticated HTTP (0.33)
- Plan Mode is default-on; gVisor/LXC sandboxing on Linux (0.34)
- Multi-registry MCP/extensions, native macOS Seatbelt, Windows sandboxing, Git worktrees (0.36)
Ctrl+GreplacesCtrl+Xfor external editor; persistent policy approvals (0.37)
- Start in Default Mode: Get comfortable before enabling YOLO mode
- Use GEMINI.md: Provide context for better, more consistent results
- Enable Checkpointing: Save snapshots before risky operations
- Review Generated Code: Always verify AI-generated changes
- Leverage MCP: Extend capabilities with custom tools
# Basic usage
gemini # Interactive mode
gemini "prompt" # One-shot mode
gemini -i "context" # Interactive with initial prompt
# Configuration
gemini --sandbox # Run in sandbox mode
gemini --approval-mode yolo # Auto-approve all actions
gemini --model gemini-3-pro # Specify model (e.g. gemini-3-pro, gemini-2.5-pro)
# Session management
gemini --resume # Resume last session
gemini --list-sessions # Show available sessions| Command | Description |
|---|---|
/help |
Show available commands |
/clear |
Clear conversation history |
/memory show |
View loaded context |
/memory refresh |
Reload GEMINI.md files |
/init |
Generate project GEMINI.md |
/chat save <tag> |
Save conversation |
/resume |
Open session browser |
/rewind |
Navigate/revert session history |
/prompt-suggest |
Get prompt ideas for the current task |
/stats |
Show token/quota/session stats |
/restore |
Recover from checkpoint |
/compress |
Summarize conversation |
- Official Gemini CLI Documentation
- Google AI Studio - Get API keys
- MCP Server Registry
- Course Slides
- Lab Exercises
Kenneth Kousen
- President, Kousen IT, Inc.
- Author & Technical Trainer
- ken.kousen@kousenit.com
- https://www.kousenit.com
This training material is licensed under the MIT License. See LICENSE file for details.
Ready to start? Run npm run dev and navigate to http://localhost:3030!