
CLI tool that bundles web pages into single HTML files with all CSS, images, and JavaScript embedded inline
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.
# via Homebrew
brew install monolith
# via Cargo
cargo install monolith
# via Chocolatey
choco install monolith