Gemini CLI Tutorial #10 - Using the Nanobanana Extension
Key Takeaways
This video tutorial covers the installation and use of the Nanobanana extension in the Gemini CLI, including setting up an API key and generating images using the extension's custom commands.
Full Transcript
Okay then gang. In this lesson we're going to be adding another extension to the Gemini CLI and that is the Google Nano Banana one which allows us to essentially use the Nano Banana models to generate images using some added commands. So I've already searched for the Nano Banana um extension on this page and it's this one that we want to install right here. If we click on that we can see the install command which I'm going to copy and then we can head back to VS Code to install it. So then I've got a terminal open here to install the extension from because we don't need to do it from within only our project in VS Code. The extension gets added globally to Gemini on the computer inside this dogeemini folder that I've already got open. And in fact, I'm just going to head into the extensions folder as well. So we can see over here when it does get added. All right. So now let me come to the terminal, paste in the command, and then hit enter. And then after a moment we should see the new nano banana extension folder added over here. Okay then. So now we can start using that extension and the commands it provides to generate images for this project. Now before we go any further I want to mention that you will need an API key to use this nano banana extension and it does cost money to use it. I think it works out that every image generated costs somewhere between about 15 and0 cents depending on the quality of the image. Now the process of creating an API key is exactly the same as before when we created one in the Google AI studio for authenticating in the Gemini CLI. And in fact, if you want, you can use the same API key for this, which is what I'm going to do. Now, if you've not watched that earlier lesson where we made an API key, then definitely go and check that out. First of all, I think it was lesson six in this series. Then we need to take that API key and add it to thev file so that nano banana can use it. So let's open thev file and make a new variable called nano banana all in uppercase gemini_appi_key and nanoanana will automatically use this environment variable when we send a request to generate an image. Anyway, I'm going to paste in my API key now and also save the file. And although I'm showing you my key, I would advise you not to make your own key public in any way because then other people can use it. So I'll be deleting mine after recording this course. So now we've installed the Nano Banana extension which includes a global MCP server setup and some custom commands that we can use in the CLI and we've also set up the API key as well for it to use. Now let's spin up a new instance of Gemini in the terminal and start using it. So then if we type a forward slash into the chat import then we can key up to see all the new nanobanana commands which have been added like the diagram one to generate a diagram the edit one to edit images uh the generate one to generate images the icon one to make icons and so forth and we can use any of these now to make an image and we can also manually add context to the commands as well. So, let's give this a whirl. I want Nano Banana to generate some images for the combo cards on the homepage. And if we open that homepage up and scroll down, we'll eventually reach those combo cards, which I'm going to select to add them to the context automatically. Then, in the chat, I'm going to use the generate command to generate some images. And after that, I'm going to paste in the following prompt. I need three images for the food combinations on the homepage. One for cheese and marmite, one for crisps and chocolate, and one for strawberries and pepper. So then I'm going to hit enter and see what happens. Okay. And like always, it's asking us for permission before it uses this MCP tool called generate image. I'm going to go to option two and say always allow this. All right. So now it's finished and it said it's put all the images inside this nano banana output directory. So let's take a look at that. I'm going to close this off and open up the file explorer and we can see this folder with three images. So this first one is mama and cheese. Looks pretty good. The second one is chocolate and crisps. That also looks good. By the way, if you've never had this combo, chocolate with salt and vinegar crisps, uh definitely try it. Love it. Third one is the strawberries with pepper. All right, so it's generated all those images for us. Awesome. So, I'm actually now going to ask it to use those images in this file right here for these combo cards. So, let me open up the um chat again. And by the way, we get this error. MCP error context 7. This is something I've been experiencing over the last week or so with the uh context 7 MCP server. If you restart your chat, it does go away. Anyway, I'm not going to do that. Instead, I'm going to say, "Can you add the three new images to the combo cards on the homepage?" All right, then. Let's see what it does. Let's press enter. All right. And it looks like it's added all those. So, I'm not going to browse the code. I can see that right here we've got an image URL. It also created some images inside one of these folders over here. I think it's in the public one. So, it moved them into the public directory. So, now I'm just going to jump straight to the browser so we can preview this. All right. So, moment of truth. Let's scroll down. All right. There we go. Cool. Looks pretty good. All right then, my friends. So, that's pretty much the end of this series. I hope you have learned a fair amount about the Gemini CLI and I would strongly recommend trying it out if you're open to using coding agents in your workflow. But again, like I say in a lot of my videos, be very careful about relying on AI too much when it comes to coding or anything else for that matter. I think if you rely on it too much, it's going to hamper your skill development in every single area of life. Coding, writing, design, or whatever else. Also, in the case of coding, AI is not a silver bullet. It can't solve every problem and it can make mistakes. So, it is important to stay in the loop at all stages of development in my experience and guide the AI correctly, dive it into the weeds when you need to. Anyway, if you want to see more of this tool on my channel, please let me know in the comments. And if you enjoy the videos, don't forget to share, subscribe, and like. That really helps out a lot. And I'm going to see you all in the very next series. And just one more thing before I leave, I wanted to let you know you can access my entire library of nearly 200 courses at netinja.dev. And included in that library are a load of longer masterclass courses and other pro exclusive tutorials not found anywhere else. And I'm frequently adding to them as well. So you can access them all by signing up for a Net Ninja Pro membership which is just $9 a month. And you'll get your first month half price using this promo code right here. Also by signing up to the site, you'll get access to the community boards which has support for all the Net Ninja courses, too. So I'll leave a link to the signup page down below the video and hopefully I'll see you all there. Heat. Heat. N. Hey, hey,
Original Description
In this Gemini CLI Crash Course series, I'll show you how to get up an running wth the CLI in a project, use extensions & MCP servers, add an API key to access Gemini 3 models and more.
🍿👇 Get early access to the course on NetNinja.dev:
https://netninja.dev/p/gemini-cli-tutorial
🔥👇 Get access to premium courses with Net Ninja Pro:
https://netninja.dev/p/net-ninja-pro/#prosignup
🔥👇 Git & GitHub Masterclass:
https://netninja.dev/p/git-github-masterclass
🔗👇 Starter Project on GitHub:
https://github.com/iamshaunjp/gemini-cli-course
🔗👇 Gemini CLI docs:
https://geminicli.com/docs/
🔗👇 Gemini CLI Extensions:
https://geminicli.com/extensions/
🔗👇 Context7
https://context7.com/
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Net Ninja · Net Ninja · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
GraphQL Tutorial #5 - Express App Setup
Net Ninja
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
GraphQL Tutorial #8 - Root Query
Net Ninja
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
GraphQL Tutorial #12 - Author Type
Net Ninja
GraphQL Tutorial #13 - Type Relations
Net Ninja
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
GraphQL Tutorial #18 - Mutations
Net Ninja
GraphQL Tutorial #19 - More on Mutations
Net Ninja
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
GraphQL Tutorial #23 - Create React App
Net Ninja
GraphQL Tutorial #24 - Book List Component
Net Ninja
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
GraphQL Tutorial #28 - Add Book Component
Net Ninja
GraphQL Tutorial #29 - External Query File
Net Ninja
GraphQL Tutorial #30 - Updating Component State
Net Ninja
GraphQL Tutorial #31 - Composing Queries
Net Ninja
GraphQL Tutorial #32 - query variables
Net Ninja
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
GraphQL Tutorial #34 - Book Details Component
Net Ninja
GraphQL Tutorial #36 - Styling the App
Net Ninja
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
Updated Vue & Firebase Course (Udemy)
Net Ninja
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja
More on: LLM Foundations
View skill →Related Reads
📰
📰
📰
📰
I Taught an AI to Recognize the Shadows of Four-Dimensional Objects
Medium · Data Science
Changes to LLM pricing: Novita, OpenInference and StreamLake
Dev.to AI
ChatGPT in 2026: Why It’s Still the Most Searched AI Tool on Google (And How to Master It)
Medium · ChatGPT
A Tiny LLM Request Recorder I Use to Reproduce Production Failures
Dev.to AI
🎓
Tutor Explanation
DeepCamp AI