SingleFile CLI is a command-line tool (v2.0.83) for saving complete web pages as single HTML files, including CSS, images, fonts, and other resources embedded as data URIs. It operates by launching a headless Chromium browser via the Chrome DevTools Protocol and injecting a standalone script. Unlike browser extensions, this CLI is designed for automation, batch processing, and server-side use. It runs on Deno, Node.js (>=20), and Bun (>=1.0). Key differentiators include support for crawling links, URL filtering, Docker deployment, and extensive customization of saved output. Alternatives include monolith and archiveweb.page, but SingleFile CLI uniquely combines headless browser automation with SingleFile's proven page-saving fidelity.
npm install single-file-cliVerified import paths — ran on the pinned version, not inferred.
Saves the page https://example.com to example.html, specifying a custom Chromium executable path.
Upgrade Node.js to >=20.
Set the --browser-executable-path option or install Chrome in the default directory.
Use 'npx single-file' or install globally with -g.
Enclose the rule in quotes to avoid shell expansion.
Use 'npx single-file <url>'.
Set --browser-executable-path or install Chrome.
Specify an output path with writable permissions.
Add 'https://' prefix to the URL.