@glincker/geo-audit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,286 @@
1
+ # GeoAudit
2
+
3
+ Audit any website's AI-readiness. Get a score 0-100.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@glincker/geo-audit.svg)](https://www.npmjs.com/package/@glincker/geo-audit)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+ [![GitHub stars](https://img.shields.io/github/stars/glincker/geokit.svg)](https://github.com/glincker/geokit)
8
+
9
+ **GeoAudit** is a professional CLI tool that evaluates how well your website is optimized for AI crawlers and generative engines like ChatGPT, Claude, Perplexity, and Google AI Overviews. Get actionable recommendations to improve your GEO (Generative Engine Optimization) strategy.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ # Install globally
15
+ npm install -g @glincker/geo-audit
16
+
17
+ # Or use with npx (no installation)
18
+ npx @glincker/geo-audit https://example.com
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ ```bash
24
+ # Audit a website
25
+ geo-audit https://glincker.com
26
+
27
+ # Output as JSON
28
+ geo-audit https://glincker.com --json
29
+
30
+ # Fail CI/CD if score is below 70
31
+ geo-audit https://glincker.com --fail-under 70
32
+ ```
33
+
34
+ ## Example Output
35
+
36
+ ```
37
+ 🔍 GEO Audit: glincker.com
38
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
39
+
40
+ Score: 72/100 (C)
41
+
42
+ AI Discoverability 15/40
43
+ ❌ llms.txt missing 0/10
44
+ ⚠️ robots.txt (no AI rules) 5/10
45
+ ✅ sitemap.xml 10/10
46
+ ❌ No RSS/Atom feed 0/5
47
+ ⚠️ llms.txt quality 0/5
48
+
49
+ Structured Data 30/35
50
+ ✅ JSON-LD (Organization) 10/10
51
+ ✅ OpenGraph tags 10/10
52
+ ⚠️ Meta description long 3/5
53
+ ✅ Canonical URL 5/5
54
+ ⚠️ Identity schema 2/5
55
+
56
+ Content Quality 30/38
57
+ ⚠️ Heading hierarchy 5/10
58
+ ✅ SSR content detected 10/10
59
+ ⚠️ FAQ (no schema) 2/5
60
+ ✅ Language tag 3/3
61
+ ✅ Image alt text 5/5
62
+ ✅ Semantic HTML 5/5
63
+
64
+ Technical AI-Readiness 18/21
65
+ ⚠️ TTFB: 1087ms 7/10
66
+ ✅ Content-Type + gzip 5/5
67
+ ✅ HTTPS 3/3
68
+ ✅ Viewport meta tag 3/3
69
+
70
+ 📋 Top Recommendations:
71
+ 1. Add /llms.txt (+10 points)
72
+ 2. Add AI crawler rules to robots.txt (+5 points)
73
+ 3. Fix heading hierarchy (+5 points)
74
+
75
+ Powered by GeoKit — geo.glincker.com
76
+ ```
77
+
78
+ ## Audit Rules
79
+
80
+ GeoAudit evaluates **20 rules** across 4 categories:
81
+
82
+ | ID | Rule Name | Category | Max Points |
83
+ |----|-----------|----------|------------|
84
+ | **R01** | llms.txt Exists | AI Discoverability | 10 |
85
+ | **R02** | robots.txt AI Crawler Rules | AI Discoverability | 10 |
86
+ | **R03** | Sitemap.xml Exists | AI Discoverability | 10 |
87
+ | **R18** | RSS/Atom Feed Detection | AI Discoverability | 5 |
88
+ | **R19** | llms.txt Content Quality | AI Discoverability | 5 |
89
+ | **R04** | JSON-LD Schema.org Markup | Structured Data | 10 |
90
+ | **R05** | OpenGraph Tags | Structured Data | 10 |
91
+ | **R06** | Meta Description | Structured Data | 5 |
92
+ | **R07** | Canonical URL | Structured Data | 5 |
93
+ | **R17** | Identity Schema Detection | Structured Data | 5 |
94
+ | **R08** | Heading Hierarchy | Content Quality | 10 |
95
+ | **R09** | Content Accessibility (SSR) | Content Quality | 10 |
96
+ | **R10** | FAQ Content Detection | Content Quality | 5 |
97
+ | **R13** | Language Tag | Content Quality | 3 |
98
+ | **R15** | Image Alt Text Coverage | Content Quality | 5 |
99
+ | **R16** | Semantic HTML | Content Quality | 5 |
100
+ | **R11** | Response Time | Technical AI-Readiness | 10 |
101
+ | **R12** | Content-Type & Encoding | Technical AI-Readiness | 5 |
102
+ | **R14** | HTTPS Enforcement | Technical AI-Readiness | 3 |
103
+ | **R20** | Mobile Viewport Meta Tag | Technical AI-Readiness | 3 |
104
+ | | **TOTAL** | | **134** |
105
+
106
+ Scores are normalized to 0-100 regardless of raw points total.
107
+
108
+ ### Category Breakdown
109
+
110
+ - **AI Discoverability** (40 points): llms.txt, robots.txt, sitemap.xml, RSS feeds, llms.txt quality
111
+ - **Structured Data** (35 points): JSON-LD, OpenGraph, meta tags, canonical URL, identity schema
112
+ - **Content Quality** (38 points): Heading structure, SSR content, FAQ schema, lang tag, alt text, semantic HTML
113
+ - **Technical AI-Readiness** (21 points): Response time, content encoding, HTTPS, viewport
114
+
115
+ ## Scoring
116
+
117
+ Scores are calculated on a 0-100 scale with letter grades:
118
+
119
+ | Grade | Score Range | Description |
120
+ |-------|-------------|-------------|
121
+ | **A** | 90-100 | Excellent AI-readiness |
122
+ | **B** | 75-89 | Good AI optimization |
123
+ | **C** | 60-74 | Acceptable, needs improvement |
124
+ | **D** | 40-59 | Poor AI-readiness |
125
+ | **F** | 0-39 | Critical issues |
126
+
127
+ ## JSON Output
128
+
129
+ Use `--json` to get machine-readable output:
130
+
131
+ ```bash
132
+ geo-audit https://example.com --json
133
+ ```
134
+
135
+ ```json
136
+ {
137
+ "url": "https://example.com",
138
+ "score": 72,
139
+ "grade": "C",
140
+ "timestamp": "2025-02-08T14:30:00.000Z",
141
+ "duration": 1234,
142
+ "version": "0.1.0",
143
+ "categories": [
144
+ {
145
+ "name": "AI Discoverability",
146
+ "slug": "discoverability",
147
+ "maxPoints": 40,
148
+ "score": 15,
149
+ "rules": [...]
150
+ }
151
+ ],
152
+ "rules": [
153
+ {
154
+ "id": "R01",
155
+ "name": "llms.txt Exists",
156
+ "category": "discoverability",
157
+ "status": "fail",
158
+ "score": 0,
159
+ "maxScore": 10,
160
+ "message": "No /llms.txt file found",
161
+ "recommendation": "Add /llms.txt to help AI systems understand your site..."
162
+ }
163
+ ],
164
+ "recommendations": [
165
+ {
166
+ "rule": "R01",
167
+ "message": "Add /llms.txt to help AI systems understand your site...",
168
+ "impact": 10
169
+ }
170
+ ]
171
+ }
172
+ ```
173
+
174
+ ## CLI Flags
175
+
176
+ | Flag | Short | Description |
177
+ |------|-------|-------------|
178
+ | `--json` | `-j` | Output results as JSON instead of formatted text |
179
+ | `--verbose` | | Show detailed information for each rule |
180
+ | `--quiet` | `-q` | Only show score and grade (minimal output) |
181
+ | `--fail-under <n>` | | Exit with code 1 if score is below threshold (useful for CI/CD) |
182
+ | `--timeout <ms>` | | Set HTTP request timeout in milliseconds (default: 10000) |
183
+ | `--no-recommendations` | | Hide the recommendations section from output |
184
+ | `--insecure` | | Skip SSL certificate verification |
185
+ | `--debug` | | Show debug information and HTTP request details |
186
+ | `--help` | `-h` | Display help information |
187
+ | `--version` | `-v` | Show version number |
188
+
189
+ ## Programmatic API
190
+
191
+ Use GeoAudit in your Node.js projects:
192
+
193
+ ```typescript
194
+ import { audit } from '@glincker/geo-audit';
195
+
196
+ const result = await audit('https://example.com', {
197
+ timeout: 10000,
198
+ userAgent: 'MyBot/1.0',
199
+ insecure: false
200
+ });
201
+
202
+ console.log(`Score: ${result.score}/100 (${result.grade})`);
203
+ console.log(`Categories:`, result.categories);
204
+ console.log(`Top recommendation:`, result.recommendations[0]);
205
+ ```
206
+
207
+ ### API Options
208
+
209
+ ```typescript
210
+ interface AuditOptions {
211
+ /** Timeout in milliseconds for each request (default: 10000) */
212
+ timeout?: number;
213
+ /** User-agent to use for requests */
214
+ userAgent?: string;
215
+ /** Skip SSL verification */
216
+ insecure?: boolean;
217
+ }
218
+ ```
219
+
220
+ ## CI/CD Integration
221
+
222
+ Use GeoAudit in your CI/CD pipeline to enforce AI-readiness standards:
223
+
224
+ ```yaml
225
+ # .github/workflows/geo-audit.yml
226
+ name: GEO Audit
227
+
228
+ on:
229
+ pull_request:
230
+ push:
231
+ branches: [main]
232
+
233
+ jobs:
234
+ audit:
235
+ runs-on: ubuntu-latest
236
+ steps:
237
+ - uses: actions/checkout@v4
238
+
239
+ - name: Install Node.js
240
+ uses: actions/setup-node@v4
241
+ with:
242
+ node-version: '18'
243
+
244
+ - name: Run GEO Audit
245
+ run: npx @glincker/geo-audit https://yourdomain.com --fail-under 70
246
+ ```
247
+
248
+ This will fail the build if your site scores below 70/100.
249
+
250
+ ## Why GEO Matters
251
+
252
+ According to Gartner, **94% of CMOs are increasing their GEO budget** in 2025. AI-powered search is fundamentally changing how users discover content:
253
+
254
+ - **ChatGPT, Claude, and Perplexity** now handle millions of searches daily
255
+ - **Google AI Overviews** are displayed in 15%+ of search results
256
+ - **AI crawlers** use different signals than traditional SEO (structured data, llms.txt, response time)
257
+
258
+ Traditional SEO focused on ranking. GEO focuses on **being cited** in AI-generated answers. GeoAudit helps you optimize for this new paradigm.
259
+
260
+ ## What's Next?
261
+
262
+ After running an audit, focus on high-impact improvements:
263
+
264
+ 1. **Add /llms.txt** — A simple markdown file that helps AI understand your site ([llmstxt.org](https://llmstxt.org))
265
+ 2. **Fix structured data** — Add JSON-LD schema for Organization, WebPage, FAQ, and Product
266
+ 3. **Optimize for speed** — AI crawlers have strict timeout limits (aim for <500ms TTFB)
267
+ 4. **Server-side render** — AI crawlers can't execute JavaScript
268
+
269
+ ## Contributing
270
+
271
+ Contributions are welcome! Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines.
272
+
273
+ ## License
274
+
275
+ MIT License - see [LICENSE](../../LICENSE) for details.
276
+
277
+ ## Links
278
+
279
+ - **Website**: [geo.glincker.com](https://geo.glincker.com)
280
+ - **GitHub**: [github.com/glincker/geokit](https://github.com/glincker/geokit)
281
+ - **Issues**: [github.com/glincker/geokit/issues](https://github.com/glincker/geokit/issues)
282
+ - **npm**: [npmjs.com/package/@glincker/geo-audit](https://www.npmjs.com/package/@glincker/geo-audit)
283
+
284
+ ---
285
+
286
+ Made with ❤️ by [Glincker](https://glincker.com) | [geo.glincker.com](https://geo.glincker.com)