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

@symbiosis-lab/moss-api

v0.13.0

Published

Official API for building moss plugins - types and utilities for plugin development

Readme

@symbiosis-lab/moss-api

TypeScript API for writing moss plugins.

npm downloads license bundle size

Read-only mirror. Source lives in the private moss monorepo. PRs cannot be merged here — see CONTRIBUTING.md.

moss is a desktop publishing app; this package is its plugin API surface. Use it to write plugins that publish posts, manage site assets, or extend the editor.

Quickstart

npm install @symbiosis-lab/moss-api

A plugin is an object whose methods are hooks; moss calls them with a typed context:

import type { DeployContext, HookResult } from "@symbiosis-lab/moss-api";
import { reportProgress } from "@symbiosis-lab/moss-api";

export default {
  async deploy(context: DeployContext): Promise<HookResult> {
    await reportProgress("deploying", 0, 100, "Initializing");
    // ... deployment logic
    return { success: true, message: "Deployed successfully" };
  },
};

Test plugins without a running moss app via the mock layer:

import { setupMockTauri } from "@symbiosis-lab/moss-api/testing";

Anatomy of a plugin

A plugin is three things:

  1. A manifest (assets/manifest.json) — who you are, what the user gains by installing you, and what they're trusting you with. See the manifest reference.
  2. A bundle (dist/main.bundle.js) — one IIFE built with esbuild, exposing your plugin object under the manifest's global_name.
  3. An icon (assets/icon.svg).

Ship the manifest, the bundle and the icon together; that trio is what moss installs.

Your code runs in QuickJS, not a browser — no DOM, no crypto.subtle, no Web Streams, and fetch is a buffered shim. Read the runtime environment before you reach for a web API; green Node-mock tests do not prove QuickJS compatibility.

API reference

The full reference — every hook context, utility, and testing mock, generated from the source doc comments — lives in docs/api.

Topic guides: the plugin runtime environment (what globals exist under QuickJS, fetch limits, config merge rules — read this first), the plugin manifest, plugin authentication.

Regenerate after an API change with pnpm run docs (CI flags a reference that has drifted from the source).

Stability

This package is 0.x. The API may change between minor versions until 1.0. Breaking changes are documented in CHANGELOG.md.

License

MIT — see LICENSE.