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

@coze-arch/cli

v0.0.5

Published

coze coding devtools cli

Readme

@coze-coding/cli

Coze Coding 的项目模板引擎,提供基于前端技术栈的项目初始化能力。

特性

  • 🚀 快速初始化: 一键创建预配置的项目模板
  • 🤖 AI 优先设计: 专为 AI Agent 消费设计,提供清晰的错误信息和自描述能力
  • 📦 多模板支持: 支持 React、Next.js、HTML 等多种技术栈
  • 🔧 类型安全: 基于 JSON Schema 的参数校验和 TypeScript 类型生成
  • 命令代理: 统一的 dev/build/start 命令,抹平不同技术栈差异

安装

rush update

使用

初始化项目

coze-coding init --template react --app-name my-app --use-typescript --use-tailwind

查看可用模板

coze-coding init --help

开发命令

# 启动开发服务器
coze-coding dev

# 构建生产版本
coze-coding build

# 启动生产服务器
coze-coding start

模板参数

每个模板都有自己的参数配置,通过 CLI 参数透传。参数名使用 kebab-case 格式,会自动转换为 camelCase 传入模板配置。

例如:

  • --app-nameappName
  • --use-typescriptuseTypeScript
  • --portport

开发模板

模板结构

template-name/
├── template.config.ts        # 模板配置(开发时)
├── template.config.js        # 模板配置(生产时)
├── .coze                     # 项目配置文件
└── src/                      # 源代码(支持 EJS 模板)

参数定义

使用 JSON Schema 定义模板参数:

import type { JSONSchemaType } from 'ajv';

export interface TemplateParams {
  appName: string;
  useTypeScript: boolean;
  port: number;
}

export const paramsSchema: JSONSchemaType<TemplateParams> = {
  type: 'object',
  properties: {
    appName: {
      type: 'string',
      minLength: 1,
      pattern: '^[a-z0-9-]+$',
      cliParam: '--app-name',
      description: 'Application name'
    },
    useTypeScript: {
      type: 'boolean',
      default: true,
      cliParam: '--use-typescript',
      description: 'Enable TypeScript'
    },
    port: {
      type: 'number',
      default: 3000,
      minimum: 1024,
      maximum: 65535,
      cliParam: '--port',
      description: 'Development server port'
    }
  },
  required: ['appName'],
  additionalProperties: false
};

生命周期钩子

export const onBeforeRender = (context) => {
  // 渲染前处理
  return context;
};

export const onAfterRender = (context, outputPath) => {
  // 渲染后处理
};

编码规范

本项目严格遵循函数式编程风格:

  • ✅ 使用纯函数和不可变数据
  • ✅ 函数组合和高阶函数
  • ✅ 使用工厂函数和闭包
  • ❌ 禁止使用 class
  • ❌ 避免副作用和可变状态

详见 技术设计文档

文档

许可证

内部项目