{
 "schema_version": 1,
 "generated": "2026-10-25",
 "id": "google-gemini-gemini-cli--ask-gemini-about-your-codebase-from-the-terminal",
 "repo": "google-gemini/gemini-cli",
 "repo_url": "https://github.com/google-gemini/gemini-cli",
 "repo_slug": "google-gemini-gemini-cli",
 "title": "Ask Gemini to explain a codebase from the terminal",
 "page_title": "How to ask Gemini to explain a codebase from the terminal with Gemini CLI",
 "summary": "Run Gemini CLI in a repo and ask it about architecture, with extra directories included.",
 "who": "A developer joining an unfamiliar project who needs the big picture fast.",
 "problem": "Reading a new codebase file by file takes days.",
 "outcome": "A plain-language summary of the architecture and where the key pieces live.",
 "steps": [
  "Try it without installing: `npx @google/gemini-cli`, or install with `npm install -g @google/gemini-cli` or `brew install gemini-cli`",
  "Set your key: `export GEMINI_API_KEY=\"YOUR_API_KEY\"`",
  "In the repo run `gemini`, and add sibling folders with `gemini --include-directories ../lib,../docs`",
  "Ask it to explain the architecture or summarize recent changes"
 ],
 "agent_prompt": "In this repo, run google-gemini/gemini-cli with my GEMINI_API_KEY from the environment and ask it to explain the architecture, the entry points and the riskiest module. Paste its answer in a file ARCHITECTURE_NOTES.md.",
 "agents": [
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "10 minutes",
 "basis": "readme",
 "caveat": "Unpaid tier and Google One users were moved to Antigravity CLI on June 18, 2026; this path needs an API key or Vertex AI.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js (npm), Homebrew, MacPorts or conda",
  "A Gemini API key from AI Studio or a Google Cloud project for Vertex AI"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Keep the API key in your shell environment, not in the repo."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-gemini-gemini-cli/ask-gemini-about-your-codebase-from-the-terminal/",
 "md": "https://dedupedai.com/use-cases/google-gemini-gemini-cli/ask-gemini-about-your-codebase-from-the-terminal/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/google-gemini-gemini-cli--ask-gemini-about-your-codebase-from-the-terminal.json",
 "api_version": "v1"
}
