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

polaristar-cli

v1.0.0

Published

Polaristar CLI - Professional website resource collector with Cloudflare bypass, site crawling, and offline reconstruction

Readme

Polaristar CLI

Professional website resource collector with Cloudflare bypass, site crawling, and offline reconstruction.

Features

  • Complete Resource Extraction: Downloads images, CSS, JS, and fonts from any webpage
  • Path Rewriting: Automatically converts all resource URLs to local paths for offline viewing
  • Cloudflare Bypass: Uses puppeteer-real-browser to bypass Cloudflare Turnstile protection
  • Site Crawling: Multi-page crawling with depth and page limit control
  • Website Analysis: Extract navigation links, routes, and site structure
  • Link Fixing: Repair broken links, CDN URLs, and font references
  • Local Preview: Built-in HTTP server for offline preview
  • Template System: Extract and customize site templates

Installation

npm install polaristar-cli

Or use directly with npx:

npx polaristar <url> -o ./output

Commands

collect (default)

Collect resources from a single webpage:

polaristar <url> -o ./output

Options:

  • -o, --output <dir> - Output directory
  • --no-images - Skip downloading images
  • --no-css - Skip downloading CSS
  • --no-js - Skip downloading JavaScript
  • -c, --concurrency <number> - Concurrent downloads (default: 5)
  • -t, --timeout <ms> - Request timeout (default: 30000)
  • -H, --header <header> - Custom headers
  • --browser - Force browser mode
  • --wait-for <selector> - Wait for selector before extracting
  • -s, --serve [port] - Start server after collecting

crawl

Crawl and download entire website:

polaristar crawl <url> -o ./output -d 2 -m 50

Options:

  • -o, --output <dir> - Output directory
  • -d, --depth <number> - Maximum crawl depth (default: 2)
  • -m, --max-pages <number> - Maximum pages (default: 50)
  • --include <pattern> - Include pattern (regex)
  • --exclude <pattern> - Exclude pattern (regex)
  • --no-browser - Disable browser mode
  • --no-assets - Skip asset downloads
  • -t, --timeout <ms> - Request timeout

analyze

Analyze website structure:

polaristar analyze <url>
polaristar analyze ./output  # Analyze local files

Options:

  • --no-browser - Disable browser mode
  • --nav - Show navigation only
  • --routes - Show routes only
  • --collections - Show collections only
  • --products - Show products only
  • -o, --output <file> - Save to JSON file

fix

Fix broken links in downloaded files:

polaristar fix ./output --base-url https://example.com

Options:

  • --links - Fix internal links
  • --cdn - Fix CDN URLs
  • --fonts - Fix font URLs
  • --base-url <url> - Original site URL
  • --external <domain> - External domains to keep

serve

Preview downloaded site locally:

polaristar serve ./output -p 3000

Options:

  • -p, --port <number> - Port number (default: 3000)

template

Template extraction and customization:

polaristar template extract ./output
polaristar template apply ./output config.json
polaristar template export ./output --dest ./export

Examples

# Single page with Cloudflare bypass
polaristar https://protected-site.com --browser -o ./output

# Crawl entire site (depth 3, max 100 pages)
polaristar crawl https://example.com -d 3 -m 100 -o ./output

# Analyze site structure
polaristar analyze https://shop.example.com -o analysis.json

# Fix links after download
polaristar fix ./output --base-url https://example.com

# Preview locally
polaristar serve ./output -p 8080

Output Structure

output/
├── index.html      # Rewritten HTML
├── images/         # Downloaded images
├── css/            # CSS files
├── js/             # JavaScript files
├── fonts/          # Font files

Tech Stack

  • puppeteer-real-browser - Cloudflare Turnstile bypass
  • cheerio - HTML parsing
  • undici - HTTP client
  • commander - CLI framework

License

Proprietary - All rights reserved.