aiseo-audit 1.4.3 → 1.4.5

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-7EB6D7.svg)](https://opensource.org/licenses/MIT)
6
6
  [![Node.js](https://img.shields.io/badge/node-%3E%3D20-7EB6D7.svg)](https://nodejs.org)
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-7EB6D7?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
8
- [![Tests](https://img.shields.io/badge/tests-259%20passed-8FBC8F)](https://github.com/agencyenterprise/aiseo-audit)
8
+ [![Tests](https://img.shields.io/badge/tests-454%20passed-8FBC8F)](https://github.com/agencyenterprise/aiseo-audit)
9
9
  [![Coverage](https://img.shields.io/codecov/c/github/agencyenterprise/aiseo-audit?color=8FBC8F&label=coverage)](https://codecov.io/gh/agencyenterprise/aiseo-audit)
10
10
 
11
11
  <div align="center">
@@ -15,9 +15,6 @@
15
15
 
16
16
  Deterministic CLI that audits web pages for **AI search readiness**. Think Lighthouse, but for how well AI engines can fetch, extract, understand, and cite your content.
17
17
 
18
- > [!TIP]
19
- > Run `aiseo-audit https://www.aiseo-audit.com` to see a 100/100 [A Score](https://www.aiseo-audit.com/).
20
-
21
18
  **AI SEO measures how reusable your content is for generative engines, not traditional search rankings.**
22
19
 
23
20
  - [Quick Start](#quick-start)
@@ -83,10 +80,13 @@ aiseo-audit https://example.com --md
83
80
  # HTML report (Lighthouse-style)
84
81
  aiseo-audit https://example.com --html
85
82
 
86
- # Write output to a file (uses the selected format)
83
+ # Write to a file format is inferred from the extension automatically
84
+ aiseo-audit https://example.com --out report.html
85
+ aiseo-audit https://example.com --out report.md
86
+ aiseo-audit https://example.com --out report.json
87
+
88
+ # Explicit format flag still works and takes precedence
87
89
  aiseo-audit https://example.com --html --out report.html
88
- aiseo-audit https://example.com --md --out report.md
89
- aiseo-audit https://example.com --json --out report.json
90
90
 
91
91
  # CI/CD: fail if score below threshold
92
92
  aiseo-audit https://example.com --fail-under 70
@@ -122,22 +122,24 @@ jobs:
122
122
 
123
123
  ## CLI Options
124
124
 
125
- | Option | Description | Default |
126
- | ---------------------- | --------------------------------------------------------------------------- | --------------------------------------------- |
127
- | `[url]` | URL to audit | - |
128
- | `--sitemap <url>` | Audit all URLs in a sitemap.xml | - |
129
- | `--signals-base <url>` | Base URL to fetch domain signals from (robots.txt, llms.txt, llms-full.txt) | Directory of the URL or sitemap being audited |
130
- | `--json` | Output as JSON | - |
131
- | `--md` | Output as Markdown | - |
132
- | `--html` | Output as HTML | - |
133
- | `--out <path>` | Write rendered output to a file | - |
134
- | `--fail-under <n>` | Exit with code 1 if score < threshold | - |
135
- | `--timeout <ms>` | Request timeout in ms | `45000` |
136
- | `--user-agent <ua>` | Custom User-Agent string | `AISEOAudit/<version>` |
137
- | `--config <path>` | Path to config file | - |
125
+ | Option | Description | Default |
126
+ | ---------------------- | --------------------------------------------------------------------------------- | --------------------------------------------- |
127
+ | `[url]` | URL to audit | - |
128
+ | `--sitemap <url>` | Audit all URLs in a sitemap.xml | - |
129
+ | `--signals-base <url>` | Base URL to fetch domain signals from (robots.txt, llms.txt, llms-full.txt) | Directory of the URL or sitemap being audited |
130
+ | `--json` | Output as JSON | - |
131
+ | `--md` | Output as Markdown | - |
132
+ | `--html` | Output as HTML | - |
133
+ | `--out <path>` | Write output to a file; format is inferred from `.html`, `.md`, `.json` extension | - |
134
+ | `--fail-under <n>` | Exit with code 1 if score < threshold | - |
135
+ | `--timeout <ms>` | Request timeout in ms | `45000` |
136
+ | `--user-agent <ua>` | Custom User-Agent string | `AISEOAudit/<version>` |
137
+ | `--config <path>` | Path to config file | - |
138
138
 
139
139
  Either `[url]` or `--sitemap` must be provided, but not both. 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.
140
140
 
141
+ When `--out` is provided, the format is automatically inferred from the file extension (`.html` → HTML, `.md` → Markdown, `.json` → JSON) so you don't need to pass a separate format flag. An explicit `--html`, `--md`, or `--json` flag takes precedence if provided.
142
+
141
143
  ## Site-Wide Auditing
142
144
 
143
145
  Use `--sitemap` to audit every URL in a `sitemap.xml`. Domain signals (`robots.txt`, `llms.txt`, `llms-full.txt`) are fetched once and shared across all URL audits — not re-fetched per page.
@@ -148,8 +150,8 @@ By default, domain signals are fetched from the directory that contains the site
148
150
  # Audit all URLs in a sitemap
149
151
  aiseo-audit --sitemap https://example.com/sitemap.xml
150
152
 
151
- # With HTML output
152
- aiseo-audit --sitemap https://example.com/sitemap.xml --html --out report.html
153
+ # With HTML output — format inferred from extension
154
+ aiseo-audit --sitemap https://example.com/sitemap.xml --out report.html
153
155
 
154
156
  # Override where domain signals are fetched from
155
157
  aiseo-audit --sitemap https://example.com/projects/sitemap.xml --signals-base https://example.com
@@ -227,19 +229,19 @@ The audit evaluates 7 categories of AI search readiness (_[Detailed Breakdown he
227
229
 
228
230
  ### Pretty (default)
229
231
 
230
- Color-coded terminal output with scores, factor breakdowns, and top recommendations. Best for quick checks during development.
232
+ Color-coded terminal output with scores, factor breakdowns, and recommendations. Where available, recommendations include numbered implementation steps, a ready-to-use code example, and a learn more link. Best for quick checks during development.
231
233
 
232
234
  ### JSON
233
235
 
234
- Full structured output with all scores, factor details, raw data, and recommendations. Best for integrations, CI/CD pipelines, and programmatic consumption.
236
+ Full structured output with all scores, factor details, raw data, and recommendations. Recommendations include optional `steps`, `codeExample`, and `learnMoreUrl` fields where applicable. Best for integrations, CI/CD pipelines, and programmatic consumption.
235
237
 
236
238
  ### Markdown
237
239
 
238
- Structured report with category tables, factor details, and recommendations grouped by category. Best for documentation, PRs, and sharing.
240
+ Structured report with category tables, factor details, and recommendations grouped by category. Recommendations with steps render as numbered lists; code examples render as fenced code blocks. Best for documentation, PRs, and sharing.
239
241
 
240
242
  ### HTML
241
243
 
242
- Self-contained single-file report with SVG score gauges, color-coded sections, and recommendations grouped by category. Best for stakeholder reports and visual review.
244
+ Self-contained single-file report with SVG score gauges, color-coded sections, and recommendations grouped by category. Recommendations with steps and code examples render as inline detail sections below each recommendation row. Best for stakeholder reports and visual review.
243
245
 
244
246
  ## Config File
245
247
 
@@ -303,6 +305,21 @@ import type {
303
305
  } from "aiseo-audit";
304
306
  ```
305
307
 
308
+ `RecommendationType` includes the base fields (`category`, `factor`, `currentValue`, `priority`, `recommendation`) plus three optional fields populated for high-impact factors:
309
+
310
+ ```typescript
311
+ type RecommendationType = {
312
+ category: string;
313
+ factor: string;
314
+ currentValue: string;
315
+ priority: "high" | "medium" | "low";
316
+ recommendation: string;
317
+ steps?: string[]; // ordered implementation steps
318
+ codeExample?: string; // ready-to-use code snippet
319
+ learnMoreUrl?: string; // link to canonical spec or docs
320
+ };
321
+ ```
322
+
306
323
  ## Philosophy
307
324
 
308
325
  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.