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

thallus

v0.3.3

Published

Opinionated WXT browser-extension framework: typed messaging, storage, settings, auth, security, browser API wrappers, a React design system, and build/release tooling

Readme

thallus

npm version license WXT peer

An opinionated framework for building browser extensions with WXT. Typed IPC, storage, settings, auth, HTTP, permissions, content scripts, a React design system and release/store tooling — as small composable modules. Write a feature once, activate it on the surfaces you need, and ship to Chrome, Edge, Firefox and Safari.

pnpm add thallus wxt

What you get

| Area | Highlights | | --- | --- | | Foundation | Typed env + feature flags, scoped logger, ExtensionError, browser/OS detection, lifecycle events, manifest merging | | Modules & WXT | Define a module once, activate per surface (background, content, popup, options, side panel, offscreen); config wrapper, base manifest, stable dev IDs, persistent dev profiles | | Messaging & storage | Typed request/response + events with schema validation, sender policy, timeouts, retry and cancellation; local/sync/session storage, versioned state, TTL cache, IndexedDB, encryption | | Networking & state | ky HTTP client with auth headers, retries, upload/download, stream, SSE and WebSocket; offline gating; TanStack Query and Zustand wiring | | Auth & security | Session store, login/logout/restore, token refresh, browser identity login; CSP checks, origin validation, sanitization, secret redaction, encrypted storage | | Browser runtime | 20 injectable wrappers (tabs, windows, cookies, downloads, scripting, notifications, alarms, bookmarks, history, …), commands, context menus, permissions, tab groups, task queues, caching, offline sync | | Content & files | DOM/selector waits, mutation + URL observers, shadow DOM, page metadata/links/media, HTML→Markdown, readability, sanitization, file picker, CSV, export/import, drag & drop, download manager | | UI & i18n | React design system (shadcn/ui on Base UI), light/dark themes, popup/options/side-panel layouts, RHF + Zod forms, locale store, plurals, Intl formatting | | Quality & release | Vitest browser/storage/event mocks and fixtures, build/manifest/version helpers, Chrome/Edge/Firefox store metadata + publish plans, CI workflows, deprecation and breaking-change checks |

Every area has a runnable example in the usage guide. lib/ is React-free and ships only two runtime dependencies: ky and zod.

Quick start

Register the authenticated-download handler in your background entrypoint:

// entrypoints/background.ts
import { registerAuthenticatedDownloadHandler } from 'thallus';

export default defineBackground(() => {
  registerAuthenticatedDownloadHandler();
});

Call it from a content script, popup or side panel:

// anywhere in the extension
import { requestAuthenticatedDownload } from 'thallus';

await requestAuthenticatedDownload({
  url: 'https://example.com/report.pdf',
  filename: 'report.pdf', // optional; derived from the URL when omitted
  useCredentialsFetch: true, // fetch with session cookies, then save the blob
});

Add the downloads permission to your manifest. Defaults are env-driven (WXT_DOWNLOAD_CONFLICT_ACTION, WXT_DOWNLOAD_SAVE_AS, WXT_DOWNLOAD_USE_CREDENTIALS_FETCH) — see the usage guide.

Agent skill

This repo ships a comprehensive skill so coding agents can use the framework without reading the source. thallus covers using the framework; framework-development covers changing this repo.

# install globally (Claude Code, OpenCode, Cursor, Codex, …)
npx skills add streamwhite/extension-dev-template -g

# list skills, or install one explicitly
npx skills add streamwhite/extension-dev-template --list
npx skills add streamwhite/extension-dev-template --skill thallus

The router lives in .agents/skills/thallus/SKILL.md and delegates to reference/{core,wxt-modules,browser-runtime,networking,data-auth-security,content-settings,ui-testing,release-store-ci}.md.

Repository layout

lib/            publishable framework (React-free, relative imports)
ui/             React design system, themes and layouts (repo only, not published)
entrypoints/    WXT background/content/popup demo surfaces
shared/         demo modules, protocol and settings
testing/        browser/storage/event mocks, fixtures, render helpers (repo only)
examples/       quick-note — a consumer extension that depends on `thallus`
locales/        en/zh catalogs shipped with the package
scripts/        dev-profile tooling
.agents/skills/ thallus + framework-development agent skills
docs/           usage guide

The published package is a single ESM entry (dist/lib/index.js) built from lib/. ui/, testing/, entrypoints/ and examples/ stay in the repo.

Documentation

| Doc | Contents | | --- | --- | | Usage guide | Examples for every feature area, from env parsing to store publishing | | Example extension | A complete WXT consumer using the package by name | | Publishing | Verify, bump, publish to npm, and release browser builds | | Agent skills | How agents should use and extend the framework |

Requirements

  • WXT >=0.20.0 (peer dependency) and a bundler-based build — WXT, Vite, webpack or esbuild all work.
  • ESM only. The entry uses extensionless relative imports and imports wxt/browser, so plain Node ESM import is not supported.
  • Runtime dependencies: ky and zod. React, TanStack Query, Zustand, Tailwind and shadcn are dev dependencies used by the repo's ui/ layer.

Development

pnpm install
pnpm test          # full vitest suite
pnpm dev           # run the template extension (also generates .wxt types)
pnpm build:lib     # build the publishable library into dist/
pnpm pack          # preview the published tarball

The repo is the library source (lib/), the reusable UI layer (ui/), the WXT entrypoints used as a template demo, and a consumer example in examples/quick-note/. See EXAMPLE.md for the example workflow.

Persistent dev profile & auto-pin

pnpm dev launches Chrome with a persistent profile at .wxt/chrome-data (WXT_CHROME_DATA_DIR), so site logins survive extension reloads. Before the browser opens, the build:done hook calls prepareDevProfile() to pin the unpacked extension into that profile (Default/Preferences → extensions.pinned_extensions), so the toolbar icon is visible in dev without manually pinning it.

  • The extension ID is stable: the manifest ships key: resolveExtensionPublicKey(), and resolveDevExtensionId() derives the matching ID from it.
  • Disable with WXT_DEV_AUTO_PIN=false; override the ID with WXT_DEV_EXTENSION_ID.
  • Consumer projects get this automatically from createExtensionConfig() (pass devProfile: false to opt out).
  • Chrome/Chromium only — it edits a Chrome profile preference; Firefox has no equivalent.

Publishing

See PUBLISHING.md for the full guide. Verification runs first, the version bump last:

pnpm release:prepare                 # build → tests → tarball check → bump version
pnpm release:prepare --verify-only   # checks only
pnpm publish                         # prepublishOnly builds dist/ and validates the artifact

License

Apache License 2.0 © 2026 Henry He. See NOTICE for attribution. Third-party dependencies keep their own licenses.