Skip to content

Getting Started

John Williams edited this page Mar 31, 2026 · 1 revision

Getting Started with Gemini CLI Google Ads Agent

Step-by-step guide to install, authenticate, and run your first Google Ads analysis from the terminal.

Prerequisites

  • Node.js 20+ — check with node --version (download)
  • npm — included with Node.js
  • Google account — free tier gives 60 requests/minute, 1,000 requests/day

Installation

Option 1: Clone This Fork (Full Google Ads Setup)

git clone https://github.com/itallstartedwithaidea/gemini-cli-googleadsagent.git
cd gemini-cli-googleadsagent
npm install
npm run build
npm start

On first run, Gemini CLI opens your browser to sign in with your Google account.

Option 2: Global Gemini CLI + Copy Commands

If you already have Gemini CLI installed globally (npm install -g @google/gemini-cli):

# Clone the commands and skills
git clone https://github.com/itallstartedwithaidea/gemini-cli-googleadsagent.git /tmp/gads-gemini

# Copy to your project
mkdir -p your-project/.gemini/commands your-project/.gemini/skills
cp /tmp/gads-gemini/.gemini/commands/google-ads-*.toml your-project/.gemini/commands/
cp -r /tmp/gads-gemini/.gemini/skills/google-ads-agent/ your-project/.gemini/skills/

# Run Gemini CLI in your project
cd your-project
gemini

Option 3: npx (No Install)

npx @google/gemini-cli

Then manually copy the .gemini/ commands and skills from this repo into your working directory.

Authentication

Method Best For How
Google Login (free) Individual developers, quick start Sign in when prompted — no keys needed
API Key Specific model control, paid tier Get key from aistudio.google.com/apikey, then export GEMINI_API_KEY="your-key"
Vertex AI Enterprise teams, production workloads export GOOGLE_API_KEY="key" + export GOOGLE_GENAI_USE_VERTEXAI=true
Code Assist License Organizations with Gemini Code Assist export GOOGLE_CLOUD_PROJECT="your-project-id"

Verify It's Working

Once in the Gemini CLI prompt, type:

/google-ads-analyze Show me a sample GAQL query for campaign performance last 30 days

You should see the agent respond with GAQL query syntax, table formatting, and actionable recommendations.

Troubleshooting

Issue Fix
command not found: gemini Run from the cloned repo with npm start, or install globally: npm install -g @google/gemini-cli
Commands not loading Ensure .gemini/commands/google-ads-*.toml files exist in your working directory
Authentication error Run gemini and follow the browser login flow. Check that cookies/popups aren't blocked
FileCommandLoader errors You may have the old google-ads.toml — delete it and use the three split files instead

Next Steps

Clone this wiki locally