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

brender

v1.0.1

Published

Cloudflare Browser Rendering Crawl API wrapper

Readme

brender 🕷️

npm version License: MIT Node.js Version CI

Browser Rendering - A sleek wrapper for Cloudflare's Browser Rendering Crawl API

Crawl entire websites with a single command. Convert any site to Markdown, HTML, or structured JSON for RAG pipelines, AI training, or content migration.


✨ Features

  • 🚀 Simple CLI - One command to crawl any site
  • 📦 Zero Dependencies - Lightweight and fast
  • 📝 Multiple Formats - HTML, Markdown, or JSON output
  • 🔍 Smart Discovery - Automatic URL discovery from sitemaps & links
  • ⏱️ Async Jobs - Start crawl, check back later
  • 🎯 Path Filtering - Include/exclude specific URL patterns
  • 🔒 Type-Safe - Full TypeScript support

📦 Installation

# Install globally
npm install -g brender

# Or use without installing
npx brender <url>

🚀 Quick Start

# Set your Cloudflare credentials
export CF_ACCOUNT_ID="your-account-id"
export CF_API_TOKEN="your-api-token"

# Crawl a website
brender https://blog.cloudflare.com

# Crawl and wait for completion
brender https://example.com --wait

# Get markdown output, limit to 50 pages
brender https://example.com --format markdown --limit 50 --output ./content.json

📚 Usage

CLI Options

Usage: brender <url> [options]

Options:
  --format <format>      Output format: html, markdown, json (default: markdown)
  --limit <number>       Max pages to crawl (default: 100)
  --depth <number>       Crawl depth (default: 3)
  --no-render            Don't use headless browser (faster for static sites)
  --include <patterns>   Comma-separated URL patterns to include
  --exclude <patterns>   Comma-separated URL patterns to exclude
  --output <file>        Save results to file
  --wait                 Wait for job completion
  --poll <ms>            Poll interval in ms (default: 5000)
  --timeout <ms>         Timeout in ms (default: 300000)
  --status <job-id>      Check existing job status
  --help                 Show help

Examples

# Basic crawl
brender https://example.com

# Crawl specific paths only
brender https://docs.example.com --include "/api/*,/guides/*"

# Skip certain paths
brender https://example.com --exclude "/admin/*,/private/*"

# Fast static crawl (no browser rendering)
brender https://example.com --no-render --format json

# Check job status later
brender --status abc-123-def

🛠️ Library Usage

import { BrenderClient } from 'brender';

const client = new BrenderClient({
  accountId: process.env.CF_ACCOUNT_ID!,
  apiToken: process.env.CF_API_TOKEN!,
});

// Start a crawl job
const job = await client.crawl({
  url: 'https://example.com',
  format: 'markdown',
  limit: 100,
});

console.log('Job started:', job.id);

// Wait for completion
const result = await client.waitForCompletion(job.id);
console.log(`Crawled ${result.pages?.length} pages`);

// Process results
for (const page of result.pages || []) {
  console.log(`${page.url}: ${page.content.substring(0, 100)}...`);
}

🔑 Getting Credentials

  1. Account ID: Find in Cloudflare Dashboard sidebar
  2. API Token: Create at API Tokens
    • Use the "Browser Rendering" template
    • Or manually grant: Account > Browser Rendering > Edit

📖 API Reference

crawl(options)

Start a new crawl job.

| Option | Type | Default | Description | |--------|------|---------|-------------| | url | string | required | Starting URL | | format | 'html' \| 'markdown' \| 'json' | 'markdown' | Output format | | limit | number | 100 | Max pages to crawl | | depth | number | 3 | Crawl depth | | render | boolean | true | Use headless browser | | includePaths | string[] | - | URL patterns to include | | excludePaths | string[] | - | URL patterns to exclude | | modifiedSince | string | - | ISO date for incremental crawl | | maxAge | number | - | Skip recently crawled pages |

getJob(jobId)

Get crawl job status and results.

waitForCompletion(jobId, pollInterval?, timeout?)

Poll until job completes.

crawlAndWait(options, pollInterval?, timeout?)

Start crawl and wait for completion.


🧪 Development & CI

This repository uses GitHub Actions for continuous integration.

  • Workflow: .github/workflows/ci.yml
  • Triggers: pushes to main and pull requests
  • Checks: npm ci, npm run build, npm test

You can view all runs here: https://github.com/ek-mc/brender/actions/workflows/ci.yml


🔗 Links


📝 Changelog

See CHANGELOG.md for version history.


📄 License

See LICENSE.

License: MIT