v2.4.1 • Stable Release

Generate Sitemaps From Your Terminal

Zero-config, blazing-fast sitemap generator for modern workflows. Crawl local dev servers, static sites, and headless CMS outputs in seconds.

$ npm install -g @sitemap/cli

Get Running in Seconds

Pick your package manager or download a standalone binary for your system.

$ npm install -g @sitemap/cli
$ pnpm add -g @sitemap/cli
$ yarn global add @sitemap/cli
$ curl -fsSL https://install.sitemap.xml | bash

Built for Developer Workflows

Designed to integrate seamlessly into local development, CI/CD pipelines, and headless architectures.

🚀

Zero-Config Crawling

Point it at your dev server or dist folder. Automatically discovers routes, assets, and dynamic pages without manual listing.

📦

Multi-Format Output

Generate XML, JSON, CSV, or HTML sitemaps. Supports sitemaps index files for sites exceeding 50K URLs.

🔗

CI/CD Ready

Headless execution, deterministic output, and exit-code validation make it perfect for GitHub Actions, GitLab CI, and Vercel builds.

🛠️

Extensible Plugins

Tap into the middleware pipeline to transform URLs, inject custom metadata, or apply business logic during generation.

Powerful by Default

Simple commands for common workflows. No boilerplate required.

terminal — sitemap-cli
$ sitemap crawl http://localhost:3000 --output public/sitemap.xml
→ Crawling 142 routes...
→ Resolving relative assets...
→ Generating XML...
✓ Wrote sitemap to public/sitemap.xml (142 URLs, 48KB)

# Submit directly to search engines
$ sitemap submit --google --bing
✓ Pinging Google Search Console...
✓ Pinging Bing Webmaster Tools...
terminal — static site
$ sitemap crawl ./dist --include '**/*.html' --exclude '_next/**'
→ Scanning directory structure...
→ Found 89 static pages
✓ Wrote sitemap to ./dist/sitemap.xml

# Validate before deployment
$ sitemap validate ./dist/sitemap.xml
✓ Valid XML. All URLs resolved. No duplicates.

Customize Everything

Use a config file or environment variables to fine-tune behavior.

  • Route Prioritization

    Define custom priorities, change frequencies, and last-modified strategies per route pattern.

  • Middleware Hooks

    Intercept URLs during crawling to append query params, strip session IDs, or apply A/B test rules.

  • Environment Overrides

    Different configs for dev, staging, and production without touching your source code.

  • Internationalization

    Auto-detect locale slugs and generate proper hreflang tags for multilingual deployments.

// sitemap.config.js
export default {
  baseUrl: 'https://app.example.com',
  output: 'public/sitemap.xml',
  rules: {
    '^/blog/': { priority: 0.8, frequency: 'weekly' },
    '^/products/': { priority: 1.0, lastmod: 'auto' },
  },
  middleware: [async (url) => {
    return url.replace(/\?.*&$/, ''); // strip params
  }],
  locales: ['en-US', 'es-ES', 'fr-FR'],
}