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-sagiri

v0.2.0

Published

基于 LLM 语义匹配的 yande.re 搜图插件

Readme

koishi-plugin-sagiri

基于 LLM 语义匹配的 yande.re 搜图插件。

通过 ChatLuna 调用 LLM,将中文自然语言查询智能映射为 yande.re 标签,支持角色别名、概念联想和模糊搜索。

特色

  • 语义理解 — "炮姐" 自动匹配 misaka_mikoto,"黑丝" 映射到 thighhighs + black_legwear
  • 模糊查询 — "来个色色的图" 等泛化请求也能处理,自动返回高分图片
  • SQLite 缓存 — 相同查询命中缓存秒回,减少 LLM 调用
  • 质量过滤 — 按评分、分辨率自动筛选高质量图片

前置依赖

  • ChatLuna — LLM 调用服务(必须)
  • @koishijs/plugin-database-sqlite — 数据库(必须)
  • @koishijs/plugin-proxy-agent — 代理支持(国内环境需要)

安装

npm install koishi-plugin-sagiri

或在 Koishi 插件市场搜索 sagiri 安装。

配置

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | model | string | — | ChatLuna 模型名称,留空使用默认模型 | | proxy | string | — | 代理地址,如 http://127.0.0.1:1080 | | dnsOverride | string | — | DNS 覆盖,格式 yande.re:443:IP | | defaultRating | string | safe | 默认评级:safe / questionable / explicit | | minScore | number | 50 | 最低评分阈值 | | minResolution | number | 800 | 最小宽度(像素) | | maxImages | number | 3 | 每次最大返回图片数 | | cacheExpiry | number | 168 | 缓存过期时间(小时) | | enableCache | boolean | true | 启用查询缓存 |

命令

| 命令 | 说明 | |------|------| | sagiri <query> | 语义搜图 | | sagiri <query> -r | 强制 R18 模式 | | sagiri <query> -s | 强制安全模式 | | sagiri <query> -n 5 | 指定图片数量 | | sagiri.r18 <query> | R18 快捷命令 | | sagiri.safe <query> | 安全模式快捷命令 | | sagiri.cache.clear | 清除缓存 | | sagiri.cache.stats | 查看缓存统计 |

使用示例

> sagiri 炮姐
> sagiri 黑丝 -r
> sagiri fgo里的玛修
> sagiri 来个色色的图
> sagiri -n 5 萝莉

国内网络说明

yande.re 在国内存在 DNS 污染,图片域名也无法直接访问。需要配置以下任一方案:

  1. 代理(推荐) — 在 proxy 中填写代理地址
  2. DNS 覆盖 — 在 dnsOverride 中填写 yande.re:443:实际IP

License

MIT