Metadata-Version: 2.4
Name: causabi-geo
Version: 0.1.1
Summary: Fix how AI search engines see your website
Project-URL: Homepage, https://causabi.com
Project-URL: Repository, https://github.com/SHADRINMMM/geo-optimizer
Project-URL: Documentation, https://causabi.com/docs
License: MIT
License-File: LICENSE
Keywords: ai,chatgpt,geo,llm,llms-txt,perplexity,schema,seo
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Python: >=3.11
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.25
Requires-Dist: pydantic>=2.0
Requires-Dist: rich>=13.0
Provides-Extra: ai
Requires-Dist: google-generativeai>=0.8; extra == 'ai'
Provides-Extra: dev
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# causabi-geo — GEO Fix Engine

[![PyPI version](https://badge.fury.io/py/causabi-geo.svg)](https://pypi.org/project/causabi-geo/)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> **Optimize your website for AI search engines** — ChatGPT, Perplexity, Gemini, and Yandex GPT.

73% of websites are invisible to AI search. ChatGPT and Perplexity actively crawl and cite sources — but only sites with proper signals: robots.txt access, Schema.org markup, FAQ structured data, and a clear content structure. `causabi-geo` audits and fixes all of this in one command.

---

## Install

```bash
pip install causabi-geo
```

## Quick Start

```bash
# Score your site (0–100)
geo-optimizer analyze https://yourdomain.com

# Generate all fix files
geo-optimizer fix https://yourdomain.com --output ./geo-fixes
```

## What It Checks

| Signal | Weight | Why It Matters |
|--------|--------|----------------|
| **robots.txt** | 20/100 | GPTBot, ClaudeBot, PerplexityBot must be allowed |
| **Schema.org** | 25/100 | Organization / SoftwareApplication structured data |
| **FAQ Schema** | 20/100 | FAQPage JSON-LD → **+41% citation rate** in AI responses |
| **Content depth** | 15/100 | Substantive pages get cited more than thin ones |
| **Brand signals** | 10/100 | LinkedIn, GitHub, sameAs links establish authority |
| **Freshness** | 10/100 | Recently updated pages rank higher in AI retrieval |

## Example Output

```
╭─────────────────── GEO Optimizer ───────────────────╮
│                                                      │
│    https://mybusiness.com                            │
│                                                      │
│    AI Readiness Score: 23/100  Grade F               │
│    ███░░░░░░░░░░░░░░░░░░░░░░░░░░░                    │
│                                                      │
╰──────────────────────────────────────────────────────╯

  Category      Score   Max   Status
  robots.txt        0    20   ❌ GPTBot blocked
  Schema.org        0    25   ❌ No structured data
  FAQ Schema        0    20   ❌ No FAQPage markup
  Content          13    15   ✅
  Brand / NAP       8    10   ✅
  Freshness         2    10   ⚠️  Last updated 8 months ago

Issues to fix:
  ❌ GPTBot, ClaudeBot, PerplexityBot are blocked in robots.txt
  ❌ No FAQPage schema — citation rate is 41% lower without it
  ❌ No Schema.org Organization or Product markup
```

## What `fix` Generates

Running `geo-optimizer fix` produces a `./geo-fixes/` directory with ready-to-deploy files:

| File | What it does |
|------|-------------|
| `robots.txt` | Patched to allow all major AI crawlers |
| `schema.json` | Organization / SoftwareApplication JSON-LD |
| `faq-schema.json` | FAQPage JSON-LD for your top questions |
| `llms.txt` | AI-readable site description ([llms.txt standard](https://llmstxt.org)) |
| `HOW-TO-APPLY.md` | Step-by-step instructions for each file |

## Commands

```bash
# Analyze
geo-optimizer analyze <url>                # Score + issues list
geo-optimizer analyze <url> --json         # Machine-readable JSON

# Fix
geo-optimizer fix <url>                    # Generate all fix files
geo-optimizer fix <url> --output ./out     # Custom output directory
geo-optimizer fix <url> --api-key KEY      # AI-generated FAQ (Gemini API key)

# Version
geo-optimizer --version
```

## AI-Generated FAQ (optional)

With a Gemini API key, the `fix` command generates contextually accurate FAQ questions and answers for your specific business — not generic templates:

```bash
geo-optimizer fix https://yourdomain.com --api-key your-gemini-api-key
```

Get a free Gemini API key at [aistudio.google.com](https://aistudio.google.com).

## Research Behind the Scoring

The scoring weights are based on:

- **[GEO paper (Aggarwal et al., 2023)](https://arxiv.org/abs/2311.09735)** — Princeton NLP research on Generative Engine Optimization
- **FAQ schema study** — FAQPage JSON-LD increases AI citation rate by 41% (24% baseline → 65% with FAQ + other signals)
- **AI crawler audit** — 73% of analyzed sites block at least one major AI crawler in robots.txt

## Full SaaS Platform

The CLI provides a single-page snapshot. For a complete multi-page audit with weekly AI citation monitoring (ChatGPT, Perplexity, Gemini):

→ **[causabi.com](https://causabi.com)** — free public score + full audit after signup

## License

MIT — see [LICENSE](LICENSE)
