Where you type gemini decides what it works on. The folder you start it in becomes its workspace.
Start in the project
cd todo-app
gemini
Before you do, it is worth looking at the folder yourself — the same files the agent is about to see. Do that in the terminal below: move into the project, list it, and read the README.
If you start in the wrong place, there is no clever recovery. Type /quit, cd into the project, and start again.
Name the file with @
Gemini CLI has at commands: @ followed by a path puts that file’s content into your prompt.
@app.js Explain what this file does.
@src/ hands the agent the folder’s path, so it can list and read what it needs instead of every nested file landing in the prompt (Git-ignored files stay out). Naming the file beats describing it: there is no guessing which one you meant, and the agent works from what is actually in it.
Ask before you change
Make the first request a question:
@README.md What is this project, and which file builds the counter?
It costs nothing and changes nothing, and if the answer is wrong, a change request would have been wrong too. When you do ask for a change, keep it to one thing in one place.
In the default approval mode, Gemini CLI asks for your approval before its tools write a file or replace text in one. That prompt is the moment to read what it is about to change — the — not after. The last lesson of this level is about those modes.
Quick check
Which first prompt gives Gemini CLI the least room to guess?
Leaving and coming back
/quit (or /exit) leaves the session. It is saved, so you can return to it:
gemini -r "latest"continues the most recent session from the command line./resumeinside Gemini CLI opens a browser of saved sessions to pick from./clearstarts a fresh session when the current one has wandered.
Two more commands worth knowing early: /help lists every command, and /stats shows statistics for the current session, such as its duration and tool calls.
Try it yourself
Can I give Gemini CLI more than one folder?
Yes. Start it with gemini --include-directories followed by a comma-separated list, as the README shows, and it treats those folders as part of the workspace too.
Can I run a single prompt without opening a session?
Yes. gemini -p followed by the prompt in quotes runs it non-interactively and prints the answer, which is how it goes into scripts.