# Gemini CLI: Top 10 Pro Tips & Tricks

I’ve been using the Gemini CLI a lot lately for my coding projects. I really like how it helps me work faster right inside my terminal. But when I first started, I didn’t always get the best results. 

Author: Vladislav Guzey
Published: 2025-11-05
Canonical: https://proflead.dev/posts/gemini-cli-10-pro-tips/


<div class="videoWrapper">
  <iframe width="100%" src="https://www.youtube.com/embed/AGzN2dXroNg?si=YwBxfyp2Iavmy-rb" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
I’ve been using the Gemini CLI a lot lately for my coding projects. I really like how it helps me work faster right inside my terminal. But when I first started, I didn’t always get the best results. Over time, I’ve learned some simple tricks that make a huge difference. If you use the Gemini CLI, I want to share my top 10 pro tips. If you are ready, then let’s get started.



## My Top 10 Pro Tips for Using the Gemini CLI

If you have not installed it yet, start with the [Gemini CLI setup tutorial](/posts/gemini-cli-tutorial/) and return here once you can open a session.

### 1. Always Open Your Project Folder First

This is a super important step I always do! Before I run the gemini command, I make sure I am already inside my project folder. This helps Gemini get the right view of my code and load the right **GEMINI.md** file. It saves me time and helps keep other files, which are not part of the project, private.

### 2. Craft Clear, Specific Prompts

Gemini itself tells you to be specific for the best results, and I agree. Poor prompts often fail because they lack context. For example:

```bash
# Vague prompt (not recommended)  
help me fix my UI
```

Instead, be explicit about what you want and break the task into steps. You can even instruct Gemini to wait for your confirmation:
```bash
# Better prompt with context and checklist request  
When I tap on a chat message, save that portion of the UI as an image. Provide TypeScript code to implement this feature. Create a step‑by‑step checklist and ask for my approval before editing any files.
```

### 3. Ask for a Plan Before Changes

Press enter or click to view image in full size

![Ask for a Plan Before Changes](https://miro.medium.com/v2/resize:fit:700/1*hiPRkTUxgj23_sD6KRTwOw.png)



If I’m worried about using too many tokens (or just want to be careful), I ask Gemini to “generate the plan” first. This gives me a clear list of what it’s going to change. If I see a mistake in the plan, I can ask Gemini to fix the plan before it starts changing my files. This saves a lot of time!

### 4. Provide Persistent Context with `GEMINI.md`

To give Gemini CLI background knowledge about your project, create a `.gemini` folder in your repository and add a `GEMINI.md` file.

I use the **/init** command to create a GEMINI.md. In this file, I document all the important aspects of my project, such as style guides, audience details, and instructions for running tests. Gemini uses this info from the very first time it launches.

If I change the file, I just use the **_/memory refresh_** command to update Gemini's knowledge about the project.
```bash
/memory refresh  
  
# verify it’s saved  
/memory show
```

### 5. Use Shell Mode for Quick Terminal Commands

In the interactive session, you can toggle shell mode by pressing `!`. For example:
```bash
gemini  
# inside Gemini CLI  
!        # enters shell mode  
pwd      # prints the current directory  
ls   # lists files  
!        # exits shell mode (or press Esc)
```
Shell mode executes commands locally and feeds the output back into the conversation context.

When you need to stop and return later, [save and restore your Gemini CLI sessions](/posts/gemini-cli-tutorial-session-management/) to continue with the same conversation.

### 6. Use `/memory add` for Quick Context Update

For fast notes, like a database port number or an API URL, I use the `/memory add` command. This is a quick way to add specific details to Gemini's memory, and it's faster than opening and editing the `GEMINI.md` file every time.

```bash
# store a decision  
/memory add "The database port is 123 and we decided to use Boostrap CSS."  
  
# verify it’s saved  
/memory show
```
### 7. Search the web with `@search`

The built‑in `@search` tool fetches information from the web or external sources. For instance, if you need to investigate a known issue on GitHub:

```bash
@search "https://github.com/google-gemini/gemini-cli/"
```
Gemini fetches the issue and uses it as context to answer your question. You can also search by keyword:

```bash
@search "How to fix 'Cannot find module' error in Node.js?"
```
Or I just tell the assistant to “search the web,” and it’s smart enough to handle the rest!

### 8. Custom Slash Commands

If you often ask the same type of question, define a custom slash command. Suppose you regularly need a planning template. Create a directory and TOML file:

```bash
# create the commands folder  
mkdir .gemini/commands  
# create a toml file  
touch .gemini/commands/plan.toml
```
Inside the file, add the description and prompt.

```bash
description = "Generate a concise plan from requirements"  
prompt = """  
You are a project planner. Based on the following requirements, generate a numbered plan with deliverables, time estimates and testing tasks.  
  
Requirements: {{args}}  
"""
```
Now you can use the **/plan** command inside Gemini.

/plan "Add user authentication and registration to the TODO app."

### 9. Use Non-Interactive Mode for Single Questions



![Use Non-Interactive Mode for Single Questions](https://miro.medium.com/v2/resize:fit:700/1*wVZKwfmfNKtaC3R1p1Y1Eg.png)



When I need a quick answer and don’t want to start the full chat mode, I use the `gemini -p` command. I just passed my question with the command and got a single, fast response right in my terminal. For example:
```bash
gemini -p "summarize the main points of gemini.md"
```
### **10. Enable Checkpoints (My Undo Button!)**

This is my favorite safety feature. I enable **checkpointing** in my `settings.json` file. This is like a "save button" or a small Git commit before Gemini makes any changes. If the project breaks after a change, I can just use the **/restore** command to see the list of saved snapshots and roll back to a previous, working version of my files.

## Video Tutorial: Gemini CLI Top 10 Tips

If you want to see these commands in action, please watch my video tutorial.


_Watch on YouTube:_ [_Gemini CLI Tips_](https://youtu.be/AGzN2dXroNg?si=ccMUBZODlC5gO9vI)

## Conclusion

The CLI is a powerful tool, but these small steps are what really make it fast and reliable for me. I hope these tips help you get the most out of it, too!

Cheers! ;)
