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

@zhin.js/scaffold-wizard

v0.1.6

Published

Shared interactive scaffold wizard for create-zhin-app and @zhin.js/cli

Readme

@zhin.js/scaffold-wizard

Zhin 项目脚手架的共享交互向导库。适配器、AI、数据库的分步引导与配置合并逻辑集中在此,供 create-zhin-app@zhin.js/clizhin setup 共用,避免两套实现漂移。

消费者

| 包 / 命令 | 用途 | |-----------|------| | create-zhin-app (pnpm create zhin-app) | 新建 workspace 时运行完整向导并生成项目 | | @zhin.js/clizhin setup | 已有项目增量配置(database / adapters / AI) | | @zhin.js/clizhin onboard | 项目内外入口;重新配置时委托 zhin setup |

zhin new 负责插件包脚手架,使用本包。

模块职责

| 模块 | 说明 | |------|------| | adapter.ts / adapter-configurers.ts | 适配器选择与分步配置(Telegram polling/webhook、GitHub App、OneBot11 等) | | ai.ts | AI Provider、触发方式、会话与安全默认值 | | database.ts | 数据库类型与连接参数 | | project-deps.ts | 依赖收集(启用 AI 时写入 @zhin.js/agentzodai、所选 @ai-sdk/*@modelcontextprotocol/sdk)、SQLite 前置条件 | | apply.ts | 将向导结果写入 zhin.config.*.envpackage.json | | types.ts | InitOptions 等共享类型 |

主要 API

import {
  configureDatabaseOptions,
  configureAdapters,
  configureAI,
  finalizeWizardOptions,
  applyWizardOptionsToConfig,
  appendWizardEnvVars,
  collectWizardDependencies,
  mergeDependenciesIntoPackageJson,
  getAdapterSetupNotes,
} from '@zhin.js/scaffold-wizard';

典型流程(与 create-zhin-app / zhin setup 一致):

  1. 交互调用 configureDatabaseOptions / configureAdapters / configureAI
  2. finalizeWizardOptions(options) — 补全 AI / GitHub 等所需的 SQLite
  3. applyWizardOptionsToConfig(config, options) — 合并进配置对象
  4. appendWizardEnvVars + mergeDependenciesIntoPackageJson — 写 .env 与依赖

开发

pnpm --filter @zhin.js/scaffold-wizard build
pnpm --filter @zhin.js/scaffold-wizard test

create-zhin-app@zhin.js/clibuild 脚本会自动先构建本包;单独 pnpm --filter @zhin.js/cli build 也会触发依赖构建。

修改向导行为时,请同时跑:

pnpm --filter create-zhin-app test
pnpm vitest run basic/cli/tests

文档链接

适配器向导内嵌文档 URL 指向 zhin.js.org/adapters/ 各平台页;索引见 Essentials · Adapters