Daniel Lyons' Notes

Introducing Gemini CLI

Description

For more tutorials on using LLMs and building agents, check out my Patreon
Patreon: https://www.patreon.com/SamWitteveen
Twitter: https://x.com/Sam_Witteveen

🕵️ Interested in building LLM Agents? Fill out the form below
Building LLM Agents Form: https://drp.li/dIMes

👨‍💻Github:
https://github.com/samwit/llm-tutorials

My Notes

00:00 Intro

  • 00:04 Context: Claude Code has been out and used for command line LLM interaction.
  • 00:30 Complaint about Claude Code: đź’¸ Can quickly run up a bill.
  • 00:37 Announcement: Google and the Gemini team are releasing a command line interface (CLI).

00:36 Gemini CLI

  • 00:41 Google is releasing a command line interface for Gemini.
  • 00:57 The command line form factor for LLMs is seen as a "killer form factor".
  • 01:03 Allows prompting the LLM to get outputs using tools like MCPs.
  • 01:10 Builds on Gemini CodeAssist, which is available for free to developers.
  • 01:25 The biggest advantage is the usage limits and free access.

01:30 Google Gemini CLI GitHub

  • 01:33 The code is being made available on GitHub.
  • 01:38 Expected to be an open repo when the video is released, allowing users to download and get started.
  • 01:47 Instructions are simple: Use npx to start it.
  • 01:52 After starting, you can set up a key or log in.

02:02 Gemini CLI Blog Post

  • 02:03 Key point: This tool is much cheaper to use than alternatives.
  • 02:06 Free Usage: Log in using a personal Google account to get a free Gemini Code Assist license.
    • 02:15 License provides access to Gemini 2.5 Pro (full version).
    • 02:19 1 million context window.
    • 02:24 Limits: 60 requests per minute and 1,000 requests per day with no charge.
  • 02:30 This free tier is considered "pretty insane" due to the high volume of requests allowed.
  • 02:38 Option for higher rate limits: Use a key from Vertex AI or Gemini AI Studio.
    • 02:56 Using your own key might be preferred if you have concerns about data training.
  • 03:05 Access to features already in AI Studio, such as grounding prompts in Google search.
  • 03:15 New feature: Ability to easily integrate MCPs at the command line level.

03:30 Gemini CLI Demo

  • 03:31 Jump into the terminal to see setup and usage.
  • 03:41 Running the NPX command starts the CLI with a fancy command line interface.
  • 03:58 Setup Options: Choose to log in with Google or use a Gemini API key.
  • 04:09 After logging in, Gemini Code Assist is authorized.
  • 04:14 Once set up, you can type messages/prompts to interact with the model.

04:23 Demo 1: Generate Code: Prompted to create HTML and JS files demonstrating Tailwind from a CDN.

  • 04:39 CLI states what it will make (interactive card layout).
  • 04:51 Provides the code.
  • 04:54 Allow Changes: User is prompted to allow the CLI to make changes (write files). Options include "allow once", "always allow", or use VS Code integration.
  • 05:12 "Always allow" is chosen for the demo.
  • 05:23 Files are created (HTML and JS).
  • 05:35 Initial output is "boring", so the user prompts for a more complex task.

05:41 Demo 2: Build Landing Page: Prompted to build a landing page for a cat cafe in San Francisco.

  • 05:48 Similar process to Claude Code; can start from scratch or an existing project.
  • 06:05 The CLI automatically makes changes and decides what to do.
  • 06:13 Landing page generated, including images and a menu.

06:28 Demo 3: Update Content: Prompted to add cat treats to the menu and an "About Us" page stating the cafe is owned by Maine Coon cats.

  • 06:43 Introduction of the gemini.md file: Acts as a "rules file" or context for the project.
  • 06:55 The context window usage increases as the project grows.
  • 07:03 Reminder: Using the Gemini login keeps the usage free within limits.
  • 07:21 Update successful: Cat treats added, About page created (initially without pictures).
  • 07:47 The About page initially wasn't working, asking it to fix it replaced the content.

08:01 Demo 4: Examine gemini.md: Prompted to make the gemini.md file visible.

  • 08:06 Shows outlines of key features, technologies used (remembering Tailwind), and where images come from (Unsplash).
  • 08:24 Goal of gemini.md: Provide a comprehensive overview of the project.
  • 08:30 Can edit the gemini.md file directly.

08:39 Demo 5: Add Backend: Prompted to add a Flask backend.

  • 08:48 The CLI identifies necessary actions (create requirements file, app file, make directory).
  • 08:58 User is prompted to allow mkdir (make directory).
  • 09:04 Rollback Capability: User notes that actions (like allowing mkdir) can be rolled back later.
  • 09:25 Memory Tool: A tool exists to save facts into memory, which can be added to the gemini.md file.
    • 09:53 The memory feature seems to save information beyond just the gemini.md file.
  • 10:03 Can ask questions about the repo at any point.

10:12 Demo 6: Run Flask App: Prompted the CLI to set up and run the Flask app.

  • 10:16 The CLI performed actions: created a virtual environment, activated it, installed requirements (pip install).
  • 10:34 Executed the command to run the Flask app.
  • 10:38 App is confirmed running on localhost.
  • 10:44 Google Product Integration: Can potentially push to Cloud Run or other Google services.
  • 10:53 Usage Stats: Upon exiting, the CLI displays usage metrics: turns, input tokens, output tokens, thought tokens, cache tokens.

11:17 Demo 7: Installing and Using MCPs:

  • 11:21 Shows the interface after adding an MCP server (e.g., Hugging Face MCP server).
  • 11:28 The Hugging Face MCP server provides tools like model search, space search, and image generation.
  • 11:47 Search Demo: Used find me the Qwen Rerankers (Model Search).
    • 11:57 Successfully returned relevant model results.
  • 12:34 Space Search Demo: Used find me the easy Ghibli space.
    • 12:46 Successfully found the requested Hugging Face space.
  • 13:03 Documentation is available for users to explore commands, themes, tutorials, etc.
  • 13:35 The key advantage is the free tokens and large number of daily calls compared to alternatives.

Transcript

Introducing Gemini CLI
Interactive graph
On this page
Description
My Notes
00:00 Intro
00:36 Gemini CLI
01:30 Google Gemini CLI GitHub
02:02 Gemini CLI Blog Post
03:30 Gemini CLI Demo
04:23 Demo 1: Generate Code: Prompted to create HTML and JS files demonstrating Tailwind from a CDN.
05:41 Demo 2: Build Landing Page: Prompted to build a landing page for a cat cafe in San Francisco.
06:28 Demo 3: Update Content: Prompted to add cat treats to the menu and an "About Us" page stating the cafe is owned by Maine Coon cats.
08:01 Demo 4: Examine gemini.md: Prompted to make the gemini.md file visible.
08:39 Demo 5: Add Backend: Prompted to add a Flask backend.
10:12 Demo 6: Run Flask App: Prompted the CLI to set up and run the Flask app.
11:17 Demo 7: Installing and Using MCPs:
Transcript