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

website-source-extractor

v1.0.0

Published

A CLI tool that extracts source code and assets from websites for analysis and offline viewing

Readme

Website Source Extractor

npm version License: MIT PRs Welcome GitHub Stars

If you find this tool helpful, please consider giving it a star on GitHub!

A command-line tool that extracts source code and assets from websites for analysis and offline viewing.

Features

  • Extract HTML, JavaScript, CSS, and media assets from websites
  • Process source maps to recover original source code
  • Support for iframe processing with configurable depth
  • Save all content to a configurable output directory
  • Detect npm dependencies used in JavaScript files
  • Verbose logging options for detailed output

Installation

Global Installation (Recommended)

npm install -g website-source-extractor

Local Installation

npm install website-source-extractor

Usage

Basic Usage

website-source-extractor https://example.com

With Options

website-source-extractor https://example.com --output ./my-extracted-site --verbose --max-depth 2

Command Options

| Option | Alias | Description | Default | | --------------- | ----- | ------------------------------------------------------ | ------------------------ | | --output | -o | Output directory for extracted content | ./extracted-{hostname} | | --verbose | -v | Enable verbose logging | false | | --save-assets | -a | Save all assets (images, CSS, JS, and process iframes) | true | | --max-depth | -d | Maximum depth for processing iframes | 2 | | --help | | Show help | |

Examples

Extract a Single-Page Application with Iframes

website-source-extractor https://my-react-app.com --save-assets --max-depth 2

Extract Only HTML and JavaScript (No Assets)

website-source-extractor https://example.com --no-save-assets

Troubleshooting

CORS Issues

If you encounter CORS issues when extracting from certain websites, this is expected behavior as the tool respects web security protocols. Some assets may not be accessible.

Large Websites

For large websites with many assets, the extraction process may take some time. Use the --verbose flag to see detailed progress.

Memory Issues

If you encounter memory issues with very large websites, try extracting specific sections or limiting the iframe depth with --max-depth.

Support this Project

If you find this tool valuable for your work, please consider supporting its development:

⭐ Star the Repository

The simplest way to show your support is to star the project on GitHub.

💖 Sponsor

You can financially support this project through:

🤝 Contribute

Contributions are welcome! Check out the contribution guidelines.

Development

Building from Source

git clone https://github.com/kabonkoda/website-source-extractor.git
cd website-source-extractor
npm install
npm run build

Running in Development Mode

npm run dev -- https://example.com

License

MIT

Author

Adeyeye Oluwatobiloba (@kabonkoda)