aiseo-audit 1.4.17 → 1.5.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 +207 -13
- package/bin/aiseo-audit-mcp.js +2 -0
- package/dist/chunk-FEV5H6QZ.js +631 -0
- package/dist/chunk-HJEFIA55.js +265 -0
- package/dist/chunk-L5CJNHMJ.mjs +265 -0
- package/dist/chunk-PLDJJNHZ.mjs +631 -0
- package/dist/cli.js +3 -3
- package/dist/cli.mjs +3 -3
- package/dist/index.d.mts +47 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.d.mts +2 -0
- package/dist/mcp.d.ts +2 -0
- package/dist/mcp.js +2 -0
- package/dist/mcp.mjs +2 -0
- package/package.json +5 -2
- package/dist/chunk-4ZVV64UE.mjs +0 -753
- package/dist/chunk-YPNUL35A.js +0 -753
package/README.md
CHANGED
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
[](https://www.typescriptlang.org/)
|
|
9
|
-
[](https://github.com/agencyenterprise/aiseo-audit)
|
|
10
10
|
[](https://codecov.io/gh/agencyenterprise/aiseo-audit)
|
|
11
11
|
[](https://github.com/agencyenterprise/aiseo-audit/stargazers)
|
|
12
|
+

|
|
12
13
|
|
|
13
14
|
<div align="center">
|
|
14
15
|
<strong>Testing example</strong><br /><br />
|
|
@@ -22,6 +23,9 @@ Deterministic CLI that audits web pages for **AI search readiness**. Think Light
|
|
|
22
23
|
**Who is this for?** Content teams running pre-publish checks, developers gating deployments in CI/CD, and marketers auditing their own or competitor pages. If your content needs to be cited (not just ranked), this tool tells you where you stand.
|
|
23
24
|
|
|
24
25
|
- [Quick Start](#quick-start)
|
|
26
|
+
- [Quick Summary Mode](#quick-summary-mode)
|
|
27
|
+
- [Tracking AI SEO Over Time](#tracking-ai-seo-over-time)
|
|
28
|
+
- [Use with AI Assistants (MCP)](#use-with-ai-assistants-mcp)
|
|
25
29
|
- [CI/CD](#cicd)
|
|
26
30
|
- [CLI Options](#cli-options)
|
|
27
31
|
- [Site-Wide Auditing](#site-wide-auditing)
|
|
@@ -75,6 +79,12 @@ npm install -g aiseo-audit
|
|
|
75
79
|
# Pretty terminal output (default)
|
|
76
80
|
aiseo-audit https://example.com
|
|
77
81
|
|
|
82
|
+
# Quick summary only (top 3 wins + projected score, skip the full breakdown)
|
|
83
|
+
aiseo-audit https://example.com --tldr
|
|
84
|
+
|
|
85
|
+
# Track score changes over time
|
|
86
|
+
aiseo-audit https://example.com --diff
|
|
87
|
+
|
|
78
88
|
# JSON output
|
|
79
89
|
aiseo-audit https://example.com --json
|
|
80
90
|
|
|
@@ -105,9 +115,150 @@ aiseo-audit https://example.com --user-agent "MyBot/1.0"
|
|
|
105
115
|
aiseo-audit https://example.com --config aiseo.config.json
|
|
106
116
|
```
|
|
107
117
|
|
|
118
|
+
## Quick Summary Mode
|
|
119
|
+
|
|
120
|
+
Use `--tldr` to get just the top 3 highest-impact fixes and the projected score after applying them. No detailed category breakdown, no long recommendations list. Ideal for CI logs, Slack notifications, and quick pre-publish checks.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
aiseo-audit https://example.com --tldr
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
============================================================
|
|
128
|
+
AI SEO Audit
|
|
129
|
+
https://example.com
|
|
130
|
+
============================================================
|
|
131
|
+
|
|
132
|
+
Score: 59/100 Grade: F → Top 3 fixes: ~87/100 B+
|
|
133
|
+
|
|
134
|
+
Quickest wins:
|
|
135
|
+
1. +13 pts Answer Capsules (Answerability)
|
|
136
|
+
2. +10 pts Author Attribution (Authority Context)
|
|
137
|
+
3. +7 pts Image Alt Text (Content Extractability)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`--tldr` works with every output format (`--json`, `--md`, `--html`) so you can pipe it into any integration. Combine with `--out` to write a slim summary to a file.
|
|
141
|
+
|
|
142
|
+
## Tracking AI SEO Over Time
|
|
143
|
+
|
|
144
|
+
`--diff` records every audit and shows you what changed since the last run for the same URL.
|
|
145
|
+
|
|
146
|
+
> [!IMPORTANT]
|
|
147
|
+
> `--diff` is the only flag that writes files outside of `--out`. On first use it creates `./audits/` (or your configured `historyDir`) and an `aiseo.config.json` in the current directory if one doesn't exist. Both are announced on stderr the moment they're created — nothing is written silently. Add `./audits/` to `.gitignore` if you don't want the history tracked in version control, or commit it to keep a record of AI SEO over time.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# First run — establishes a baseline
|
|
151
|
+
aiseo-audit https://example.com --diff
|
|
152
|
+
|
|
153
|
+
# Subsequent runs — shows the delta
|
|
154
|
+
aiseo-audit https://example.com --diff
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Output on the second run:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Changes since baseline (2026-04-10 → 2026-04-17)
|
|
161
|
+
Overall 59 → 68 (+9)
|
|
162
|
+
Answerability 18 → 28 (+10)
|
|
163
|
+
Grounding Signals 23 → 26 (+3)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**How it works.** Each `--diff` run writes a full JSON audit to `./audits/<slug>-<timestamp>.json` and appends an entry to `aiseo.config.json` under a `diff` key. Nothing is ever overwritten — every run is preserved so you can walk the history.
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"historyDir": "./audits",
|
|
171
|
+
"diff": {
|
|
172
|
+
"https://example.com": [
|
|
173
|
+
{
|
|
174
|
+
"path": "audits/example-2026-04-10.json",
|
|
175
|
+
"timestamp": "2026-04-10T…",
|
|
176
|
+
"score": 59
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"path": "audits/example-2026-04-17.json",
|
|
180
|
+
"timestamp": "2026-04-17T…",
|
|
181
|
+
"score": 68
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Saving a formatted report alongside the baseline
|
|
189
|
+
|
|
190
|
+
`--diff` always writes the JSON baseline to `historyDir` automatically. If you also want a human-friendly report (HTML, Markdown, pretty), pass `--out` with a file path and the rendered report will be written there:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Creates two files: the auto-named JSON baseline in ./audits/,
|
|
194
|
+
# and a rendered HTML report at ./audits/report.html.
|
|
195
|
+
aiseo-audit https://example.com --diff --html --out ./audits/report.html
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
`--out` never replaces the baseline. It's purely for the rendered report. If `--out` points at an existing directory, the audit exits early with a clear error rather than silently writing an invalid file.
|
|
199
|
+
|
|
200
|
+
### Cross-URL timeline
|
|
201
|
+
|
|
202
|
+
Drop the URL and pass `--diff --all` to see every tracked URL at a glance with a sparkline of its history:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
aiseo-audit --diff --all
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
Audit History (2 URLs tracked, 7 total runs)
|
|
210
|
+
|
|
211
|
+
https://example.com ▂▅▇▆ 59 → 68 → 72 → 70
|
|
212
|
+
https://another-site.com ▇▇ 72 → 72
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Works with `--html` for a shareable timeline page with inline SVG line charts.
|
|
216
|
+
|
|
217
|
+
### Explicit baseline
|
|
218
|
+
|
|
219
|
+
If you want to compare against a specific prior JSON result without touching the tracked history, use `--baseline`:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
aiseo-audit https://example.com --baseline ./previous-audit.json
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Use with AI Assistants (MCP)
|
|
226
|
+
|
|
227
|
+
aiseo-audit ships an [MCP](https://modelcontextprotocol.io) server so Cursor, Claude Desktop, Windsurf, and any other MCP client can call the `audit_url` tool inline in a chat.
|
|
228
|
+
|
|
229
|
+
No install required — the server runs via `npx` from the published package.
|
|
230
|
+
|
|
231
|
+
**Cursor** (`~/.cursor/mcp.json`):
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"mcpServers": {
|
|
236
|
+
"aiseo-audit": {
|
|
237
|
+
"command": "npx",
|
|
238
|
+
"args": ["-y", "aiseo-audit-mcp"]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"mcpServers": {
|
|
249
|
+
"aiseo-audit": {
|
|
250
|
+
"command": "npx",
|
|
251
|
+
"args": ["-y", "aiseo-audit-mcp"]
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Once configured, prompt your assistant naturally — e.g. "audit https://mysite.com for AI search readiness" — and it will invoke the tool and return a full audit inline.
|
|
258
|
+
|
|
108
259
|
## CI/CD
|
|
109
260
|
|
|
110
|
-
Drop
|
|
261
|
+
aiseo-audit ships an official [GitHub Action](https://github.com/marketplace/actions/ai-seo-audit). Drop it into any workflow to gate PRs on AI search readiness and post a sticky PR comment with the summary:
|
|
111
262
|
|
|
112
263
|
```yaml
|
|
113
264
|
# .github/workflows/aiseo-audit.yml
|
|
@@ -120,8 +271,23 @@ on:
|
|
|
120
271
|
jobs:
|
|
121
272
|
audit:
|
|
122
273
|
runs-on: ubuntu-latest
|
|
274
|
+
permissions:
|
|
275
|
+
pull-requests: write
|
|
123
276
|
steps:
|
|
124
|
-
-
|
|
277
|
+
- uses: agencyenterprise/aiseo-audit@v1
|
|
278
|
+
with:
|
|
279
|
+
url: https://yoursite.com
|
|
280
|
+
fail-under: 70
|
|
281
|
+
comment-on-pr: true
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
With `comment-on-pr: true`, the Action updates a single sticky comment on each PR with the TL;DR score, grade, and top fixes — so reviewers see the impact of content changes inline.
|
|
285
|
+
|
|
286
|
+
Prefer a one-liner without the Action wrapper? This still works:
|
|
287
|
+
|
|
288
|
+
```yaml
|
|
289
|
+
steps:
|
|
290
|
+
- run: npx aiseo-audit https://yoursite.com --fail-under 70
|
|
125
291
|
```
|
|
126
292
|
|
|
127
293
|
**Using a preview deployment URL?** If your CI pipeline produces a dynamic URL (e.g. a Vercel or Netlify preview), capture it from a prior step and pass it in:
|
|
@@ -157,8 +323,12 @@ The `--fail-under` threshold sets the minimum acceptable score. Exit code `1` is
|
|
|
157
323
|
| `--timeout <ms>` | Request timeout in ms | `45000` |
|
|
158
324
|
| `--user-agent <ua>` | Custom User-Agent string | `AISEOAudit/<version>` |
|
|
159
325
|
| `--config <path>` | Path to config file | - |
|
|
326
|
+
| `--tldr` | Emit only the TL;DR summary (no detailed breakdown) | - |
|
|
327
|
+
| `--diff` | Track score over time: record this run, diff against the previous recorded run | - |
|
|
328
|
+
| `--all` | With `--diff` and no URL, render audit history across all tracked URLs | - |
|
|
329
|
+
| `--baseline <path>` | Diff against a specific prior JSON result (bypasses history tracking) | - |
|
|
160
330
|
|
|
161
|
-
Either `[url]` or `--sitemap` must be provided
|
|
331
|
+
Either `[url]` or `--sitemap` must be provided (or `--diff --all` for the cross-URL timeline). If no output flag is given, the default is `pretty` (color-coded terminal output). The default format can also be set in the config file.
|
|
162
332
|
|
|
163
333
|
When `--out` is provided, the format is automatically inferred from the file extension (`.html` becomes HTML, `.md` becomes Markdown, `.json` becomes JSON) so you don't need to pass a separate format flag. An explicit `--html`, `--md`, or `--json` flag takes precedence if provided.
|
|
164
334
|
|
|
@@ -217,7 +387,10 @@ The audit also checks for three domain-level files that AI crawlers look for:
|
|
|
217
387
|
- **`llms.txt`** is a proposed standard that provides LLMs with a concise summary of your site's purpose, key pages, and preferred citation format.
|
|
218
388
|
- **`llms-full.txt`** is the extended version of `llms.txt` with more comprehensive site documentation.
|
|
219
389
|
|
|
220
|
-
When auditing over HTTP, these files are checked against your local server. If your local server serves them, they will pass. If not, they will show as missing.
|
|
390
|
+
When auditing over HTTP, these files are checked against your local server. If your local server serves them, they will pass. If not, they will show as missing.
|
|
391
|
+
|
|
392
|
+
> [!NOTE]
|
|
393
|
+
> Local audit results may differ slightly from production. Domain signal files (`robots.txt`, `llms.txt`, `llms-full.txt`) are often configured at the hosting or CDN level and may not be present on your local dev server. Always verify these signals separately against your production domain.
|
|
221
394
|
|
|
222
395
|
## Audit Categories
|
|
223
396
|
|
|
@@ -238,13 +411,22 @@ The audit evaluates 7 categories of AI search readiness (_[Detailed Breakdown he
|
|
|
238
411
|
|
|
239
412
|
### Interpreting Your Score
|
|
240
413
|
|
|
414
|
+
Grades follow a standard US academic scale with +/- sub-grades for granular tracking across iterations.
|
|
415
|
+
|
|
241
416
|
| Score | Grade | What It Means |
|
|
242
417
|
| ------ | ----- | -------------------------------------------------------------------------------------------------------- |
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
418
|
+
| 93–100 | A | Highly optimized. AI engines can fetch, understand, and cite your content with minimal friction. |
|
|
419
|
+
| 90–92 | A- | Near top tier. A handful of polish items stand between you and an A. |
|
|
420
|
+
| 87–89 | B+ | Strong foundation with a few high-impact gaps worth closing. |
|
|
421
|
+
| 83–86 | B | Good foundation. Targeted improvements will push you into the top tier. |
|
|
422
|
+
| 80–82 | B- | Solid, but several category gaps are holding back citation potential. |
|
|
423
|
+
| 77–79 | C+ | Above average. Structural or content gaps are limiting citation potential. |
|
|
424
|
+
| 73–76 | C | Moderate readiness. Multiple categories need attention. |
|
|
425
|
+
| 70–72 | C- | Below the comfort zone. Prioritize high-impact recommendations. |
|
|
426
|
+
| 67–69 | D+ | Noticeable gaps across core signals. |
|
|
427
|
+
| 63–66 | D | Significant gaps. Core signals (structure, answerability, authority) need attention. |
|
|
428
|
+
| 60–62 | D- | On the edge of failing. Most categories need meaningful work. |
|
|
429
|
+
| 0–59 | F | Not AI-ready. Start with Content Extractability. If the content cannot be fetched, nothing else matters. |
|
|
248
430
|
|
|
249
431
|
The per-category breakdown in each report shows exactly where to focus. Start with high-priority recommendations in your lowest-scoring categories.
|
|
250
432
|
|
|
@@ -295,12 +477,16 @@ You can also pass an explicit path with `--config path/to/config.json`.
|
|
|
295
477
|
"groundingSignals": 1,
|
|
296
478
|
"authorityContext": 1,
|
|
297
479
|
"readabilityForCompression": 1
|
|
298
|
-
}
|
|
480
|
+
},
|
|
481
|
+
"historyDir": "./audits",
|
|
482
|
+
"diff": {}
|
|
299
483
|
}
|
|
300
484
|
```
|
|
301
485
|
|
|
302
486
|
Weights are relative. Set a category to `2` to double its importance, or `0` to exclude it entirely from scoring.
|
|
303
487
|
|
|
488
|
+
`historyDir` controls where `--diff` writes audit JSONs (default `./audits`). `diff` is managed by the tool — each `--diff` run appends an entry keyed by URL. See [Tracking AI SEO Over Time](#tracking-ai-seo-over-time).
|
|
489
|
+
|
|
304
490
|
**Example: tuning for a blog or editorial site.** Content that needs to be cited by AI engines should be highly answerable and readable. Double those weights and reduce the emphasis on domain-signal files (`authorityContext` covers schema markup, while `groundingSignals` covers citations and statistics):
|
|
305
491
|
|
|
306
492
|
```json
|
|
@@ -363,6 +549,9 @@ import type {
|
|
|
363
549
|
AuditResultType,
|
|
364
550
|
CategoryNameType,
|
|
365
551
|
CategoryResultType,
|
|
552
|
+
CategoryDeltaType,
|
|
553
|
+
DiffEntryType,
|
|
554
|
+
DiffResultType,
|
|
366
555
|
FactorResultType,
|
|
367
556
|
RecommendationType,
|
|
368
557
|
ReportFormatType,
|
|
@@ -370,7 +559,7 @@ import type {
|
|
|
370
559
|
} from "aiseo-audit";
|
|
371
560
|
```
|
|
372
561
|
|
|
373
|
-
`RecommendationType` includes the base fields (`category`, `factor`, `currentValue`, `priority`, `recommendation`) plus
|
|
562
|
+
`RecommendationType` includes the base fields (`category`, `factor`, `currentValue`, `priority`, `recommendation`) plus optional fields populated for high-impact factors:
|
|
374
563
|
|
|
375
564
|
```typescript
|
|
376
565
|
type RecommendationType = {
|
|
@@ -379,12 +568,17 @@ type RecommendationType = {
|
|
|
379
568
|
currentValue: string;
|
|
380
569
|
priority: "high" | "medium" | "low";
|
|
381
570
|
recommendation: string;
|
|
571
|
+
expectedGain?: number; // points you'd recover by resolving this factor
|
|
382
572
|
steps?: string[]; // ordered implementation steps
|
|
383
573
|
codeExample?: string; // ready-to-use code snippet
|
|
384
574
|
learnMoreUrl?: string; // link to canonical spec or docs
|
|
385
575
|
};
|
|
386
576
|
```
|
|
387
577
|
|
|
578
|
+
### Diffing results programmatically
|
|
579
|
+
|
|
580
|
+
`computeDiff(current, baseline)` compares two `AnalyzerResultType` values and returns a `DiffResultType` with the overall delta and per-category deltas. Pair with `renderDiffReport(result, diff, { format })` to render the diff in any format, or `renderHistoryTimeline(diffMap, { format })` to render a cross-URL timeline from a tracked history map.
|
|
581
|
+
|
|
388
582
|
## Philosophy
|
|
389
583
|
|
|
390
584
|
This tool measures **AI search reusability**: how well a page's content can be fetched, extracted, understood, and reused by AI engines like ChatGPT, Claude, Perplexity, and Gemini.
|
|
@@ -410,7 +604,7 @@ It is:
|
|
|
410
604
|
|
|
411
605
|
**Zod** - Uses [Zod 4](https://zod.dev). If you consume the library API and also use Zod in your project, ensure you are on Zod 4+ to avoid type incompatibilities.
|
|
412
606
|
|
|
413
|
-
**CJS bin
|
|
607
|
+
**CJS bin entries** - Both `bin/aiseo-audit.js` (CLI) and `bin/aiseo-audit-mcp.js` (MCP server) use `require()` (CommonJS). This is compatible with all Node 20+ environments regardless of your project's module system. The library exports support both ESM (`import`) and CJS (`require`).
|
|
414
608
|
|
|
415
609
|
**Config discovery** - When using the programmatic API, `loadConfig()` searches for config files starting from `process.cwd()`. If your application's working directory differs from where your config file lives, pass an explicit path:
|
|
416
610
|
|