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

@captain_z/lyra

v1.0.2

Published

Universal content generation framework with plugin-based architecture

Readme

Lyra

English README (Default)

Lyra 是一个面向 Markdown 内容生产的 CLI 工具,用于生成周报内容、组装文章 Prompt,并治理 frontmatter 元数据(尤其是 tags)。

包名:@captain_z/lyra
命令:lyra

目录

功能

  • 模板化内容生成(weekly 等)
  • 通过 lyra article / lyra prompt 组装 Prompt
  • 使用 lyra schedule 执行调度
  • 使用 lyra check-images 检查图片域名
  • 使用 lyra check-metadata 检查并整理元数据与 tags

安装

# 全局安装
npm install -g @captain_z/lyra

# 本地安装
npm install @captain_z/lyra

快速开始

# 1) 初始化配置
lyra init

# 2) 查看模板
lyra list

# 3) 预览生成(不写文件)
lyra weekly --dry-run

# 4) 真实生成
lyra weekly

命令参考

| 命令 | 别名 | 说明 | |---|---|---| | lyra | - | 启动交互模式 | | lyra <template> | - | 按模板快速生成 | | lyra create [template] | lyra c | 显式生成命令 | | lyra list | lyra ls | 列出模板 | | lyra init | - | 初始化配置 | | lyra config | - | 查看/验证配置 | | lyra schedule | lyra sched | 启动调度器 | | lyra check-images | lyra check-img | 图片域名白名单检查 | | lyra check-metadata | lyra check-meta | 元数据与 tags 整理 | | lyra article | lyra a | 文章 Prompt 组装 | | lyra prompt | lyra p | article 的兼容别名 |

元数据与标签治理

lyra check-metadata 同时支持目录与单文件,并支持自动去重和 AI 补全标签。

# 目录检查(不改文件)
lyra check-metadata --path ../your-notes-repo

# 自动整理 tags
lyra check-metadata --path ../your-notes-repo --fix-tags

# 单文件整理
lyra check-metadata --path ./Input/Notes/today.md --fix-tags

# 本地清洗后,再用 AI 补全 tags
lyra check-metadata --path ../your-notes-repo --fix-tags --ai-tags --provider openai

常用参数:

  • --path <path>:目录或单个 Markdown 文件
  • --fix-tags:去重、trim、分隔符清洗
  • --ai-tags:按标题和正文补全更合适 tags
  • --max-tags <n>:每篇最大 tags 数(默认 8
  • --min-tags <n>:每篇最小 tags 数(默认 1
  • --dry-run:只预览不落盘

Provider 说明:

  • openai:需要 OPENAI_API_KEY
  • anthropic:需要 ANTHROPIC_API_KEY
  • local:本地模型服务

配置发现规则

CLI 会从当前目录向上查找:

  • .lyrarc
  • .lyrarc.json
  • .lyrarc.yaml
  • .lyrarc.yml
  • .lyrarc.js
  • .lyrarc.cjs
  • .lyrarc.mjs
  • lyra.config.json
  • lyra.config.js
  • lyra.config.cjs
  • lyra.config.mjs

最小配置示例

{
  "global": {
    "logLevel": "info",
    "defaultTemplate": "weekly"
  },
  "templates": {
    "weekly": {
      "enabled": true,
      "template": {
        "path": "./templates/weekly.hbs"
      },
      "sources": {
        "articles": "./articles",
        "tools": "./tools",
        "notes": "./notes"
      },
      "output": {
        "path": "./output",
        "filename": "Weekly-{{issueNumber}}.md"
      },
      "content": {
        "articles": { "topN": 10, "minRating": 0 },
        "tools": { "perCategory": 3 },
        "notes": { "groupBy": "none" }
      }
    }
  }
}

版本策略

使用语义化版本(MAJOR.MINOR.PATCH):

  • MAJOR:不兼容变更
  • MINOR:向后兼容功能
  • PATCH:向后兼容修复

建议每次发布至少递增 PATCH

故障排查

npm publishprepublishOnly 失败

若在 npm run build 阶段出现 EPERMdist 不可写),先清理并重建:

rm -rf dist
npm run build

找不到配置文件

lyra init

输出内容不符合预期

lyra weekly --dry-run --verbose

文档

许可证

MIT