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-jm-nikal

v1.0.71

Published

Koishi plugin for JM comic - login, favorites, search, download, PDF

Downloads

9,376

Readme

koishi-plugin-jm

npm

Koishi 插件,用于管理 JMComic 账户,支持收藏管理、搜索、下载等功能。

基于 JMComic-Crawler-Python 项目实现。

功能

  • 🔐 账户登录 — 通过聊天命令安全登录 JM 账户,Cookie 持久化存储,下次无需重新登录
  • 📚 查看收藏 — 分页浏览个人收藏的漫画列表
  • 添加收藏 — 通过漫画 ID 快速收藏漫画
  • 🔍 搜索漫画 — 按关键词搜索漫画,支持分页
  • 📖 查看详情 — 查看指定漫画的详细信息(作者、页数、标签等)
  • 📂 分类浏览 — 浏览 JM 漫画分类列表
  • 🏆 排行榜 — 查看日榜/周榜/月榜
  • 📥 下载漫画 — 将漫画下载到服务器本地
  • 🚪 退出登录 — 清除登录状态
  • 🧠 用户记忆 — 每个聊天用户独立存储 JM 账户,登录一次后永久记住

安装

# 在 Koishi 项目目录下
npm install koishi-plugin-jm

前置要求: 需要安装 Python 3 和 jmcomic 包:

pip install jmcomic

然后在 koishi.config.ts 中启用插件:

import { plugin } from 'koishi'

export default {
  plugins: {
    jm: {
      enabled: true,
    },
  },
}

使用方法

登录账户

jm login <用户名> <密码>

示例:

jm login myuser mypassword

⚠️ 密码仅用于获取登录 Cookie,不会明文存储。登录后 Cookie 自动保存,下次无需重新登录。

查看收藏列表

jm favorites [页码]

或使用别名:

jm fav
jm 收藏

添加收藏

jm add <漫画ID>

示例:

jm add 123456

搜索漫画

jm search <关键词> [页码]

示例:

jm search 全彩
jm search 全彩 2

查看漫画详情

jm detail <漫画ID>

或使用别名:

jm 详情
jm info

浏览分类

jm categories [页码]

或使用别名:

jm 分类

排行榜

jm ranking [页码] -t <类型>

类型可选:day(日榜)、week(周榜)、month(月榜)

示例:

jm ranking
jm ranking -t week
jm ranking 2 -t month

下载漫画

jm download <漫画ID>

示例:

jm download 123456

漫画将下载到服务器的 ./jmcomic-downloads/ 目录。

退出登录

jm logout

或使用别名:

jm 退出
jm 登出

帮助信息

直接发送 jm禁漫 可查看所有可用命令。

配置项

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | enabled | boolean | true | 是否启用插件 | | proxy | string | - | HTTP 代理地址(可选,如 http://127.0.0.1:7890) | | baseUrl | string | - | 自定义 API 域名列表(可选,JSON 数组格式) |

配置示例:

export default {
  plugins: {
    jm: {
      enabled: true,
      proxy: 'http://127.0.0.1:7890',
    },
  },
}

数据存储

插件使用 Koishi 数据库存储用户登录状态,每个用户(按平台 + 用户 ID 标识)独立保存:

| 字段 | 说明 | |------|------| | id | 平台用户 ID | | platform | 平台类型 (onebot/discord/...) | | jmUsername | JM 用户名 | | jmCookie | 加密存储的 Cookie | | createdAt | 登录时间 |

开发

# 克隆项目
git clone <repo-url>
cd koishi-plugin-jm

# 安装依赖
npm install

# 构建
npm run build

# 清理构建产物
npm run clean

项目结构

koishi-plugin-jm/
├── src/
│   ├── index.ts              # 插件入口
│   ├── database.ts           # 数据库扩展定义
│   ├── api/
│   │   ├── client.ts         # JM API 客户端(Python bridge 调用封装)
│   │   └── types.ts          # 类型定义
│   └── commands/
│       ├── login.ts          # 登录命令
│       ├── favorites.ts      # 收藏列表命令
│       ├── add.ts            # 添加收藏命令
│       ├── logout.ts         # 退出登录命令
│       ├── search.ts         # 搜索命令
│       ├── categories.ts     # 分类/排行榜命令
│       ├── detail.ts         # 漫画详情命令
│       └── download.ts       # 下载命令
├── jmcomic-bridge.py         # Python 桥接脚本
├── package.json
├── tsconfig.json
└── README.md

License

MIT