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

@lucra/mod

v0.2.1

Published

The Mod UI spec: describe what an app can show, the way OpenAPI describes what it can do.

Downloads

923

Readme

mod

OpenAPI for UI. Describe what your app can show — its components, where mods plug in, its theme — so mods built by people (or by Claude Code and Codex) look and feel native, and keep working when you redesign.

mod generate [--check]                     # write ui.json from exposed components (or fail CI if stale)
mod diff old-ui.json ui.json               # what changed for mods, and whether host.version was bumped enough
mod agents --ui ui.json                    # llms.txt, a Claude skill and AGENTS.md for writing mods for this host
mod init my-mod --id acme.notes --ui ui.json
mod render mod.json nav.page main --ui ui.json [--action send --input '{"message":"hi"}']
mod dev mod.json --ui ui.json              # serve over the signed protocol, rebuilding on save
mod build mod.json                         # bundle server + browser entries and assets
mod conformance mod.json --ui ui.json --url https://… --secret …
mod keygen acme && mod pack mod.json --key acme.key.json && mod verify pkg.json --trust trusted.json
mod validate tree.json --ui ui.json --slot nav.page
mod manifest mod.json --ui ui.json
mod rules | mod spec [ui|tree|manifest|protocol]
  • SPEC.md: the Mod UI spec.
  • spec/ui.schema.json: the document's JSON Schema.
  • packages/mod (@lucra/mod): expose() and the generator, plus:
    • /tree (validation), /react (renderer), /manifest, /protocol, /signing
    • /server (defineMod, serve), /worker (browser mods), /mcp (MCP bridge)
    • /host (createModHost, createModClient), /runtime (HTTP, dispatcher, in-process transports), /storage, /network
    • /install (consent, settings, secrets, uninstall), /diff, /agents, /devtools, /package (signing, registry), /conformance
    • the mod CLI
  • examples/basic: a tiny host — two ready components and one that trips every rule.
  • examples/hello-mod: a small mod with a server half (page, action, event + storage, tool) and a browser half (instant clicks, its own updates).
  • examples/host-demo: demo.ts — a host installing and running that mod on every runtime, with a live form, events, limits, MCP and every refusal; tooling.ts — diff, agent kit, init, build, dev, packages, conformance.

Write a mod

export default serve(defineMod({
  render: { hello: ({ context }) => ({ type: "List", props: { title: "Hello" }, children: [
    { type: "Button", props: { label: "Say hi", action: "say-hi" } }] }) },
  actions: { "say-hi": () => ({ effects: [{ type: "toast", message: "Hi!" }] }) },
}))

Use it in a host

  1. Add one line to each component you want mods to use:

    export const buttonMod = expose("Button", Button, z.object({ label: z.string(), action: modAction }), { actions: { action: "onClick" } })
  2. Add mod.config.json with your host name and version, component globs, stylesheet and slots (see examples/basic/mod.config.json).

  3. Run mod generate next to your OpenAPI generation, and mod generate --check in CI.

Develop

Node 24+, no build step (Node runs the TypeScript directly).

npm install
npm run check      # schemas and example document are current; example mod validates; host demo passes
npm run typecheck
npm run example    # regenerate examples/basic/ui.json
npm run spec       # regenerate spec/*.schema.json after changing the schemas

License

Copyright (c) 2026 On Lucra, Inc. All rights reserved. Proprietary and confidential — see LICENSE. No use, copying, implementation or distribution without a written agreement with On Lucra, Inc. Mod authors build under the Lucra Mod Developer License (draft, pending counsel review).