Installer Gemini CLI : connexion Google et première tâche Git relisible

Gemini CLI, connexion Google, première tâche terminal relisible dans le dépôt Git.

The first hour with Google Gemini CLI in a Git repo you own usually breaks on a missing gemini binary, an unfinished Google sign-in, or skipping git status at the repo root—not on prompt wording. Install from official docs, authenticate, then land one change you can review with git diff.

The query is how to use Gemini CLI for your first reviewable Git repo coding task. This page follows google-gemini/gemini-cli install and auth notes at geminicli.com/docs. For @ file injection syntax, see our Gemini CLI @ files note. Not a meeting-product guide—open a room on wbmeet to walk a diff; see how to create and join a room.

Install geminiGoogle sign-inRepo task + git diff

What Gemini CLI does in a repo

Gemini CLI is Google’s open-source terminal agent (gemini): read the workspace, edit files, run shell after approval. Many developers use Sign in with Google (OAuth); alternatives include GEMINI_API_KEY from AI Studio. Free quotas and rate limits: cloud.google.com/gemini/docs/quotas.

git diff
Review edits
OAuth
Google sign-in
1 file
Hour-one scope

Install Gemini CLI

  1. 1

    Prepare Node.js

    Confirm node -v and npm -v meet geminicli.com/docs/get-started/installation. Restricted environments can use the README conda recipe.

  2. 2

    Global install or trial

    npm install -g @google/gemini-cli; macOS/Linux optional brew install gemini-cli. Trial without global install: npx @google/gemini-cli. Open a new terminal, then gemini --version.

  3. 3

    Fix command not found

    Add npm’s global bin directory to PATH (common with nvm). If still stuck, follow official troubleshooting on geminicli.com/docs.

Sign in with Google

  1. 1

    Start at the repo root

    cd into a Git repo you own. Run git status before the agent edits files.

  2. 2

    Launch gemini and OAuth

    Run gemini, choose Sign in with Google, finish OAuth in the browser. Org Gemini Code Assist users may set GOOGLE_CLOUD_PROJECT per README before starting.

  3. 3

    API key path (optional)

    Create a key at aistudio.google.com/apikey, export GEMINI_API_KEY, then start. Never commit keys to Git.

First reviewable repo coding task

  1. 1

    Prompt one: read-only

    Example: “In three sentences, explain this repo’s entry module and main public API; read @README.md if needed.” Confirm paths match disk.

  2. 2

    Prompt two: small diff

    Example: “Add a unit test for one untested helper, or fix one README typo—show the unified diff before writing.” Approve single-file edits only in hour one.

  3. 3

    Review with git diff

    Run git diff yourself. If Gemini proposes npm test, read the command and output before Allow. Use git restore if the change is wrong.

# First hour · Gemini CLI · Git repo · 2026-10-14
npm install -g @google/gemini-cli
cd /path/to/your/git/repo
git status
gemini
# Sign in with Google
# Prompt 1: explain entry (read-only)
# Prompt 2: one unit test; diff first
git diff

Install vs auth

PathGood forFirst-hour note
npm globalCross-platformPATH includes global bin
HomebrewmacOS / Linuxbrew upgrade gemini-cli
Google OAuthIndividualsCheck quotas page
GEMINI_API_KEYBilling controlKeys stay out of Git
01

Too many files touched

Ask for one file only; @ a single path instead of a huge directory.

02

Alongside Codex or Claude Code

Multiple terminal agents can coexist—avoid two agents editing the same tree at once. Compare OpenAI Codex CLI and Claude Code.

03

Stuck on chat-only

Repo explanation is warmup; finish with a reversible diff and git diff.

Suggested path: official install → Google sign-in → git status at repo root → read-only prompt → small diff + git diff. Trust geminicli.com/docs for your version.

Vs the @ files guide
This page focuses on a reviewable coding task in Git; @ syntax details live in our Gemini CLI @ files note.
GEMINI.md
Project context file—add after basics; never store secrets there.
Scope
Only Gemini CLI’s first repo hour, not wbmeet meeting setup.

Questions worth checking

Must I master @ files first?

No. Name paths in plain language for hour one; @ references help precision—see the dedicated @ files post.

Will it git commit for me?

It should not push without your workflow; git commands run after approval. Commit yourself in hour one.

Is a free Google account enough?

Personal OAuth has documented free quotas at cloud.google.com/gemini/docs/quotas; beyond that use an API key or paid tier.

Must the first task be a test?

No. Any small reversible change counts as long as you review with git diff.

Démarrer une réunion gratuite