seo-crawl-audit 0.7.2 → 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 +83 -3
  2. package/bundle/cli.js +105 -15
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -53,8 +53,8 @@ attention, with evidence and remediation kept alongside each issue.
53
53
  and local report branding;
54
54
  - interactive issue statistics for severity, frequent checks, ownership, and
55
55
  regression lifecycle, with chart-to-table filtering;
56
- - a production-versus-preview release guard with safe environment-based
57
- authentication for private deployments;
56
+ - safe environment-based authentication for private `doctor`, `scan`,
57
+ `check`, Action, and production-versus-preview workflows;
58
58
  - configuration, suppressions with expiry, severity overrides, and budgets;
59
59
  - a self-contained GitHub Action that runs inside the GitHub runner;
60
60
  - typed engine API with injectable `fetch`, checkpoints, events, logger, and
@@ -91,6 +91,43 @@ npm run build
91
91
  npm link --workspace seo-crawl-audit
92
92
  ```
93
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
+
94
131
  ## Five-minute example
95
132
 
96
133
  [Quotes to Scrape](https://quotes.toscrape.com/) is a public educational site
@@ -116,6 +153,32 @@ seo-audit check https://quotes.toscrape.com/ \
116
153
 
117
154
  ## Commands
118
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
+
119
182
  ### `seo-audit <url>`
120
183
 
121
184
  Shortcut for `seo-audit scan <url>`.
@@ -135,6 +198,14 @@ seo-audit scan https://example.com/ --pages 250
135
198
  seo-audit scan https://example.com/ --all
136
199
  ```
137
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
+
138
209
  When a sitemap is found in an interactive terminal, the menu offers the first
139
210
  100 pages, every sitemap URL, groups of 100 with confirmation, or a custom
140
211
  number. `--pages` and `--all` skip the menu. If no sitemap is found, press Enter
@@ -231,6 +302,7 @@ seo-audit history \
231
302
  --include-query Treat query-string URLs as separate pages
232
303
  --ignore-robots Ignore robots.txt disallow rules
233
304
  --strict Fail check on warnings as well as errors
305
+ --headers-env <name> Read target headers from a JSON environment variable
234
306
  --production <url> Production URL for compare
235
307
  --preview <url> Preview deployment URL for compare
236
308
  --production-headers-env <name>
@@ -241,6 +313,11 @@ seo-audit history \
241
313
  --no-history Do not save this scan to local history
242
314
  --from <snapshot> Older snapshot for an explicit history comparison
243
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
244
321
  --json Print machine-readable output
245
322
  --help Show help
246
323
  --version Show the installed version
@@ -397,7 +474,7 @@ jobs:
397
474
  ${{ steps.seo.outputs.summary }}
398
475
  ```
399
476
 
400
- [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).
401
478
 
402
479
  ## Core API and repository structure
403
480
 
@@ -475,6 +552,9 @@ CI covers Node.js 20, 22, and 24. Tests use local HTTP fixtures for robots,
475
552
  sitemaps, gzip, retries, redirects, cancellation, checkpoint resume, migration,
476
553
  rules, lifecycle, HTML escaping, npm packaging, and the GitHub Action.
477
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
+
478
558
  ## License
479
559
 
480
560
  MIT