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

@internetarchive/local-chat

v0.2.3

Published

A floating, resizable chat widget powered entirely by Chrome's on-device AI, grounded in context you provide.

Readme

Local Chat

Try it live → (docs and a live demo, served straight from this repo's main branch)

<local-chat> is a floating, resizable chat widget powered entirely by Chrome's built-in on-device AI, grounded in context you provide.

Status

Implemented per SPEC.md: Parent/Child on-device sessions, streamed markdown responses, Follow-ups/Starters/Icebreakers (with a configurable Empty message shown before either exists), persisted History, draggable/ resizable positioning with its own persisted Visual state, host-invokable Triggers (trigger-selector or the expand()/collapse()/toggle() methods), multi-line input, light/dark mode (auto-switching via prefers-color-scheme, or forced either way via color-scheme), and Shadow DOM theming via --local-chat-* custom properties. Requires a Chrome build with the on-device Prompt API (window.LanguageModel) available; the component is a no-op everywhere else.

Installation

npm install @internetarchive/local-chat
import '@internetarchive/local-chat'

Importing the module is enough: it registers <local-chat> as a custom element as a side effect. There's nothing to call to initialize it.

Development

npm install
npm run dev        # serves index.html against the current source
npm test
npm run typecheck
npm run lint
npm run build      # emits the npm package to ./dist
npm run build:site # assembles a deployable copy of index.html in ./site

index.html (served by npm run dev) doubles as the project's introduction/documentation page and a live demo — its own chat widget is grounded in the page's documentation content and answers questions about it. It is not part of the published package (dist only).

Docker

The Dockerfile is multi-stage: dev and build are for local development and CI; runtime, the default target (what plain docker build . produces), is the only one meant for an actual deployment.

Dev runs the Vite dev server in watch mode. Bind-mount the repo over /app so edits on your machine take effect immediately; the extra anonymous volume on /app/node_modules keeps the image's own install from being shadowed by whatever (or whatever's missing) in your local node_modules:

docker build --target dev -t local-chat:dev .
docker run --rm -p 5173:5173 -v "$PWD":/app -v /app/node_modules local-chat:dev
# -> http://localhost:5173/

Prod runs typecheck/lint/test/build:site in an intermediate stage, then serves the result with nginx as an unprivileged user (no Node in the final image at all, since local-chat is entirely client-side):

docker build -t local-chat .
docker run --rm -p 8080:8080 local-chat
# -> http://localhost:8080/

License

Local Chat is licensed under the GNU Affero General Public License v3.0.