ai-search-auditor 0.1.1 → 0.1.4
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/CHANGELOG.md +21 -0
- package/README.md +2 -0
- package/dist/cli.js +14 -3
- package/dist/i18n/en.d.ts +10 -1
- package/dist/i18n/en.js +12 -1
- package/dist/i18n/index.d.ts +16 -2
- package/dist/i18n/ru.js +4 -1
- package/dist/report.js +14 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.4](https://github.com/a-bibikov/ai-search-audit/compare/v0.1.3...v0.1.4) (2026-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Internal
|
|
7
|
+
|
|
8
|
+
* release 0.1.4 ([2c8056d](https://github.com/a-bibikov/ai-search-audit/commit/2c8056d386588262362e66c5fce78726df9127d8))
|
|
9
|
+
|
|
10
|
+
## [0.1.3](https://github.com/a-bibikov/ai-search-audit/compare/v0.1.2...v0.1.3) (2026-11-03)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
* CLI help names the npm package, --version flag ([31887fa](https://github.com/a-bibikov/ai-search-audit/commit/31887fada369eb41024f119b79359e5a98c03126))
|
|
16
|
+
|
|
17
|
+
## [0.1.2](https://github.com/a-bibikov/ai-search-audit/compare/v0.1.1...v0.1.2) (2026-11-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### New checks and features
|
|
21
|
+
|
|
22
|
+
* checklist by section at the end of the report ([c43423c](https://github.com/a-bibikov/ai-search-audit/commit/c43423c6f1c522de056552980c39db7cb411b082))
|
|
23
|
+
|
|
3
24
|
## [0.1.1](https://github.com/a-bibikov/ai-search-audit/compare/v0.1.0...v0.1.1) (2026-11-03)
|
|
4
25
|
|
|
5
26
|
|
package/README.md
CHANGED
|
@@ -68,6 +68,8 @@ Gaps in the numbering are taken by the checks on the [roadmap](#roadmap).
|
|
|
68
68
|
|
|
69
69
|
Levels: `error` — AI search cannot read the page or reads it wrong; `warn` — lowers the chance of a citation; `info` — a recommendation.
|
|
70
70
|
|
|
71
|
+
The report lists the findings with fixes first, then ends with a checklist of every check by group: ✓ OK, ✖ error, ⚠ warning, ℹ note.
|
|
72
|
+
|
|
71
73
|
**Score:** 100 minus 15 per rule with an error and 5 per rule with a warning. A rule counts once, not per page, so one template bug does not sink a large site. A ≥ 90, B ≥ 80, C ≥ 70, D ≥ 60, F below.
|
|
72
74
|
|
|
73
75
|
## Usage
|
package/dist/cli.js
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
import { existsSync, readFileSync, writeFileSync, appendFileSync } from "node:fs";
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
4
|
import { DEFAULT_LANG, LANGS, audit, isLang, rules, toMarkdown } from "./index.js";
|
|
5
|
-
|
|
5
|
+
// package.json sits one level up both from src/cli.ts (development) and dist/cli.js (published package).
|
|
6
|
+
const { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
7
|
+
const HELP = `ai-search-auditor ${version} — can ChatGPT, Claude and Perplexity read, understand and cite your site?
|
|
6
8
|
|
|
7
9
|
Usage:
|
|
8
|
-
ai-search-
|
|
9
|
-
ai-search-
|
|
10
|
+
ai-search-auditor <url> [options]
|
|
11
|
+
ai-search-auditor llms-txt <url> check only llms.txt and llms-full.txt
|
|
12
|
+
|
|
13
|
+
npm package: ai-search-auditor (npx ai-search-auditor, npm i -g ai-search-auditor).
|
|
14
|
+
After install the command also works as ai-search-audit.
|
|
10
15
|
|
|
11
16
|
Options:
|
|
12
17
|
--base <url> public origin when auditing a local build (links in sitemap point there)
|
|
@@ -16,6 +21,7 @@ Options:
|
|
|
16
21
|
--json print the JSON report instead of Markdown
|
|
17
22
|
--out <file> also write the report to a file (.json or .md)
|
|
18
23
|
--config <file> config file (default: ai-search-audit.config.json if present)
|
|
24
|
+
-v, --version print the version
|
|
19
25
|
-h, --help
|
|
20
26
|
|
|
21
27
|
Examples:
|
|
@@ -34,8 +40,13 @@ const { values, positionals } = parseArgs({
|
|
|
34
40
|
out: { type: "string" },
|
|
35
41
|
config: { type: "string" },
|
|
36
42
|
help: { type: "boolean", short: "h", default: false },
|
|
43
|
+
version: { type: "boolean", short: "v", default: false },
|
|
37
44
|
},
|
|
38
45
|
});
|
|
46
|
+
if (values.version) {
|
|
47
|
+
process.stdout.write(`${version}\n`);
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
39
50
|
const llmsOnly = positionals[0] === "llms-txt";
|
|
40
51
|
const target = llmsOnly ? positionals[1] : positionals[0];
|
|
41
52
|
if (values.help || !target) {
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -15,8 +15,17 @@ export declare const en: {
|
|
|
15
15
|
}) => string;
|
|
16
16
|
clean: string;
|
|
17
17
|
fix: string;
|
|
18
|
+
/** Label instead of «Fix» when a rule has only notes: nothing is broken, it is advice. */
|
|
19
|
+
recommendation: string;
|
|
18
20
|
more: (n: number) => string;
|
|
19
|
-
|
|
21
|
+
checklist: string;
|
|
22
|
+
legend: string;
|
|
23
|
+
/** Findings of one rule in the checklist: «2 errors, 1 warning». */
|
|
24
|
+
count: (o: {
|
|
25
|
+
errors: number;
|
|
26
|
+
warnings: number;
|
|
27
|
+
notes: number;
|
|
28
|
+
}) => string;
|
|
20
29
|
site: string;
|
|
21
30
|
footer: (pages: number, date: string) => string;
|
|
22
31
|
groups: {
|
package/dist/i18n/en.js
CHANGED
|
@@ -8,8 +8,19 @@ export const en = {
|
|
|
8
8
|
summary: (o) => `**${o.score}/100 (${o.grade})** · ${o.errors} errors · ${o.warnings} warnings · ${o.notes} notes · ${o.pages} pages`,
|
|
9
9
|
clean: "Nothing to fix: AI search can read, understand and cite these pages.",
|
|
10
10
|
fix: "Fix",
|
|
11
|
+
/** Label instead of «Fix» when a rule has only notes: nothing is broken, it is advice. */
|
|
12
|
+
recommendation: "Recommendation",
|
|
11
13
|
more: (n) => `…and ${n} more`,
|
|
12
|
-
|
|
14
|
+
checklist: "Checklist",
|
|
15
|
+
legend: "✓ OK · ✖ error · ⚠ warning · ℹ note",
|
|
16
|
+
/** Findings of one rule in the checklist: «2 errors, 1 warning». */
|
|
17
|
+
count: (o) => [
|
|
18
|
+
o.errors && `${o.errors} ${o.errors === 1 ? "error" : "errors"}`,
|
|
19
|
+
o.warnings && `${o.warnings} ${o.warnings === 1 ? "warning" : "warnings"}`,
|
|
20
|
+
o.notes && `${o.notes} ${o.notes === 1 ? "note" : "notes"}`,
|
|
21
|
+
]
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.join(", "),
|
|
13
24
|
site: "site",
|
|
14
25
|
footer: (pages, date) => `Checked ${pages} pages on ${date}. Also check by hand after each deploy: the live CDN and bot protection with real AI agents (A-3), Google Search Console, Bing Webmaster Tools (ChatGPT search uses Bing), Yandex Webmaster.`,
|
|
15
26
|
groups: {
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -15,8 +15,15 @@ export declare const LANGS: {
|
|
|
15
15
|
}) => string;
|
|
16
16
|
clean: string;
|
|
17
17
|
fix: string;
|
|
18
|
+
recommendation: string;
|
|
18
19
|
more: (n: number) => string;
|
|
19
|
-
|
|
20
|
+
checklist: string;
|
|
21
|
+
legend: string;
|
|
22
|
+
count: (o: {
|
|
23
|
+
errors: number;
|
|
24
|
+
warnings: number;
|
|
25
|
+
notes: number;
|
|
26
|
+
}) => string;
|
|
20
27
|
site: string;
|
|
21
28
|
footer: (pages: number, date: string) => string;
|
|
22
29
|
groups: {
|
|
@@ -166,8 +173,15 @@ export declare const LANGS: {
|
|
|
166
173
|
}) => string;
|
|
167
174
|
clean: string;
|
|
168
175
|
fix: string;
|
|
176
|
+
recommendation: string;
|
|
169
177
|
more: (n: number) => string;
|
|
170
|
-
|
|
178
|
+
checklist: string;
|
|
179
|
+
legend: string;
|
|
180
|
+
count: (o: {
|
|
181
|
+
errors: number;
|
|
182
|
+
warnings: number;
|
|
183
|
+
notes: number;
|
|
184
|
+
}) => string;
|
|
171
185
|
site: string;
|
|
172
186
|
footer: (pages: number, date: string) => string;
|
|
173
187
|
groups: {
|
package/dist/i18n/ru.js
CHANGED
|
@@ -5,8 +5,11 @@ export const ru = {
|
|
|
5
5
|
summary: (o) => `**${o.score}/100 (${o.grade})** · ошибок: ${o.errors} · предупреждений: ${o.warnings} · заметок: ${o.notes} · страниц: ${o.pages}`,
|
|
6
6
|
clean: "Исправлять нечего: AI-поиск может прочитать, понять и процитировать эти страницы.",
|
|
7
7
|
fix: "Как исправить",
|
|
8
|
+
recommendation: "Рекомендация",
|
|
8
9
|
more: (n) => `…и ещё ${n}`,
|
|
9
|
-
|
|
10
|
+
checklist: "Чек-лист",
|
|
11
|
+
legend: "✓ в порядке · ✖ ошибка · ⚠ предупреждение · ℹ заметка",
|
|
12
|
+
count: (o) => [o.errors && `ошибок: ${o.errors}`, o.warnings && `предупреждений: ${o.warnings}`, o.notes && `заметок: ${o.notes}`].filter(Boolean).join(", "),
|
|
10
13
|
site: "сайт",
|
|
11
14
|
footer: (pages, date) => `Проверено страниц: ${pages}, ${date}. После каждого деплоя проверьте вручную: боевой CDN и защиту от ботов с настоящими AI-агентами (A-3), Google Search Console, Bing Webmaster Tools (поиск ChatGPT опирается на Bing), Яндекс Вебмастер.`,
|
|
12
15
|
groups: {
|
package/dist/report.js
CHANGED
|
@@ -27,15 +27,21 @@ export function toMarkdown(r) {
|
|
|
27
27
|
lines.push(`- ${f.level === worst ? "" : `${ICON[f.level]} `}\`${short(f.where)}\` — ${f.message}`);
|
|
28
28
|
if (findings.length > MAX_PER_RULE)
|
|
29
29
|
lines.push(`- ${t.more(findings.length - MAX_PER_RULE)}`);
|
|
30
|
-
lines.push("", `**${t.fix}:** ${rule.fix}`, "");
|
|
30
|
+
lines.push("", `**${worst === "info" ? t.recommendation : t.fix}:** ${rule.fix}`, "");
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
// Every audited check by group, as in the README: what is fine and what is not, at a glance.
|
|
33
|
+
lines.push(`## ${t.checklist}`, "", t.legend, "");
|
|
34
|
+
for (const g of Object.keys(t.groups)) {
|
|
35
|
+
const list = r.rules.filter((rule) => rule.group === g).sort((a, b) => a.id.localeCompare(b.id, "en", { numeric: true }));
|
|
36
|
+
if (!list.length)
|
|
37
|
+
continue;
|
|
38
|
+
lines.push(`**${g}. ${t.groups[g]}**`, "");
|
|
39
|
+
for (const rule of list) {
|
|
40
|
+
const found = byRule.get(rule.id) ?? [];
|
|
41
|
+
const n = (level) => found.filter((f) => f.level === level).length;
|
|
42
|
+
const icon = found.length ? ICON[found.reduce((w, f) => (ORDER[f.level] < ORDER[w] ? f.level : w), "info")] : "✓";
|
|
43
|
+
const count = found.length ? ` — ${t.count({ errors: n("error"), warnings: n("warn"), notes: n("info") })}` : "";
|
|
44
|
+
lines.push(`- ${icon} ${rule.id} ${rule.title}${count}`);
|
|
39
45
|
}
|
|
40
46
|
lines.push("");
|
|
41
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-search-auditor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Checks whether AI search (ChatGPT, Claude, Perplexity, Google AI Overviews) can read, understand and cite your site: robots.txt for AI agents, text without JavaScript, JSON-LD authorship, llms.txt, freshness.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai search audit",
|