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

invoice-master

v0.1.0

Published

Agent skill and CLI for merging invoice PDFs and summarizing invoice amounts

Readme

invoice-master

invoice-master 是一个无界面的发票 PDF 处理 Skill 和命令行工具,核心逻辑来自发票打印项目。

支持:

  • 多张电子发票合并为 A4 双联 PDF
  • 从发票二维码和 PDF 文本层提取金额、日期、类型、号码
  • 汇总发票总金额并输出 JSON
  • 显式 OCR 模式,使用 PP-OCRv6 tiny 识别扫描型发票的金额区域

安装 Skill

npx skills add EnjoyWT/invoice-master

也可以在 Codex 中通过 $skill-installer 从 GitHub 仓库安装。

直接运行

从 npm 公共仓库直接执行:

npx --yes invoice-master merge \
  --output merged.pdf \
  --amount-mode default \
  invoice-1.pdf invoice-2.pdf

在克隆的仓库内运行:

npm install

node scripts/invoice-master.mjs merge \
  --output merged.pdf \
  --amount-mode default \
  invoice-1.pdf invoice-2.pdf

只统计、不生成合并文件:

node scripts/invoice-master.mjs analyze invoice-1.pdf invoice-2.pdf

扫描件需要显式启用 OCR:

npx --yes invoice-master analyze \
  --amount-mode ocr \
  scanned-invoice.pdf

OCR 模式首次运行时下载 PP-OCRv6 tiny 检测和识别模型,合计约 6 MB,默认缓存到 ~/.cache/invoice-master/modelsdefaultnone 模式不会导入 OCR 模块,也不会下载或初始化模型。

验证

npm test
npm run test:ocr

普通测试验证合并、金额汇总和默认模式不加载 OCR。test:ocr 会显式启动 OCR,并在首次运行时下载模型。

输出

命令将 JSON 写到标准输出,进度和诊断信息写到标准错误。每张输入 PDF 默认只处理第一页,与原发票打印项目保持一致。