Let’s get Gemini CLI up and running. In this lesson, you’ll learn how to install Gemini CLI, explore its commands and try your first workflow. All right, let’s get into it. Throughout this course, we’re going to take on the persona of an organizer for a tech conference. There’s a ton of things we are tasked with, such as building out the website, doing research and planning, social media, as well as after the conference, we’re going to want to go through all the data and potentially see if we have any leads that we can reach out to. All of this can be super powered with Gemini CLI. The first thing we want to do is actually do research, look at the notes from the past year’s organizers, amplify that with searches from the web and best practices for actually planning and organizing a c…
Let’s get Gemini CLI up and running. In this lesson, you’ll learn how to install Gemini CLI, explore its commands and try your first workflow. All right, let’s get into it. Throughout this course, we’re going to take on the persona of an organizer for a tech conference. There’s a ton of things we are tasked with, such as building out the website, doing research and planning, social media, as well as after the conference, we’re going to want to go through all the data and potentially see if we have any leads that we can reach out to. All of this can be super powered with Gemini CLI. The first thing we want to do is actually do research, look at the notes from the past year’s organizers, amplify that with searches from the web and best practices for actually planning and organizing a conference. To install Gemini CLI, you’re going to need Node, as Gemini CLI is deployed as an NPM package. For all the prerequisites, installation instructions, and prompts that we go over through this course, make sure to check the reading items at the end of the course. The command to install Gemini CLI is npm install -g @google/gemini-cli. This will install the package as a global package so that you can use it across all of your projects on your machine. All right, now we actually have Gemini CLI installed, the fun can begin. The command to start Gemini CLI is just gemini. We’re starting Gemini CLI in the folder or project for our conference. This is where we have all of our materials as well as the first prototype of our website. We’re using Gemini CLI in Ghostty, but you can use it in any terminal of your choice. You should see something like this on screen where it’s asking you to authenticate. There are three different authentication methods. There is Login with Google where you just use your personal account, and this is what you’ll want to do for the course, as this gives you access to the free tier. If you want to continue on after, past that, you can use an API key or Vertex AI to get more requests. So to kick off the authentication flow, just select enter on Login with Google. This will open up an OAuth flow in your local browser that you can go ahead and use to authenticate to Gemini CLI. Once authenticated, you should go back to Gemini CLI and see that the authentication has succeeded. So here’s what Gemini CLI looks like when you first start it up. You’ll see there’s some tips on screen as well as this nice Gemini banner. We’re using the latest Gemini 3 models. Depending when you are running this, you might have a more up-to-date model. You can go ahead and actually change the models if you prefer by doing /model. The default is to use auto, which actually lets Gemini CLI intelligently decide which model is best for any given request. So if you ask something simple, like hi, it will actually use one of the cheaper gemini-3-flash models. Whereas if you have something complex like refactor my entire code base, it’s going to go ahead and choose gemini-3-pro, the most capable model. The best place to look to get started with Gemini CLI is to run the /help command. This will go ahead and list all the available built-in commands that Gemini CLI comes with, as well as some fun keyboard shortcuts. Another good command to get started with is /settings. If you’re a vim user, you can actually enable vim mode so Gemini CLI respects Vim. My favorite setting is the Hide Footer setting. This will actually go ahead and make Gemini CLI look a lot cleaner and we’ll go ahead and do escape. And now you can see we no longer have that bar underneath, so we actually have a nice clean UI. You can actually customize the color scheme. This is another one I recommend doing by doing /theme And you can actually customize and create your own theme. When I’m feeling adventurous, I like to use shades of purple. But you know what? Not feeling super adventurous today, so let’s stick with default. Let’s get started and send our first prompt to Gemini CLI. So last year the organizers of the 2025 conference left us some suggestions for how to host and organize the conference. We have this in a markdown file, suggestions.md We can go ahead and use the at symbol to actually pull in and reference that file. So Gemini CLI will go and read it and have access to the context. If you just said read the suggestions file, it will also figure it out, but it will have to take some time to process and think about it first. So let’s go ahead and execute that, and you’ll see Gemini CLI actually will spin and think, and it will actually sometimes have some witty jokes. as well as output messages as it reasons through. Gemini CLI has responded. We can see the recommendations from last year’s organizers, such as the website, making sure the schedule and session catalog are easy to find, as well as making sure we have a unique hashtag for socials. We’ll take these into consideration and they’ll be handy later. So we have the recommendations from last year’s organizers, but maybe these are out of date. I can prompt Gemini CLI to see if this matches the online best practices, and it should go ahead and actually kick off the Google web search, pull all the information from the web, so we can make sure that we are having the most accurate and up-to-date information. The previous organizers align very well with the general industry, though the online guides offer a more structured timeline. So there may be things we want to incorporate as we go forward with our conference. So we’ll prompt Gemini CLI to add the new findings to our doc so that we can reference it again later. We’ll see that Gemini CLI is actually now calling the WriteFile tool. Gemini CLI will actually by default have a confirmation so that you the user are in the know and in the flow. When you get a suggestion, you can use ctrl-s to expand it and see the full diff. You can also choose whether you want to allow the tool call just once, If you want to always allow the certain tool, or if you want to even open the diff in an external editor, such as VS Code. You can always reject the suggestions if you want to go in a different direction. We’ll go ahead and allow the suggestion and have it write to the file. Now our suggestions.md is up to date with both the recommendations from last year’s organizers and best practices that we found online. When you move from task to task, it’s best to actually wipe Gemini CLI so that you can start fresh. You can do this with the /clear command. That will remove all of the tool calls as well as back and forth with Gemini CLI from the conversation history, allowing you to start on a new task fresh and not have it cluttered. To see all your stats in a given session, you can just run the /stats command. This will show all of the different code changes the model has made, the tool as well as all the requests and which models they’re getting routed to. Because we are using the auto model, you can see that we’re actually spreading out our requests between different models. If you want to learn more or running into any issues with Gemini CLI, you can actually open the documentation directly from within Gemini CLI by running /docs. So if you want to learn more or get more details on a specific feature of Gemini CLI, this is super handy. To exit or get out of Gemini CLI, you just type /exit or /quit. You’ll also get a quick snapshot of the session history. So now we’ve covered the basics. We’ve shown you Gemini CLI, what it looks like, and some popular commands. We also mentioned context. We showed you how to keep things clean and make sure Gemini CLI is being efficient. We’re going to go into more detail in the next lesson and cover context and memory within Gemini CLI.
![]()
Sign in to continue learning
Beginner
Topics
AI Coding
Task Automation