@power-rent/sitemap-checker
v2.0.0
Published
[](https://www.npmjs.com/package/@power-rent/sitemap-checker)
Readme
sitemap-checker
A fast CLI tool to validate sitemaps. Recursively traverses sitemap indexes, extracts all URLs, checks their HTTP reachability concurrently, and reports broken links (404s, 5xx).
Features a beautiful terminal UI with progress tracking and summary.
Install
npm install --global @power-rent/sitemap-checkerRequires Node.js 20+.
Usage
sitemap-checker <sitemapUrl> [options]sitemapUrl must be a valid HTTP/HTTPS URL pointing to a sitemap index or sitemap file.
Options
| Flag | Alias | Description |
| ------------------- | ----- | ------------------------------- |
| --skip-validation | -s | Skip strict URL encoding checks |
Examples
# Basic usage
$ sitemap-checker https://example.com/sitemap.xml
# Skip strict URL validation (useful for sitemaps with encoding issues)
$ sitemap-checker https://example.com/sitemap.xml --skip-validationOutput files
Always generated in the current directory:
validated-urls.txt– All URLs found in the sitemap(s), one per line.broken-404.txt– 404-broken URLs (empty if none).broken-5xx.txt– 5xx-server-error URLs (empty if none).
Terminal UI
During validation:
[██████████░░░░░░░░] 45/100 URLs checked · ETA: 2m 15sFinal summary:
┌ Checked 100 URLs: 2 404s → broken-404.txt, 1 5xx → broken-5xx.txt ┐
└ ┘Exits with code 1 if broken links are found.
Features
- 🔍 Recursively traverses nested sitemap indexes.
- ⚡ Concurrent URL checks (5 parallel) with automatic retries.
- 📊 Real-time progress bar with ETA using
pretty-ms. - 🎨 Colorful Ink/React terminal UI.
- 📄 Outputs broken link lists and full validated URLs.
- 🚀 Zero-config; works out-of-the-box.
- 📈 Handles large sitemaps efficiently with
p-limit.
License
MIT © Toprent
