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

ajazz-plugin-sdk

v0.2.0

Published

AJAZZ desktop plugin SDK — provides runtime API to communicate with the host application from a plugin.

Readme

ajazz-plugin-sdk

AJAZZ 桌面客户端插件 SDK。

安装

npm i ajazz-plugin-sdk

使用

import { plugin, voice, on } from 'ajazz-plugin-sdk'

plugin.onReady((info) => {
  plugin.log('info', `hello from ${info.id}`)
})

voice.onAsr((r) => {
  if (r.final) plugin.notify('识别结果', r.text)
})

API

  • plugin.info / plugin.onReady / plugin.onSettingsOpen / plugin.onDisable
  • plugin.log(level, msg) / plugin.notify(title, body)
  • plugin.sendToBackground(channel, payload) / plugin.onMessage(fn) — popup ↔ background 双向通信
  • voice.onData(fn) / voice.onAsr(fn) — 订阅 PCM / ASR 结果(每插件独立派发)
  • device.list() — 获取已连接的鼠标设备:{ vendorId, productId, path, name }[]
  • device.getDpi(deviceId) — 读取当前 DPI 档位与该设备的 DPI 限制: { dpi_number, dpi_step, dpi_min, dpi_max },便于插件按设备的传感器规格做 UI 限制
  • device.setDpi(deviceId, { dpi_number }) — 设置当前 DPI 档位的 DPI 值; 超出 [dpi_min, dpi_max] 时主程序会拒绝,未对齐到 dpi_step 时会向下取整到最近一档
  • config.get(key) / config.set(key, value)
  • window.openPopup(opts) / window.closePopup()
  • system.spawn(cmd, args?, cwd?)
  • invoke(method, ...args) 通用 RPC;可直接调用 electron.shell.openExternal 等 host 方法

详细文档见 document/ 站点。

发布到 npm

  1. npmjs.com 注册账号,并在本机登录:

    npm login
  2. 包名为 无作用域 ajazz-plugin-sdk,需满足 npm 对发布账号的 2FA / token 要求。

  3. sdk 目录执行(已配置 publishConfig.access: public):

    cd sdk
    npm install
    npm publish --access public

    prepublishOnly 会自动执行 npm run build

  4. 之后升级版本号(如 npm version patch)再 npm publish