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

@ntrwansui/koishi-plugin-prts-novelai

v3.11.18

Published

Generate images by Novelai

Downloads

4,129

Readme

@ntrwansui/koishi-plugin-prts-novelai

npm

Koishi v4 的 NovelAI 图像生成插件。支持文生图(T2I)、图生图(I2I)、角色参考(Vibe Transfer)以及全套 Director Tools,通过 NovelAI REST API 驱动。

功能

  • 文生图(T2I) — 从文本描述生成图像
  • 图生图(I2I) — 以现有图像为基础进行再创作
  • 角色参考(Vibe Transfer) — 跨生成保持角色外观一致性
  • Director Toolscolorizeemotionlineartsketchvariationspregate 六种工具
  • Prompt 模板 — 通过 prompt-set 定义可复用的 <name> 行内模板
  • mypreset 命令 — 每位用户自定义默认生成参数
  • Retrieve 恢复 — 重新获取发送失败的历史图像
  • 历史与 Anlas 追踪 — 浏览生成历史、查询 Anlas 余额和使用统计
  • 图像存储 — 生成的图像本地缓存于文件系统
  • 代理支持 — 可配置代理路由 API 请求

环境要求

  • Koishi v4.18.7+
  • 数据库服务 (koishi-database-*)
  • Skia Canvas 服务 (@ltxhhz/koishi-plugin-skia-canvas)
  • 白名单服务 (@ntrwansui/koishi-plugin-prts)
  • NovelAI API Token(见下方配置

可选

  • 翻译服务 (@koishijs/translator) — 自动将提示词翻译为英文

安装

npm install @ntrwansui/koishi-plugin-prts-novelai

配置

# koishi.yml
plugins:
  prts-novelai:
    token: your-novelai-token    # 必填 — NovelAI API token
    proxyAgent: http://127.0.0.1:12450  # 可选 — API 代理地址
    # 完整配置项请查看 Koishi 控制台的 Schema 表单

命令

| 命令 | 别名 | 说明 | |---------|-------|-------------| | novelai | nai | 文生图 | | novelai.i2i | nai.i2i | 图生图 | | novelai.charref | charref | 角色参考(Vibe Transfer) | | novelai.director.<tool> | — | Director Tools(colorize / emotion / lineart / sketch / variations / pregate) | | novelai.history | — | 浏览生成历史 | | novelai.anlas | anlas | 查询 Anlas 余额及近期消耗 | | novelai.stats | stats | 每日 / 每周 Anlas 消耗统计 | | novelai.retrieve | retrieve | 重新获取发送失败的图像 | | novelai.mypreset.* | — | 每位用户自定义默认生成预设 | | novelai.prompt-set | — | 定义行内 Prompt 模板(<name> 引用语法) |

生成图像存储

生成的图像缓存于 Koishi 运行目录下的 data/prts-novelai/images/,按会话和日期组织。

许可证

MIT

相关链接