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

page-save

v0.1.1

Published

Give LLM coding assistants the ability to save and read any browser tab, even sites that block automation. Chrome Extension + Node.js bridge.

Readme

Page Save Bridge

Give LLM coding assistants the ability to save and read any browser tab — even sites that block automation tools like Reddit, Twitter, and LinkedIn.

Built with care by ESDF.gg and The Open English Bible Ministry.

"'You shall love the Lord your God with all your heart and with all your soul and with all your mind.' This is the greatest and first commandment. And a second is like it: 'You shall love your neighbor as yourself.'" — Matthew 22:37-39 (NRSVue)

The Problem

LLM browser tools often get blocked by Content Security Policy on many sites. Reddit, Twitter/X, LinkedIn — the assistant can see the tab exists but can't read the content. You end up pressing Ctrl+S manually and pointing the LLM at the saved file.

The Solution

Page Save Bridge uses chrome.pageCapture.saveAsMHTML() — a browser-engine-level API that operates below CSP restrictions. It captures the fully-rendered page with your existing sessions, cookies, and authentication intact.

Two components:

  1. Chrome Extension — connects to a local WebSocket server, handles save/text/list commands
  2. Node.js Bridge — CLI that your LLM session calls via shell to trigger saves and read content

Install

1. Chrome Extension

Install from the Chrome Web Store or load unpacked from the extension/ folder.

2. Node.js Bridge

You need Node.js 22.6+ installed. Then run via npx — no global install needed, works the same on Windows, macOS, and Linux:

npx page-save serve   # starts the server on localhost:7224

Saved output defaults to ~/Documents/saved-pages on Windows, macOS, and Linux. Set PAGE_SAVE_DIR before launching the server if you want a different root folder.

(npx is the canonical Node.js way to run a CLI tool. We deliberately don't ship a winget / Homebrew / apt package — it'd add a ~80MB Node bundle to a 50KB CLI, and any user who needs page-save already has Node for everything else they're doing in this ecosystem. If you'd rather have page-save on your PATH directly, npm install -g page-save works.)

3. (Optional) Launch the server from the extension

After loading the extension, register the local launch bridge so the side panel can start the server itself when it's offline — no terminal needed thereafter:

npx page-save setup

By default the host is registered for Chrome, Edge, and Brave so it just works regardless of which Chromium-based browser you use. Restrict to a specific browser with --browser chrome,brave if you want. For unusual profiles or packaged extension IDs, pass --extension-id <id>. To inspect what would be written without changing your machine, run npx page-save setup --dry-run.

setup is a friendly alias for the lower-level install-launcher command. The extension uses the same command name in the copyable LLM setup prompt it shows when the local bridge is missing.

The installer uses the native mechanism for each operating system:

  • Windows: writes the Chromium NativeMessagingHosts registry keys in both 64-bit and 32-bit registry views, registers the page-save://start URL protocol, and creates the per-user PageSaveLocalServer scheduled task. The URL protocol opens a Page Save Local Server command window with the server status text. The native messaging host is a generated bin/page-save-native-host.exe wrapper so Chromium gets clean binary stdio.
  • macOS: writes com.pagesave.launcher.json into the selected browser NativeMessagingHosts folders under ~/Library/Application Support/.... The manifest points at a generated shell wrapper with the absolute Node.js path from your install command, and launch opens a Terminal window.
  • Linux: writes the manifest into the selected browser folders under ~/.config/.../NativeMessagingHosts. Launch opens an available terminal emulator (x-terminal-emulator, GNOME Terminal, Konsole, Xfce Terminal, or xterm), with a detached log-file fallback for headless sessions.

If the browser still reports "Specified native messaging host not found" after installation, reload the extension; if the browser was already open before registration, fully quit and reopen Chrome/Brave/Edge once.

After this, when the status pill shows "Server offline" the footer button reads "Launch Local Server". Click it; the panel waits for the WebSocket to come up and then transitions back to "Save Selected (N)". On Windows, the browser may show a one-time "Open Page Save?" prompt the first time the button activates page-save://start; allow it. The launch task opens a Page Save Local Server command window with the connection port, project path, Node.js runtime, and log paths. Keep that window open while using the extension; closing it stops the server.

The launcher refuses to spawn a duplicate when the port is already bound, debounces rapid clicks in both the extension and the Windows URL handler, and reports a clear error if something else is holding port 7224. On Windows, once page-save://start has been accepted, the extension does not also fire the native messaging start path; this keeps slow launches from opening two server windows.

Usage

# List all open Chrome tabs
npx page-save tabs

# Save a Reddit page as MHTML (matches URL pattern)
npx page-save save --tab reddit

# Extract plain text from any tab
npx page-save text --tab reddit

# Save the currently active tab
npx page-save save

Keyboard shortcut: Press Alt+S to save the active tab instantly.

How It Works

LLM session (shell) → Node.js CLI (port 7224) ←WebSocket→ Chrome Extension
                       |
                  Writes MHTML to saved-pages/

The extension uses privileged Chrome APIs that sites cannot block:

  • chrome.pageCapture.saveAsMHTML() — captures full page with all resources
  • chrome.scripting.executeScript() — extracts text in an isolated world

For extraction sessions, page-save now keeps Raw and schema output as separate concepts:

  • Raw means untouched browser capture, equivalent to the browser's "Save Page As" MHTML output. Raw mode writes only .mhtml files under raw/; it does not write an HTML/text fallback into raw/ and does not generate a reduced markdown file.
  • Full means the domain schema's broad useful extraction: every field the schema can extract that is likely useful for LLM analysis.
  • Variants are narrower use-case schema outputs, such as price-only or seller-focused views.
  • reduced/ contains LLM-readable markdown only for Full schema output and schema variants.
  • manifest.json points each page at its primary file; raw pages point at their .mhtml source when Chromium captured one, while structured pages point at their reduced markdown.

Why Not Just Use Browser MCP / Chrome DevTools MCP?

Those tools inject content scripts into pages, which gets blocked by CSP on sites like Reddit. Page Save operates at the browser engine level — there's nothing for the site to block.

Privacy

Zero data collection. All communication is localhost-only. No analytics, no tracking, no external requests. See PRIVACY.md.

License

CC0 1.0 — Public Domain. Do whatever you want with it.