seo-crawl-audit 0.7.1 → 0.8.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.
Files changed (3) hide show
  1. package/README.md +115 -3
  2. package/bundle/cli.js +105 -15
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -10,6 +10,33 @@ results stay in local JSON, checkpoint, CSV, and self-contained HTML files.
10
10
  [Open the interactive example report](https://melnixdev.github.io/seo-crawl-audit/)
11
11
  or [view its source file](examples/quotes-toscrape-report.html).
12
12
 
13
+ ## Report preview
14
+
15
+ The report is a self-contained HTML file: open it locally, share it as an
16
+ artifact, or publish the same file on GitHub Pages. Charts and filters work
17
+ without a server.
18
+
19
+ ### Overview and local history
20
+
21
+ ![SEO Crawl Audit summary cards and local scan history](https://raw.githubusercontent.com/MelnixDev/seo-crawl-audit/main/docs/images/report-overview.png)
22
+
23
+ The overview keeps scan coverage, issue counts, and locally stored trends in
24
+ one place.
25
+
26
+ ### Interactive issue analytics
27
+
28
+ ![SEO Crawl Audit interactive issue statistics](https://raw.githubusercontent.com/MelnixDev/seo-crawl-audit/main/docs/images/report-analytics.png)
29
+
30
+ Select a severity, rule, lifecycle state, or page template to filter the issue
31
+ table immediately.
32
+
33
+ ### Filtered issue table
34
+
35
+ ![SEO Crawl Audit issue table filtered to errors](https://raw.githubusercontent.com/MelnixDev/seo-crawl-audit/main/docs/images/report-issues.png)
36
+
37
+ Chart selections and report filters narrow the table to the findings that need
38
+ attention, with evidence and remediation kept alongside each issue.
39
+
13
40
  ## Highlights
14
41
 
15
42
  - automatic `robots.txt`, sitemap, sitemap-index, and gzip sitemap support;
@@ -26,8 +53,8 @@ or [view its source file](examples/quotes-toscrape-report.html).
26
53
  and local report branding;
27
54
  - interactive issue statistics for severity, frequent checks, ownership, and
28
55
  regression lifecycle, with chart-to-table filtering;
29
- - a production-versus-preview release guard with safe environment-based
30
- authentication for private deployments;
56
+ - safe environment-based authentication for private `doctor`, `scan`,
57
+ `check`, Action, and production-versus-preview workflows;
31
58
  - configuration, suppressions with expiry, severity overrides, and budgets;
32
59
  - a self-contained GitHub Action that runs inside the GitHub runner;
33
60
  - typed engine API with injectable `fetch`, checkpoints, events, logger, and
@@ -64,6 +91,43 @@ npm run build
64
91
  npm link --workspace seo-crawl-audit
65
92
  ```
66
93
 
94
+ ## Initialize a project
95
+
96
+ Create a safe configuration in an existing project:
97
+
98
+ ```bash
99
+ npx seo-crawl-audit init https://example.com/
100
+ ```
101
+
102
+ The interactive setup can also create a manual, scheduled, or pull-request
103
+ GitHub Actions workflow. For a site whose content is published outside pull
104
+ requests, generate the scheduled workflow:
105
+
106
+ ```bash
107
+ npx seo-crawl-audit init https://example.com/ \
108
+ --workflow scheduled \
109
+ --yes
110
+ ```
111
+
112
+ Existing config and workflow files are never replaced without an explicit
113
+ confirmation or `--force`. The generated `.gitignore` recommendations exclude
114
+ runtime checkpoints, local history, and reports, but intentionally keep the
115
+ optional `.seo-audit.json` regression baseline available for version control.
116
+
117
+ [Read the complete initialization guide](https://github.com/MelnixDev/seo-crawl-audit/blob/main/docs/initialization.md).
118
+
119
+ Verify the project setup without starting a full crawl:
120
+
121
+ ```bash
122
+ seo-audit doctor
123
+ seo-audit doctor --offline
124
+ ```
125
+
126
+ [Read the project diagnostics guide](https://github.com/MelnixDev/seo-crawl-audit/blob/main/docs/doctor.md).
127
+
128
+ Protected preview or staging site credentials can be supplied through a named
129
+ JSON environment variable. [Read the authenticated scans guide](https://github.com/MelnixDev/seo-crawl-audit/blob/main/docs/authenticated-scans.md).
130
+
67
131
  ## Five-minute example
68
132
 
69
133
  [Quotes to Scrape](https://quotes.toscrape.com/) is a public educational site
@@ -89,6 +153,32 @@ seo-audit check https://quotes.toscrape.com/ \
89
153
 
90
154
  ## Commands
91
155
 
156
+ ### `seo-audit init [url]`
157
+
158
+ Creates `seo-audit.config.json`, adds safe local artifact recommendations to
159
+ `.gitignore`, and can create an optional GitHub Actions workflow.
160
+
161
+ ```bash
162
+ seo-audit init https://example.com/
163
+ seo-audit init https://example.com/ --workflow manual --yes
164
+ seo-audit init https://example.com/ --workflow scheduled --yes
165
+ seo-audit init https://example.com/ --workflow pull-request --yes
166
+ ```
167
+
168
+ Workflow modes are `none`, `manual`, `scheduled`, and `pull-request`.
169
+
170
+ ### `seo-audit doctor [url]`
171
+
172
+ Checks the local Node.js runtime, configuration, output access, start page,
173
+ robots.txt, and sitemap without crawling linked HTML pages. Node.js is required
174
+ only on the machine running the CLI; the audited site can use any server stack.
175
+
176
+ ```bash
177
+ seo-audit doctor
178
+ seo-audit doctor https://example.com/
179
+ seo-audit doctor --offline --json
180
+ ```
181
+
92
182
  ### `seo-audit <url>`
93
183
 
94
184
  Shortcut for `seo-audit scan <url>`.
@@ -108,6 +198,14 @@ seo-audit scan https://example.com/ --pages 250
108
198
  seo-audit scan https://example.com/ --all
109
199
  ```
110
200
 
201
+ For a protected site, keep headers outside command history and project files:
202
+
203
+ ```bash
204
+ export SEO_AUDIT_SITE_HEADERS='{"Authorization":"Bearer …"}'
205
+ seo-audit scan https://preview.example.com/ \
206
+ --headers-env SEO_AUDIT_SITE_HEADERS
207
+ ```
208
+
111
209
  When a sitemap is found in an interactive terminal, the menu offers the first
112
210
  100 pages, every sitemap URL, groups of 100 with confirmation, or a custom
113
211
  number. `--pages` and `--all` skip the menu. If no sitemap is found, press Enter
@@ -204,6 +302,7 @@ seo-audit history \
204
302
  --include-query Treat query-string URLs as separate pages
205
303
  --ignore-robots Ignore robots.txt disallow rules
206
304
  --strict Fail check on warnings as well as errors
305
+ --headers-env <name> Read target headers from a JSON environment variable
207
306
  --production <url> Production URL for compare
208
307
  --preview <url> Preview deployment URL for compare
209
308
  --production-headers-env <name>
@@ -214,6 +313,11 @@ seo-audit history \
214
313
  --no-history Do not save this scan to local history
215
314
  --from <snapshot> Older snapshot for an explicit history comparison
216
315
  --to <snapshot> Newer snapshot for an explicit history comparison
316
+ --directory <path> Project directory for init
317
+ --workflow <mode> Init workflow: none, manual, scheduled, or pull-request
318
+ --yes Accept safe init defaults without prompting
319
+ --force Allow init to replace existing generated files
320
+ --offline Skip doctor network checks
217
321
  --json Print machine-readable output
218
322
  --help Show help
219
323
  --version Show the installed version
@@ -370,7 +474,7 @@ jobs:
370
474
  ${{ steps.seo.outputs.summary }}
371
475
  ```
372
476
 
373
- [Read all Action inputs and outputs](docs/github-action.md).
477
+ [Read all Action inputs, outputs, and generated workflow modes](https://github.com/MelnixDev/seo-crawl-audit/blob/main/docs/github-action.md).
374
478
 
375
479
  ## Core API and repository structure
376
480
 
@@ -382,6 +486,11 @@ packages/cli seo-crawl-audit — terminal UX and npm executable
382
486
  packages/action @seo-crawl-audit/action — GitHub runner entry point
383
487
  ```
384
488
 
489
+ `@seo-crawl-audit/core` is currently an internal workspace package and is not
490
+ published separately on npm. Install `seo-crawl-audit` for the supported,
491
+ self-contained CLI. The imports below document the repository API used by the
492
+ CLI and Action and are intended for contributors working in this workspace.
493
+
385
494
  ```ts
386
495
  import { audit, planScan, scan } from "@seo-crawl-audit/core";
387
496
  import { createFileCheckpointStore } from "@seo-crawl-audit/core/node";
@@ -443,6 +552,9 @@ CI covers Node.js 20, 22, and 24. Tests use local HTTP fixtures for robots,
443
552
  sitemaps, gzip, retries, redirects, cancellation, checkpoint resume, migration,
444
553
  rules, lifecycle, HTML escaping, npm packaging, and the GitHub Action.
445
554
 
555
+ Maintainers publish the CLI through token-free
556
+ [npm trusted publishing](https://github.com/MelnixDev/seo-crawl-audit/blob/main/docs/publishing.md).
557
+
446
558
  ## License
447
559
 
448
560
  MIT