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

spec-kit-init

v0.1.1

Published

Run the embedded init-spec-kit binary for your OS/arch (from dist/). Use: npx spec-kit-init

Readme

spec-kit-init

spec-kit-init 是围绕 Rust 单文件安装器 init-spec-kit 的轻量 npm 包装:在已安装 Node.js 的环境中,用 npxnpm install -g 按当前系统架构找到 dist/ 里的可执行文件并透传所有参数,无需单独下载二进制。

底层行为与仓库内 Rust CLI(及嵌入的 GitHub Spec Kit 资源)一致:把 specify init 生成的模板解压到目标项目目录。

要求

  • Node.js ≥ 16
  • 发布到 npm 的压缩包内需包含对应平台的 init-spec-kit(或 Windows 上的 init-spec-kit.exe),见下文「维护者:发布前准备」

使用方式

在项目根目录(或任意目录,配合 --path)执行:

# 推荐:不全局安装,每次拉取并运行
npx spec-kit-init --help

# 实际初始化(默认中文、Cursor;与直接运行 init-spec-kit 相同)
npx spec-kit-init

# 指定语言与客户端
npx spec-kit-init --locale en
npx spec-kit-init --agent claude
npx spec-kit-init --agent codex --locale en

# 仅查看会写入哪些路径
npx spec-kit-init --dry-run

本包在 package.jsonbin 里注册了两个命令名,指向同一脚本:

  • spec-kit-init:与包名一致,适合 npx spec-kit-init …
  • init-spec-kit:与底层二进制同名,适合 npx -p spec-kit-init init-spec-kit … 或全局安装后执行 init-spec-kit

全局安装示例:

npm install -g spec-kit-init
init-spec-kit --help

常用参数(透传给 Rust CLI)

| 参数 | 说明 | |------|------| | --path DIR | 目标项目目录,默认当前目录 | | --agent | cursor(默认)、claudecodex | | --locale | zh(默认)、en | | --dry-run | 只打印将要创建的路径,不写盘 |

完整说明以 --help 为准。

如何解析 dist/ 里的二进制

启动脚本会按顺序在下列目录中查找可执行文件:

  1. 环境变量 INIT_SPEC_KIT_DIST(若设置):指向包含二进制的目录
  2. npm/init-spec-kit/dist/(发布包内或本地开发时 copy 进来的目录)
  3. 仓库根目录 dist/(在 monorepo 内本地链接本包时,若未把二进制打进子目录仍可使用)

在每个候选目录下:

  • 优先:dist/<platform>-<arch>/init-spec-kit(Windows 为 init-spec-kit.exe
    例如:darwin-arm64linux-x64win32-x64
  • 否则:扁平路径 dist/init-spec-kitdist/init-spec-kit.exe

<platform>-<arch> 与 Node 的 process.platformprocess.arch 一致。

维护者:发布前准备

  1. 在仓库根目录构建并拷贝 Rust 产物到根目录 dist/(例如运行 ./scripts/package-init-spec-kit.sh 或 Windows 下的 package-init-spec-kit.ps1)。
  2. npm/init-spec-kit/ 下执行 npm packnpm publish
  3. prepack 会运行 scripts/stage-dist.cjs:若本地尚无可用的 ./dist,则从 ../../dist(仓库根)复制到本包 dist/,以便 tarball 内含二进制。

package.jsonpublishConfig.registry 指向 https://registry.npmjs.org/,即使本机用镜像源安装依赖,npm publish 仍会发到 npm 官方(需已登录对应账号)。

若 npm 上 spec-kit-init 名称不可用,可将 package.jsonname 改为其他未占用名称后再发布。

说明

  • 本 npm 包通过 Node spawn 调用原生二进制;verify-spec-kit 等其它可执行文件若存在于仓库 dist/ 会一并被打进发布用 dist/,但不会通过本包的 bin 脚本启动,需在安装目录或解压后的 dist/ 中直接运行。
  • 更完整的背景、构建 Spec Kit 资源与 Rust 说明见本工具仓库根目录README.md

许可证

MIT(与仓库声明一致)