SingleFile CLI
$ single-file Community Low RiskSingleFile CLI (single-file) drives a headless Chromium or Firefox browser to render dynamic JavaScript pages, wait for deferred images, and save the exact rendered DOM with inlined assets into one standalone HTML file (single-file <url> page.html).
npm install -g single-file-cli Produces high-fidelity, asset-inlined single-HTML snapshots of JS-rendered pages that MCP browser tools do not emit.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Runs headlessly and non-interactively, with --dump-content and file output, but lacks JSON summary output or structured exit metadata.
- Non-interactive headless execution; supports
--dump-contentand file output
Read-only page rendering plus local HTML file output; supports --remove-hidden-elements and --block-scripts.
- Supports
--block-scriptsand explicit output file paths
Distributed via npm/npx across macOS, Linux, and Windows, but requires Playwright/Puppeteer or a local Chromium/Firefox binary.
- Requires local Chrome/Chromium or
--browser-executable-path
Best-in-class DOM fidelity for archiving dynamic JS pages, SPAs, and lazy-loaded images into a single HTML file.
- Handles lazy images (
--load-deferred-images-max-idle-time) and SPAs
Maintained by the official SingleFile author (gildas-lormeau/single-file-cli) under AGPL-3.0-or-later.
- Official SingleFile CLI project by Gildas Lormeau
README and --help document browser, crawler, and compression flags.
- README documents
--browser-executable-pathand--browser-args
Security, Auth & Guardrails
Supports optional --browser-cookies-file or --http-headers per run; stores no persistent credentials.
Free under AGPL-3.0-or-later; requires a local Chromium/Chrome or Firefox browser.
# SingleFile CLI Agent Rules - Always write to a file path (`single-file <url> out.html`) rather than `--dump-content` to avoid blowing up stdout context. - Pass `--browser-executable-path` if Chrome/Chromium is not auto-discovered. - Use `--browser-args='["--no-sandbox"]'` only inside isolated Linux containers when required.
Agent-Ready Command Recipes
Safe Read-Only Queries
single-file --help
Lists browser executable, lazy-image timeout, and asset-inlining flags without launching a browser.
Controlled Writes & Previews
single-file https://example.com page.html
Renders the URL headlessly and saves the complete DOM and inline resources to page.html.
Strengths for Agents
- + Captures fully rendered JavaScript SPAs and lazy-loaded assets with high visual fidelity.
- + Outputs portable single HTML files without needing a companion asset directory.
Caveats & Pitfalls
- ! Depends on an external Chrome/Chromium/Firefox binary and can fail in headless Linux without
--browser-executable-path. - ! No JSON report output for status/asset diagnostics.