How to Use Google’s Gemini CLI for SEO Audits (Beginner Guide)

NuroSparx Article Placeholder

How to Use Google's Gemini CLI for SEO Audits (Beginner Guide)

You know your website needs an SEO audit. You've probably looked at tools like Screaming Frog, SEMrush, or Ahrefs. Then you saw the price tags. $100 to $500 per month. For most small businesses, that's not happening.

Want results like this for your business?

NuroSparX builds AI-powered growth engines for SMBs doing $5M-$100M. Let’s talk.

Get a Free Growth Audit

Here's what most people don't know: Google built a free SEO audit tool that's hiding in plain sight. It's called Gemini CLI, and it's designed exactly for situations like this. It runs on your computer. It costs nothing. And it finds real issues that expensive tools find too.

The catch? You have to use the command line. No fancy interface. Just text commands.

But here's the secret: the command line is not as scary as you think. If you can copy and paste, you can do this. This guide walks through exactly how.

What is Gemini CLI and Why It Matters for SEO

Gemini is Google's AI model. You've probably used it (it's the free version of ChatGPT competitor). But most people don't know Google also released Gemini CLI, which is a command-line version you can run locally on your computer.

Why does this matter for SEO? Because Gemini can

Analyze your HTML code and find SEO problems

Extract and validate your schema markup (structured data)

Check your meta tags and title tags for optimization

Crawl your site and find broken links

Analyze your site structure and hierarchy

Generate comprehensive audit reports

And it does all this for free.

The big difference between Gemini CLI and expensive SEO tools is that Gemini CLI is designed for analysis and recommendations, not continuous monitoring. You run it, get a report, fix issues, run it again. That's fine for small businesses. You don't need real-time monitoring of your site. You need a thorough audit once a month and then fix what's broken.

This is the free alternative to SEMrush. Not as shiny. Not cloud-based. But it works.

Installation and Setup (Windows, Mac, Linux)

Let's get Gemini CLI installed on your computer. This takes about 10 minutes.

Step 1: Install Google Cloud SDK

Gemini CLI runs through Google Cloud. First, you need to install the Google Cloud SDK (Software Development Kit). This is Google's toolkit for running Google services locally.

Windows Users

1. Go to https://cloud.google.com/sdk/docs/install

2. Click "Windows" under "Installers"

3. Download the .exe file

4. Run the installer

5. Follow the prompts (accept defaults)

6. Open Command Prompt and type: gcloud –version

7. If you see a version number, you're installed.

Mac Users

1. Open Terminal

2. Paste this: curl https://sdk.cloud.google.com | bash

3. Press Enter and let it install (takes a few minutes)

4. Restart Terminal

5. Type: gcloud –version

6. If you see a version number, you're installed.

Linux Users

1. Open Terminal

2. Paste this:

curl https://sdk.cloud.google.com | bash

exec -l $SHELL

3. Type: gcloud –version

4. If you see a version number, you're installed.

Step 2: Authenticate with Your Google Account

Now you need to connect Gemini CLI to your Google account so it knows you have permission to use Gemini.

In Command Prompt (Windows) or Terminal (Mac/Linux), type

gcloud auth application-default login

A browser window will open. Sign in with your Google account (same account you use for Gmail, Google Cloud, etc.). Grant permission when it asks. That's it. You're authenticated.

Step 3: Install Gemini CLI

Now install the Gemini command-line tool

gcloud components install gemini

Wait for it to finish installing.

Step 4: Test That Everything Works

Type this command

gemini –version

If you see a version number, you're ready to go. If not, something went wrong. Double-check that you completed steps 1-3.

Basic Commands for Site Analysis

Now that Gemini CLI is installed, let's use it to analyze a website.

The basic structure for running Gemini commands is

gemini [command] [options]

Here are the most useful commands for SEO

1. Crawl Your Website

This command crawls your site and extracts all the URLs it finds.

gemini crawl –url https://yourdomain.com –depth 2

This crawls your site up to 2 levels deep. Replace "yourdomain.com" with your actual domain.

Output: A list of all URLs found on your site, their status codes (200 for working, 404 for broken), and basic information.

2. Analyze Your HTML

This analyzes the HTML code on a page for SEO problems.

gemini analyze –url https://yourdomain.com/page

This checks that specific page for

Meta tags (are they present?)

Title tags (length, keywords)

Heading hierarchy (H1, H2, H3 structure)

Image alt text

Schema markup

Open Graph tags

Output: A report of what's missing or could be improved.

3. Extract Schema Markup

This pulls out all your structured data (schema.org markup) so you can see what search engines are reading.

gemini extract-schema –url https://yourdomain.com

Output: JSON showing all schema markup found on the page.

4. Check for Broken Links

This crawls your site and identifies 404 errors and broken internal links.

gemini crawl –url https://yourdomain.com –report-broken-links

Output: List of broken links and where they're found.

Real-World Workflow: Running Your First SEO Audit

Let's walk through an actual SEO audit from start to finish.

Scenario: You own a local plumbing company website and want to know what SEO issues exist.

Step 1: Crawl Your Entire Website

Command

gemini crawl –url https://yourplumbingcompany.com –depth 3 –output crawl-report.json

This crawls your site up to 3 levels deep and saves the results to a file called crawl-report.json. You can open this file in any text editor to see the results.

Output looks like

{

"crawled_urls": [

{

"url": "https://yourplumbingcompany.com/",

"status_code": 200,

"title": "Local Plumbing Company – Same Day Service",

"title_length": 45

},

{

"url": "https://yourplumbingcompany.com/services",

"status_code": 200,

"title": "Plumbing Services",

"title_length": 18

},

{

"url": "https://yourplumbingcompany.com/broken-page",

"status_code": 404,

"title": "Page Not Found"

}

],

"total_urls": 42,

"status_codes": {

"200": 40,

"404": 2

}

}

What this tells you

You have 42 pages on your site

40 are working (200 status code)

2 are broken (404 status code) and need fixing

The 404 errors are your first priority. Broken pages hurt SEO and user experience.

Step 2: Analyze Your Homepage

Command

gemini analyze –url https://yourplumbingcompany.com –detailed

This gives you a full breakdown of your homepage's SEO.

Output looks like

{

"url": "https://yourplumbingcompany.com/",

"title": "Local Plumbing Company – Same Day Service",

"title_length": 45,

"meta_description": "Professional plumbing services in [city]. 24/7 emergency service. Licensed and insured.",

"meta_description_length": 78,

"h1_tags": 1,

"h1_content": "Local Plumbing Experts You Can Trust",

"h2_tags": 4,

"h3_tags": 8,

"images": 12,

"images_with_alt_text": 8,

"images_without_alt_text": 4,

"internal_links": 23,

"external_links": 5,

"word_count": 1245,

"readability_score": 7.2,

"estimated_reading_time": "5 minutes"

}

What this tells you

Title length is good (45 characters, Google recommends 30-60)

Meta description is good (78 characters, Google recommends 120-160)

You have 1 H1 tag (correct, should have exactly 1)

4 of your 12 images are missing alt text (needs fixing)

Your page has good internal linking (23 links)

Readability score is 7.2 out of 10 (pretty good)

Issues to fix

Add alt text to those 4 images

Extend meta description to use full 120-160 character range

Consider improving readability score from 7.2 to 8+

Step 3: Extract All Schema Markup

Command

gemini extract-schema –url https://yourplumbingcompany.com –output schema-report.json

This pulls out all structured data (schema.org markup) on your site.

Output looks like

{

"schemas_found": [

{

"type": "Organization",

"data": {

"name": "Local Plumbing Company",

"url": "https://yourplumbingcompany.com",

"telephone": "(555) 123-4567",

"address": "123 Main St, City, State 12345",

"description": "Professional plumbing services"

}

},

{

"type": "LocalBusiness",

"data": {

"name": "Local Plumbing Company",

"address": "123 Main St, City, State 12345",

"telephone": "(555) 123-4567",

"openingHours": "Mon-Fri 8am-6pm, Sat 8am-2pm"

}

}

],

"total_schemas": 2,

"validation_errors": 0

}

What this tells you

You have 2 schema types (Organization and LocalBusiness)

Both are valid (0 validation errors)

Your business information is marked up correctly

Step 4: Check for Broken Links

Command

gemini crawl –url https://yourplumbingcompany.com –report-broken-links –output link-report.json

This finds all broken internal and external links.

Output looks like

{

"broken_links": [

{

"source_url": "https://yourplumbingcompany.com/services",

"broken_link": "https://yourplumbingcompany.com/contact-us-old",

"reason": "404 Not Found"

},

{

"source_url": "https://yourplumbingcompany.com/about",

"broken_link": "https://example-supplier.com/product",

"reason": "Domain moved or broken"

}

],

"total_broken": 2,

"critical": 1

}

What this tells you

You have 2 broken links

1 is critical (internal link to a non-existent page)

Need to either fix the broken pages or update the links to point somewhere valid

Crawling Your Website with Gemini

Deep crawling your entire site helps identify structural problems.

Advanced Crawl Command

gemini crawl –url https://yourplumbingcompany.com –depth 5 –include-external-links –check-redirects –output full-crawl-report.json

What each flag does

–depth 5: Crawls up to 5 levels deep

–include-external-links: Also checks links pointing outside your site

–check-redirects: Finds redirect chains (bad for SEO)

–output full-crawl-report.json: Saves to a file

This creates a comprehensive report of your entire site structure.

Reading the Crawl Report

The output includes

Total pages crawled

Status codes distribution (200s, 404s, redirects)

Pages with redirect chains

Orphan pages (pages not linked to from anywhere)

Crawl depth distribution

Common issues found

Redirect chains (A > B > C instead of A > C)

Orphan pages (not linked internally)

Inconsistent trailing slashes (site.com/ vs site.com)

Excessive depth (pages buried 10+ levels deep)

Extracting and Analyzing Structured Data (Schema)

Search engines use schema markup to understand your content better. Let's see what you have.

Command to Extract All Schema

gemini extract-schema –url https://yourdomain.com –recursive

Output shows

All schema types found on your site

Data completeness (is all required information present?)

Validation errors (if schema is malformed)

Common schema types for small businesses

Organization: Your company information

LocalBusiness: For local services (plumbing, cleaning, etc.)

Product: For e-commerce

Article: For blog posts

FAQPage: For FAQ sections

VideoObject: For embedded videos

Validation Check

You can validate your schema against Google's standards

gemini validate-schema –url https://yourdomain.com

This tells you if your schema is correct and will be understood by Google.

Output

{

"valid": true,

"warnings": 0,

"errors": 0,

"recommendations": [

"Add image property to LocalBusiness schema",

"Consider adding aggregateRating if you have reviews"

]

}

Even if valid, Gemini suggests improvements.

Meta Tag Analysis and Optimization Recommendations

Meta tags are crucial for SEO. Gemini CLI analyzes all of them.

Command

gemini analyze-metadata –url https://yourdomain.com –recursive –output meta-report.json

This analyzes all meta tags across your entire site.

Output example

{

"total_pages_analyzed": 42,

"title_tags": {

"total": 42,

"optimized": 38,

"too_short": 2,

"too_long": 2,

"missing_keyword": 8

},

"meta_descriptions": {

"total": 42,

"optimized": 35,

"too_short": 3,

"too_long": 2,

"missing": 2

},

"og_tags": {

"total_with_og": 18,

"missing_og": 24

}

}

What this tells you

2 title tags are too short (under 30 characters)

2 title tags are too long (over 60 characters)

3 pages are missing meta descriptions

24 pages are missing Open Graph tags (needed for social sharing)

Fixing Issues

For too-short titles, add your target keyword and clarify what the page is about.

Bad: "Services"

Good: "Plumbing Services in [City] – Emergency & Maintenance"

For missing meta descriptions, write 120-160 character summaries of each page.

For missing Open Graph tags, add

<meta property="og:title" content="Page Title">

<meta property="og:description" content="Page description">

<meta property="og:image" content="https://yourdomain.com/image.jpg">

Identifying Broken Links and Redirects

Broken links kill SEO. They also kill user experience. Let's find them.

Command

gemini crawl –url https://yourdomain.com –report-broken-links –report-redirects –output link-audit.json

Output

{

"broken_internal_links": [

{

"source": "https://yourdomain.com/about",

"broken_link": "https://yourdomain.com/team-old",

"status": 404

}

],

"redirect_chains": [

{

"chain": "page-a > page-b > page-c",

"issue": "excessive redirects hurt SEO"

}

],

"external_broken_links": [

{

"source": "https://yourdomain.com/resources",

"broken_link": "https://external-site.com/page",

"status": 404

}

]

}

Fixing broken links

1. For internal broken links, either create the missing page or update the link

2. For external broken links, find a replacement or remove the link

3. Replace redirect chains with direct links

Generating Actionable Audit Reports

Now let's create a full audit report you can actually use.

Complete Audit Command

gemini audit –url https://yourdomain.com –depth 3 –include-schema-validation –include-metadata-analysis –include-accessibility –include-performance –output full-audit.json

This creates a comprehensive report covering SEO, schema, metadata, accessibility, and performance.

Sample Output Structure

{

"audit_date": "2026-03-07",

"domain": "https://yourdomain.com",

"summary": {

"seo_score": 72,

"issues_found": 18,

"critical_issues": 2,

"warnings": 8,

"opportunities": 8

},

"critical_issues": [

{

"type": "Missing H1 tags",

"pages_affected": 3,

"impact": "high",

"recommendation": "Every page needs exactly one H1 tag"

},

{

"type": "Broken internal links",

"pages_affected": 2,

"impact": "high",

"recommendation": "Fix or remove broken links"

}

],

"seo_recommendations": [

{

"priority": "high",

"recommendation": "Extend meta descriptions to 120-160 characters",

"impact": "Improves click-through rate from search"

},

{

"priority": "medium",

"recommendation": "Add alt text to 12 images",

"impact": "Improves image search visibility"

}

]

}

Converting JSON to Human-Readable Report

The output is JSON (computer format). Here's how to convert it to a readable report:

1. Copy the JSON output

2. Go to https://jsoncrack.com (free visualization tool)

3. Paste your JSON

4. Click "Editor" to view as organized text

5. Screenshot or copy for your team

Or use this command to convert to text

gemini audit –url https://yourdomain.com –output-format text > audit-report.txt

This creates a text file you can easily read and share.

Integrating Gemini CLI Into Your Workflow

To make this a regular habit, set up automated audits.

Monthly Audit Routine

Create a file called "audit.sh" (Mac/Linux) or "audit.bat" (Windows) with your audit commands:

Mac/Linux (audit.sh)

#!/bin/bash

gemini crawl –url https://yourdomain.com –depth 3 –output crawl-$(date +%Y-%m-%d).json

gemini analyze-metadata –url https://yourdomain.com –recursive –output meta-$(date +%Y-%m-%d).json

gemini extract-schema –url https://yourdomain.com –recursive –output schema-$(date +%Y-%m-%d).json

echo "Audit complete! Check output files."

Windows (audit.bat)

@echo off

gemini crawl –url https://yourdomain.com –depth 3 –output crawl-%date%.json

gemini analyze-metadata –url https://yourdomain.com –recursive –output meta-%date%.json

gemini extract-schema –url https://yourdomain.com –recursive –output schema-%date%.json

echo Audit complete! Check output files.

Run this script monthly and compare reports to track improvements.

Limitations and When to Use Paid SEO Tools Instead

Gemini CLI is powerful, but it has limits. Know when to use it and when to upgrade to paid tools.

What Gemini CLI Does Well

Technical SEO audits (crawling, redirects, schema)

On-page optimization analysis

Structured data validation

Broken link detection

Site structure analysis

What Gemini CLI Doesn't Do

Backlink analysis (who's linking to you)

Competitor analysis (how you rank vs competitors)

Keyword research (search volume, difficulty)

Rank tracking (where you rank for keywords over time)

Traffic analysis (visitors, bounce rate, conversions)

Domain authority scoring

When to Upgrade to Paid Tools

Use paid SEO tools when you need

Comprehensive backlink analysis (Ahrefs, SEMrush)

Keyword research and competition analysis (Ahrefs, SEMrush, Moz)

Rank tracking (where you rank and trends) (SEMrush, Ahrefs)

Regular monitoring (paid tools track daily, Gemini CLI is manual)

The Sweet Spot Approach

1. Use Gemini CLI for monthly technical audits (free)

2. Use Google Search Console (free) for keyword tracking and click data

3. Use Google Analytics (free) for traffic analysis

4. Upgrade to paid tools only if you need backlink analysis or rank tracking

For most small businesses, this combination is enough. You get 80% of the insights for 20% of the cost.

Getting Started Today

Here's your action plan

1. Install Google Cloud SDK (10 minutes)

2. Install Gemini CLI (5 minutes)

3. Run your first crawl on your domain (5 minutes)

4. Review the output and identify your top 3 issues (15 minutes)

5. Fix those 3 issues (varies by issue)

6. Run the audit again to confirm improvements

Total time investment: 35 minutes + fix time

Next, you'll have

A full inventory of your pages

A list of broken links to fix

Missing meta tags to add

Schema validation issues to resolve

A roadmap for SEO improvement

All for free.

Frequently Asked Questions

1. Do I need coding knowledge to use Gemini CLI?

No. You're just copying and pasting commands. You don't need to understand how they work. Just follow the commands in this guide and read the output.

2. Is Gemini CLI as good as SEMrush?

No. SEMrush does competitor analysis, backlink analysis, and rank tracking. Gemini CLI only does technical SEO audits. They're different tools for different jobs. Use both if you can afford it, but Gemini CLI is better than nothing.

3. Can I use Gemini CLI on someone else's website?

Yes, but be ethical. Don't audit competitors' sites maliciously. You can analyze any public website to learn how to improve yours.

4. How often should I run audits?

Monthly is ideal. Run the audit, fix issues, repeat. You don't need to audit more often than that.

5. What if I get an error when running commands?

Common errors and fixes: (1) "Command not found" = Gemini CLI isn't installed, go back to Step 3 of installation. (2) "Permission denied" = Try adding "sudo" before the command (Mac/Linux). (3) "Invalid URL" = Make sure your URL starts with https:// and has no typos.

6. Can I export the audit results to share with my team?

Yes. All commands have –output flag to save to a file. Share the JSON file or convert to text format.

7. What's the difference between –depth 2, –depth 3, and –depth 5?

Depth means how many levels down your site it crawls. Depth 2 = homepage and one level below. Depth 3 = two levels below. Use depth 3 for most sites.

8. Do I need a Google Cloud project to use Gemini CLI?

Not technically, but it helps. If you want to increase request limits or monitor usage, create a free Google Cloud project and link your CLI to it. For casual audits, not necessary.

FREQUENTLY ASKED QUESTIONS

Do I need coding knowledge to use Gemini CLI?

No. You're just copying and pasting commands. You don't need to understand how they work. Just follow the commands in this guide and read the output.

Is Gemini CLI as good as SEMrush?

No. SEMrush does competitor analysis, backlink analysis, and rank tracking. Gemini CLI only does technical SEO audits. They're different tools for different jobs. Use both if you can afford it, but Gemini CLI is better than nothing.

Can I use Gemini CLI on someone else's website?

Yes, but be ethical. Don't audit competitors' sites maliciously. You can analyze any public website to learn how to improve yours.

How often should I run audits?

Monthly is ideal. Run the audit, fix issues, repeat. You don't need to audit more often than that.

What if I get an error when running commands?

Common errors and fixes: (1) "Command not found" = Gemini CLI isn't installed, go back to Step 3 of installation. (2) "Permission denied" = Try adding "sudo" before the command (Mac/Linux). (3) "Invalid URL" = Make sure your URL starts with https:// and has no typos.

Can I export the audit results to share with my team?

Yes. All commands have –output flag to save to a file. Share the JSON file or convert to text format.

What's the difference between –depth 2, –depth 3, and –depth 5?

Depth means how many levels down your site it crawls. Depth 2 = homepage and one level below. Depth 3 = two levels below. Use depth 3 for most sites.

Do I need a Google Cloud project to use Gemini CLI?

Not technically, but it helps. If you want to increase request limits or monitor usage, create a free Google Cloud project and link your CLI to it. For casual audits, not necessary.

Local SEO Services

AEO Services

What is AEO – Small Business Guide

Local SEO vs AI Automation

Digital Marketing Services

Contact NuroSparx

NANOBANNA JSON METADATA

{

"title": "How to Use Google's Gemini CLI for SEO Audits (Beginner Guide)",

"slug": "gemini-cli-seo-audit-guide",

"excerpt": "Learn how to use Google's Gemini CLI to audit your website for SEO issues, analyze structured data, and generate actionable reports. Free alternative to expensive SEO tools.",

"keywords": [

"google gemini cli seo audit",

"gemini ai command line seo",

"how to use gemini cli marketing",

"free seo audit tool gemini",

"seo analysis with google gemini"

],

"author": "NuroSparx",

"publishDate": "2026-03-07",

"readTime": "14 min read",

"category": "SEO & Technical",

"thumbnail": "gemini-cli-seo-audit.png",

"cta": {

"text": "Get professional SEO audit help",

"url": "https://nurosparx.com/contact/"

}

}

— WORDPRESS HTML BLOG CONTENT (Copy Below) —

Related Nurosparx Resources

Contact NuroSparX | AI-powered Digital Growth

Fix What’s Blocking Your Visibility Across Search and AI

Fix What’s Blocking Your Conversions Without Increasing Ad Spend

Fix What’s Limiting Your Content Growth and Engagement

Ready To Jumpstart Your Business?