Skip to content

edsonesf/gemini-training

 
 

Repository files navigation

Gemini CLI Training Course

A comprehensive training course for mastering Google Gemini CLI - the open-source AI agent that brings Gemini directly into your terminal.

Course Overview

This 5-hour hands-on workshop covers everything from basic installation to advanced MCP configurations, custom commands, and enterprise workflows.

What You'll Learn

  • 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

Prerequisites

  • 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

Repository Structure

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

Quick Start

1. Install Gemini CLI

# Via npm (recommended)
npm install -g @google/gemini-cli

# Verify installation
gemini --version

2. Authenticate

# 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/.env

3. Run Your First Command

gemini "Hello! What can you help me with?"

4. Start the Training

# 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

Course Schedule

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

Key Gemini CLI Features Covered

Core Features

  • Interactive REPL and one-shot modes
  • File references with @ syntax
  • Shell integration with ! prefix
  • Sandbox mode for safe execution
  • YOLO mode for autonomous operation

Configuration

  • GEMINI.md context files (hierarchical)
  • settings.json customization
  • Environment variables
  • Custom commands

Advanced Features

  • Model Context Protocol (MCP) servers
  • Extensions system
  • Agent Skills
  • Session management and checkpointing
  • IDE integration (VS Code)

New in Gemini CLI 0.30 – 0.37

  • 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+G replaces Ctrl+X for external editor; persistent policy approvals (0.37)

Tips for Success

  1. Start in Default Mode: Get comfortable before enabling YOLO mode
  2. Use GEMINI.md: Provide context for better, more consistent results
  3. Enable Checkpointing: Save snapshots before risky operations
  4. Review Generated Code: Always verify AI-generated changes
  5. Leverage MCP: Extend capabilities with custom tools

Useful Commands Reference

# 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

Slash Commands

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

Resources

Instructor

Kenneth Kousen

License

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!

About

Training materials for a course on Gemini CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 36.7%
  • Python 27.9%
  • Java 27.6%
  • HTML 4.5%
  • CSS 3.3%