monolith logo

monolith

CLI tool that bundles web pages into single HTML files with all CSS, images, and JavaScript embedded inline

install

Monolith is a command-line web archiving tool that downloads web pages and embeds all external assets (CSS, images, JavaScript, fonts) as data URLs within a single HTML file. Unlike browser "Save page as" functionality or wget, monolith creates completely self-contained HTML documents that render identically to the original page without network connectivity.

The tool supports extensive customization through command-line flags, allowing selective exclusion of assets like images (-i), CSS (-c), JavaScript (-j), or videos (-v). Users can whitelist or blacklist specific domains (-d/-B), set custom base URLs (-b), handle authentication, and configure network timeouts. Monolith can output in both HTML and MHTML formats and supports reading from stdin for pipeline integration.

Since monolith lacks a JavaScript engine, it works best with static content or can be combined with headless browsers like Chromium to pre-process dynamic websites. The tool is particularly useful for web developers, researchers, and anyone needing to archive web content for offline access or long-term preservation. It supports proxy configuration via environment variables and includes options for handling invalid SSL certificates and custom user agents.

Installation

# via Homebrew
brew install monolith
# via Cargo
cargo install monolith
# via Chocolatey
choco install monolith

Alternatives & related tools

add a badge to your README

Maintain monolith? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/monolith.svg)](https://www.trmn.sh/tools/monolith?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/monolith?utm_source=badge"><img src="https://www.trmn.sh/badge/monolith.svg" alt="Featured on trmn" height="20"></a>