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

@keyflow2/create-function-kit

v0.1.2

Published

CLI to scaffold a local Keyflow Function Kit workspace from official starter templates.

Readme

Create Function Kit

一个面向开发者的脚手架命令:把官方 Function Kit starter 解到本地目录,并直接改成你自己的 kitId。

用法

npx @keyflow2/create-function-kit my-launchpad --kit-id yourscope.launchpad --name "Launchpad"

执行后会:

  • 下载 starter 包(默认:@keyflow2/function-kit-template-petite-vue
  • 解到 my-launchpad/
  • 运行 starter 自带的 rename-starter,同步修改:
    • manifest.json
    • ui/app/main.js
    • ui/app/index.html
    • icons/*
    • package.jsonkeyflow.defaultKitId

然后你可以直接:

cd .\my-launchpad
npm run open:kitstudio

生成后的项目还会自带这些命令:

npm run doctor
npm run pack:zip
npm run pack:npm -- --scope yourscope
npm run publish:npm -- --scope yourscope --dry-run
npm run catalog:check -- --scope yourscope
npm run catalog:entry -- --scope yourscope

也就是说,开发者不需要先 clone keyflow 仓库,当前工作区自己就带着:

  • KitStudio 启动脚本
  • 本地自检脚本
  • ZIP / npm 打包脚本
  • npm 发布脚本
  • catalog 提交前检查脚本
  • catalog 提交片段生成脚本
  • 平台差异说明文档

如果你看到 [starter] Could not locate KitStudio.,说明脚本没找到你的 KitStudio 仓库位置。你可以:

  • 把 KitStudio clone 到工作区同级目录:..\kit-studio
  • 或设置环境变量(一次性 / 长期都行):
$env:KITSTUDIO_ROOT = "D:\dev\kit-studio"
npm run open:kitstudio

如果你已经有可用的 KitStudio,也可以创建完成后直接打开:

npx @keyflow2/create-function-kit my-launchpad --kit-id yourscope.launchpad --name "Launchpad" --open

官方 starter

当前这条 CLI 主要面向两类 starter:

  • starter / petite-vue
    • 默认模板
    • 适合通用面板、动作型、设置型 Function Kit
    • 对应 npm 包:@keyflow2/function-kit-template-petite-vue
  • preview-rewrite
    • 适合纠错 / 润色 / 翻译 / 摘要这类“先生成预览,再确认替换”的正文型 AI Function Kit
    • 对应 npm 包:@keyflow2/function-kit-template-preview-rewrite

查看当前内置别名:

npx @keyflow2/create-function-kit --list-templates

常用参数

  • --kit-id <id>:目标 kitId,推荐用全局唯一风格,例如 yourscope.launchpad
  • --name <label>:展示名称
  • --description <text>:覆盖 starter 默认描述
  • --template <name|npm-ref>:改用官方模板别名或自定义 npm starter 包
  • --list-templates:列出官方 starter 别名
  • --kit-studio-root <path>:配合 --open 使用,显式指定 KitStudio 仓库目录
  • --force:覆盖已存在的目标目录
  • --dry-run:只打印计划动作,不落盘

生成后建议顺序

cd .\my-launchpad
npm run open:kitstudio
npm run doctor
npm run pack:zip

确认真机闭环后,再继续:

npm run pack:npm -- --scope yourscope
npm run publish:npm -- --scope yourscope --dry-run
npm run catalog:check -- --scope yourscope
npm run catalog:entry -- --scope yourscope

如果你要做正文预览型 AI kit,后续发布前还应该再看:

  • docs/ANDROID_HOST_RUNBOOK.md

维护者本地开发

如果你在 keyflow 仓库里调这个 CLI,不想真的从 npm 拉 starter,可以直接指向本地模板目录:

node .\templates\create-function-kit\bin\create-function-kit.mjs .\artifacts\smoke\launchpad `
  --template-dir .\templates\function-kit-template-petite-vue `
  --kit-id keyflow2.launchpad `
  --name "Launchpad"

正文预览 starter 的本地路径用法:

node .\templates\create-function-kit\bin\create-function-kit.mjs .\artifacts\smoke\proofreader `
  --template-dir .\templates\function-kit-template-preview-rewrite `
  --kit-id keyflow2.proofreader `
  --name "Proofreader"