npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ebowwa/markdown-docs-scraper

v1.0.0

Published

Scrape and mirror markdown-based documentation sites

Readme

@ebowwa/markdown-docs-scraper

Scrape and mirror markdown-based documentation sites

Features

  • 📥 Download full markdown documentation
  • 🔄 Organize into directory structure
  • 📊 Track downloads and failures
  • 🚀 Fast concurrent downloads
  • 🎯 CLI and programmatic API

Installation

bun add @ebowwa/markdown-docs-scraper
# or
npm install @ebowwa/markdown-docs-scraper

CLI Usage

Quick Start - Anthropic Docs

markdown-docs-scraper anthropic -o ./docs

Scrape Any Site

markdown-docs-scraper scrape -u https://docs.example.com -o ./docs

Discover Available Pages

markdown-docs-scraper discover -u https://code.claude.com

Options

Commands:
  scrape       Scrape documentation from a URL
  discover     Discover all available documentation pages
  anthropic    Quick scrape of Anthropic Claude Code docs
  help         Display help for command

Options:
  -u, --url <url>          Base URL of the documentation site
  -o, --output <dir>       Output directory (default: "./docs")
  --docs-path <path>       Docs path (default: "/docs/en")
  -c, --concurrency <num>  Concurrency level (default: "5")

Programmatic Usage

import { MarkdownDocsScraper } from "@ebowwa/markdown-docs-scraper";

const scraper = new MarkdownDocsScraper({
  baseUrl: "https://code.claude.com",
  docsPath: "/docs/en",
  categories: {
    "getting-started": ["introduction", "installation", "quick-start"],
    features: ["inline-edits", "tool-use", "file-operations"],
  },
  outputDir: "./docs",
  concurrency: 5,
});

const result = await scraper.scrape();
console.log(`Downloaded: ${result.downloaded.length}`);
console.log(`Failed: ${result.failed.length}`);

// Save pages to disk
await scraper.savePages(result.downloaded);

Convenience Function

import { scrapeMarkdownDocs } from "@ebowwa/markdown-docs-scraper";

const result = await scrapeMarkdownDocs({
  baseUrl: "https://docs.example.com",
  outputDir: "./docs",
});

API

MarkdownDocsScraper

Constructor Options

interface ScraperOptions {
  baseUrl: string;           // Base URL of the documentation site
  docsPath?: string;         // Docs path (default: "/docs/en")
  categories?: Record<string, string[]>;  // Categories and pages
  outputDir?: string;        // Output directory (default: "./docs")
  concurrency?: number;      // Concurrent downloads (default: 5)
  onProgress?: (current: number, total: number) => void;
}

Methods

  • scrape() - Scrape all configured pages
  • fetchMarkdown(url) - Fetch markdown from a URL
  • downloadPage(category, page) - Download a single page
  • savePages(pages) - Save pages to disk
  • discoverPages() - Discover available pages

Result

interface ScraperResult {
  downloaded: DocPage[];     // Successfully downloaded pages
  failed: Array<{ url: string; error: string }>;
  duration: number;          // Duration in milliseconds
}

Output Format

Each downloaded file includes a header comment:

<!--
Source: https://code.claude.com/docs/en/introduction.md
Downloaded: 2026-02-06T00:00:00.000Z
-->

# Introduction

Original markdown content...

License

MIT

Contributing

This package is part of the codespaces monorepo.