{
 "schema_version": 1,
 "generated": "2026-10-25",
 "id": "google-gemini-gemini-cli--use-gemini-cli-through-vertex-ai",
 "repo": "google-gemini/gemini-cli",
 "repo_url": "https://github.com/google-gemini/gemini-cli",
 "repo_slug": "google-gemini-gemini-cli",
 "title": "Use Gemini CLI through your company's Vertex AI project",
 "page_title": "How to use Gemini CLI through your company's Vertex AI project with Gemini CLI",
 "summary": "Point the CLI at Google Cloud so usage bills to your organization's project.",
 "who": "An engineer at a company that already runs on Google Cloud.",
 "problem": "Personal API keys are not allowed at many companies.",
 "outcome": "Gemini CLI running against Vertex AI under your organization's project and controls.",
 "steps": [
  "Install the CLI",
  "Set `export GOOGLE_API_KEY=\"YOUR_API_KEY\"` and `export GOOGLE_GENAI_USE_VERTEXAI=true`",
  "Or set `export GOOGLE_CLOUD_PROJECT=\"YOUR_PROJECT_ID\"` for a Cloud project login",
  "Run `gemini` and confirm which project the requests use"
 ],
 "agent_prompt": "Configure google-gemini/gemini-cli to use Vertex AI in project <id> with GOOGLE_GENAI_USE_VERTEXAI=true, run one prompt, and tell me where usage will show up in the console.",
 "agents": [
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "",
 "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": "Cloud keys can bill your organization; scope them and keep them in the environment."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-gemini-gemini-cli/use-gemini-cli-through-vertex-ai/",
 "md": "https://dedupedai.com/use-cases/google-gemini-gemini-cli/use-gemini-cli-through-vertex-ai/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--use-gemini-cli-through-vertex-ai.json",
 "api_version": "v1"
}
