Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/cli/authentication.md

This file was deleted.

5 changes: 2 additions & 3 deletions docs/cli/checkpointing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

The Gemini CLI includes a Checkpointing feature that automatically saves a
snapshot of your project's state before any file modifications are made by
AI-powered tools. This allows you to safely experiment with and apply code
changes, knowing you can instantly revert back to the state before the tool was
run.
AI-powered tools. This lets you safely experiment with and apply code changes,
knowing you can instantly revert back to the state before the tool was run.

## How it works

Expand Down
9 changes: 4 additions & 5 deletions docs/cli/cli-reference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CLI cheatsheet
# Gemini CLI cheatsheet

This page provides a reference for commonly used Gemini CLI commands, options,
and parameters.
Expand All @@ -9,8 +9,7 @@ and parameters.
| ---------------------------------- | ---------------------------------- | --------------------------------------------------- |
| `gemini` | Start interactive REPL | `gemini` |
| `gemini "query"` | Query non-interactively, then exit | `gemini "explain this project"` |
| `gemini -p "query"` | Query via SDK, then exit | `gemini -p "explain this function"` |
| `cat file \| gemini -p "query"` | Process piped content | `cat logs.txt \| gemini -p "explain"` |
| `cat file \| gemini` | Process piped content | `cat logs.txt \| gemini` |
| `gemini -i "query"` | Execute and continue interactively | `gemini -i "What is the purpose of this project?"` |
| `gemini -r "latest"` | Continue most recent session | `gemini -r "latest"` |
| `gemini -r "latest" "query"` | Continue session with a new prompt | `gemini -r "latest" "Check for type errors"` |
Expand Down Expand Up @@ -53,8 +52,8 @@ and parameters.

## Model selection

The `--model` (or `-m`) flag allows you to specify which Gemini model to use.
You can use either model aliases (user-friendly names) or concrete model names.
The `--model` (or `-m`) flag lets you specify which Gemini model to use. You can
use either model aliases (user-friendly names) or concrete model names.

### Model aliases

Expand Down
674 changes: 347 additions & 327 deletions docs/cli/commands.md

Large diffs are not rendered by default.

32 changes: 20 additions & 12 deletions docs/cli/gemini-md.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ order:
- **Location:** `~/.gemini/GEMINI.md` (in your user home directory).
- **Scope:** Provides default instructions for all your projects.

2. **Project root and ancestor context files:**
- **Location:** The CLI searches for a `GEMINI.md` file in your current
working directory and then in each parent directory up to the project root
(identified by a `.git` folder).
- **Scope:** Provides context relevant to the entire project.

3. **Sub-directory context files:**
- **Location:** The CLI also scans for `GEMINI.md` files in subdirectories
below your current working directory. It respects rules in `.gitignore`
and `.geminiignore`.
- **Scope:** Lets you write highly specific instructions for a particular
component or module.
2. **Environment and workspace context files:**
- **Location:** The CLI searches for `GEMINI.md` files in your configured
workspace directories and their parent directories.
- **Scope:** Provides context relevant to the projects you are currently
working on.

3. **Just-in-time (JIT) context files:**
- **Location:** When a tool accesses a file or directory, the CLI
automatically scans for `GEMINI.md` files in that directory and its
ancestors up to a trusted root.
- **Scope:** Lets the model discover highly specific instructions for
particular components only when they are needed.

The CLI footer displays the number of loaded context files, which gives you a
quick visual cue of the active instructional context.
Expand Down Expand Up @@ -106,3 +106,11 @@ While `GEMINI.md` is the default filename, you can configure this in your
}
}
```

## Next steps

- Learn about [Ignoring files](./gemini-ignore.md) to exclude content from the
context system.
- Explore the [Memory tool](../tools/memory.md) to save persistent memories.
- See how to use [Custom commands](./custom-commands.md) to automate common
prompts.
Loading
Loading