How to Get Started and Build with Gemini CLI (Powered by Gemini 3 Flash)
Source: Dev.to
By Lesly Zerna / @leslysandra
As developers, we are constantly looking for tools that speed up our workflow without breaking our flow state. Last June 2025, Google made a massive splash in the open‑source community by releasing the Gemini CLI, and in December 2025 it updated the tool with its latest model, Gemini 3 Flash.
If you are tired of copy‑pasting code between your browser and your IDE, or if you want to see what a true “AI Agent” looks like in your terminal, this guide is for you :)
Note: Many of the concepts and examples in this post were inspired by the Gemini CLI course by DeepLearning.AI, which I highly recommend checking out, as well as the official Gemini CLI documentation and the Google for developers blog post.
What is Gemini CLI?
In simple terms, Gemini CLI is a terminal application that lets you chat with Google’s Gemini AI directly from your command line.
But it is more than just a chatbot—it is an open‑source AI agent powered by Gemini.
When you use ChatGPT or the Gemini web interface, you are in a “sandbox”: the AI cannot see your files or run commands unless you upload them. Gemini CLI breaks that wall. It lives inside your environment, meaning it can understand your project structure, read your code directly, and help you build faster.
Why is the “Gemini 3 Flash” update important?
Gemini 3 Flash is optimized for speed and low latency. When you are using an AI agent that needs to perform multiple steps (e.g., “read this file,” then “analyze it,” then “write a test”), speed is critical. Flash makes the CLI feel snappy and responsive.

Why Use the CLI? (Browser vs. Terminal)
Working from the browser is great for general questions, but for building software the Command Line Interface (CLI) is superior. Here’s why:
- Direct File‑System Access – No more copy‑pasting. You can say, “Refactor the
utils.pyfile,” and the CLI reads it and proposes changes directly. - Context Awareness – The CLI knows your current working directory and the files inside it.
- Automation & Scripting – Pipe output from other commands into Gemini, e.g.
cat logs.txt | gemini "Find the critical error". - Built‑in Tools – Gemini CLI ships with batteries‑included tools such as:
- File System – Read, write, and list files.
- Web – Fetch URLs and search Google (grounding your code in real‑time info).
- Shell – Execute terminal commands safely.
- Customization & Extensions – Because it is open source, you can extend it. It supports the Model Context Protocol (MCP), allowing you to build custom tools that connect to your database or internal APIs.
Real‑Life Examples and Ideas to Build
Below are a few ways you can start using Gemini CLI today to boost your productivity.
1. The “Smart” Code Reviewer
Instead of manually checking your code for style issues, use Gemini CLI to review it before you push.
Command
gemini "Review @main.py for potential bugs and clean code practices. Output the suggestions as a list."
Why it works – The CLI reads the file directly and uses Gemini’s reasoning to surface edge cases you might have missed.
2. Instant Data Analyst
Imagine you have a messy CSV or a log file and need quick insights.
Scenario – You have a file called server_logs.csv.
Command
gemini "Read @server_logs.csv and tell me which IP address appears the most frequently. Then, use grep to count exactly how many times it appears."
Why it works – The agent combines its ability to write code (to analyze the CSV) with system tools (like grep) to verify the data.
3. Rapid Prototyping
Need to scaffold a new feature?
Command
gemini "Create a new folder called 'blog-app'. Inside it, create an index.html file with a basic responsive layout and a style.css file with a dark mode theme."
Result – The CLI creates the folder and writes the files for you, so you can start coding immediately.
How to Get Started: Installation
Ready to try it? Installing Gemini CLI is straightforward. You’ll need Node.js installed on your machine.
More details: see the official documentation at geminicli.com.
Step 1 – Open your terminal
Step 2 – Run the install command
npm install -g @google/gemini-cli@latest
Step 3 – Authenticate
Start the tool by simply typing:
gemini
On your first run, the CLI will ask you to authenticate. You can usually log in directly with your Google account, which gives you a generous free tier to start experimenting.

And once it is installed you can see it running in your terminal:
Step 4 – Enable the Latest Features (Crucial Step!)
To use the powerful Gemini 3 Flash model, you need to enable preview features.
- Type
/settingsin the CLI. - Look for “Preview Features.”
- Set this to
True.
This ensures you are running on the latest, fastest, and most capable models available.

Under the Hood: How Gemini CLI Works
You might be wondering, “How does a text box in my terminal know how to run code?”
Gemini CLI uses a concept called the ReAct Loop (Reason + Act). Here’s a simple explanation of what happens when you type a command:
- Thought: You ask a question (e.g., “Why is my build failing?”). The AI analyzes your request.
- Tool Use: Instead of just guessing, the AI sees it has “tools” available—like reading a file or running a shell command. It decides, “I should run the build command to see the error.”
- Observation: The CLI runs the command, captures the output (the error message), and feeds it back to the AI.
- Answer: The AI reads the error and gives you the specific fix.
This loop lets the CLI act like a real pair‑programmer rather than just a text generator.
Navigating the Terminal: Essential Commands
Once you have installed Gemini CLI, you aren’t just typing into a void. These commands help you control the agent:
/help– Shows what the agent can do and how to interact with it./settings– Lets you explore and modify your setup (Assistant settings, Mode, etc.)./docs– Opens the documentation for advanced features.
How to Reference Your Files
This is the super‑power of the CLI. You don’t need to copy‑paste code. To ask Gemini about a specific file, simply use the @ symbol.
Example
“Can you explain the logic inside @main.py and suggest improvements?”
The agent will read that file and base its answer on the code inside it.
Understanding Context and GEMINI.md
What is Context?
Context is a collection of information that the AI agent uses to understand your specific request. It’s the “background knowledge” the AI needs so you don’t have to repeat yourself.
The Magic of GEMINI.md
Create a special file called GEMINI.md to teach the CLI about your project—a “ReadMe for the AI.”
If a GEMINI.md file exists in your folder, the CLI automatically reads it to understand project rules, coding style, architecture, etc.
You can place GEMINI.md in:
- The Global Directory – Rules that apply to all your projects.
- The Current Working Folder – Project‑specific rules.
- Subdirectories – Rules specific to that module.
Managing Memory
You can verify what the AI currently “knows” or add new things to its memory manually.
Check Context
/memory show
Lists everything currently in the agent’s context.
Add Context Manually
/memory add "Remember that we are using Python 3.11 for this project"
Or point it to a specific context file:
/memory add path/to/another/gemini.md
Conclusion (Part 1)
The shift from chat‑in‑browser to agent‑in‑terminal is a huge leap for developer productivity. With Gemini 3 Flash now powering the Gemini CLI, and the ability to customize Context using GEMINI.md, we have a tool that is fast enough to keep up with our thoughts and smart enough to handle complex tasks.
Give it a try, explore the open‑source code, and let me know what you build!
More blogs are coming soon—subscribe and stay tuned!
— Lesly
