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

koishi-plugin-mediawiki-enhanced

v1.0.0

Published

Enhanced MediaWiki plugin for Koishi with features inspired by akari-bot

Readme

koishi-plugin-mediawiki-enhanced

基于 akari-bot 和 koishi-plugin-mediawiki 的增强版 MediaWiki 插件,为 Koishi 机器人提供强大的 wiki 集成功能。

✨ 特性

核心功能

  • 页面查询:快速查询 wiki 页面信息
  • 智能搜索:支持关键词搜索和模糊匹配
  • 站点绑定:动态绑定 wiki 站点到不同频道
  • 链接识别:自动识别消息中的 wiki 链接

akari-bot 特色功能

  • 最近更改查询:查看 wiki 的最新编辑记录
  • 用户信息查询:获取用户编辑统计和基本信息
  • 多站点支持:预置多个常用 wiki 站点配置

增强功能

  • 权限管理:细粒度的指令权限控制
  • 自定义配置:支持自定义 wiki 站点和信息框样式
  • 错误处理:友好的错误提示和自动重试

🚀 安装

使用 npm

npm install koishi-plugin-mediawiki-enhanced

使用 yarn

yarn add koishi-plugin-mediawiki-enhanced

使用 pnpm

pnpm add koishi-plugin-mediawiki-enhanced

⚙️ 配置

koishi.yml 中配置:

plugins:
  mediawiki-enhanced:
    # 默认wiki配置
    defaultWikis:
      - name: "萌娘百科"
        apiUrl: "https://zh.moegirl.org.cn/api.php"
        siteUrl: "https://zh.moegirl.org.cn"
        infoboxSelector: ".infobox"
      - name: "Fandom"
        apiUrl: "https://community.fandom.com/api.php"
        siteUrl: "https://community.fandom.com"
    
    # 权限配置
    cmdAuthWiki: 1
    cmdAuthConnect: 2
    cmdAuthSearch: 1
    cmdAuthRecent: 1
    cmdAuthUser: 1
    
    # 功能开关
    searchIfNotExist: false
    showDetailsByDefault: false
    enableInfoboxScreenshot: true
    enableRecentChanges: true
    enableUserInfo: true

📚 指令列表

wiki

查询 wiki 页面信息

wiki 东方Project
w 东方Project -d  # 显示详细信息

search

搜索 wiki 页面

search 东方Project
s 东方Project -l 10  # 限制结果数量

connect

绑定 wiki 站点到当前频道

connect 萌娘百科
connect  # 查看可用wiki列表

recent [limit]

查看最近更改(需要启用)

recent
rc 5  # 查看最近5条更改

user

查询用户信息(需要启用)

user ExampleUser

[[]] 语法查询

使用 MediaWiki 标准的双括号语法自动查询页面

[[东方Project]]  # 查询页面
[[显示文本|实际页面]]  # 使用管道语法

🔧 自定义配置

添加自定义 wiki

customWikis:
  - name: "我的Wiki"
    apiUrl: "https://mywiki.example.com/api.php"
    siteUrl: "https://mywiki.example.com"
    infoboxSelector: ".infobox-table"
    customStyles: |
      .hidden-info { display: none; }

信息框截图配置

如需使用信息框截图功能,需要安装 koishi-plugin-puppeteer 插件。

🎯 使用示例

# 查询页面
wiki 东方Project

# 搜索相关内容
search 东方Project 角色

# 绑定到特定wiki
connect 萌娘百科

# 查看最近编辑
recent

# 查询用户信息
user ExampleUser

🔗 相关项目

📄 许可证

MIT License

🤝 贡献

欢迎提交 Issue 和 Pull Request!