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

feng3d-cli

v0.1.3

Published

feng3d 项目通用标准,包含代码规范、配置模板和 CLI 工具

Downloads

76

Readme

feng3d 命令行工具,包含项目规范、配置模板等功能。

功能特性

  • 📋 统一的代码规范(ESLint 配置)
  • 📦 统一的依赖版本管理
  • 🛠️ CLI 工具支持创建和更新项目
  • 📝 项目模板(LICENSE, .gitignore, .cursorrules, tsconfig.json, vite.config.js 等)
  • 🔄 GitHub Actions 工作流模板(CI/CD、GitHub Pages 部署、OSS 上传)
  • ✅ Git pre-commit 钩子(代码规范检查 + 单元测试)

使用方式

CLI 命令行使用

推荐使用 npx 直接运行,无需安装:

npx feng3d-cli <command>

或全局安装:

npm install -g feng3d-cli
feng3d-cli <command>

Claude Code Skill 使用

如果你使用 Claude Code 或其他 AI 代理,推荐通过 Skills.sh 安装:

# 推荐:使用 Skills.sh 生态系统标准方式(macOS / Linux)
npx skills add feng3d-labs/feng3d-cli

# Windows 用户需要显式指定 agent
npx skills add feng3d-labs/feng3d-cli --agent claude-code -g -y

# 或:使用 feng3d-cli 内置命令
npx feng3d-cli skill

手动安装:

mkdir -p ~/.claude/skills
cp -r .claude-skill ~/.claude/skills/feng3d

安装后,在 Claude Code 中可以直接使用:

/feng3d create my-project
/feng3d update

或者直接对话:"用 feng3d 创建一个新项目"

详细说明见 .claude-skill/README.md

CLI 命令

创建新项目

npx feng3d-cli create my-project

选项:

  • -d, --directory <dir> - 项目目录(默认:当前目录)
  • --no-examples - 不创建示例目录
  • --no-vitest - 不包含 vitest 测试配置

更新现有项目

npx feng3d-cli update
npx feng3d-cli update -d ./my-project  # 指定项目目录

安装 Claude Code Skill

npx feng3d-cli skill

💡 提示:也可以使用完整命令 npx feng3d-cli install-skill

更新项目的所有规范配置文件,包括 ESLint、TypeScript、Vite、GitHub Actions 等。

注意:如果项目中存在 examples 目录,会自动添加 examples:devpostdocs 脚本。

编程使用

import {
    // 版本管理
    VERSIONS,
    getDevDependencies,
    // 模板
    gitignoreTemplate,
    cursorrrulesTemplate,
    getTypedocConfig,
    getLicenseTemplate,
    getVscodeSettingsTemplate,
    getTsconfigTemplate,
    getViteConfigTemplate,
    // 项目操作
    createProject,
    updateProject,
} from 'feng3d-cli';

模板文件

| 文件 | 说明 | |------|------| | LICENSE | MIT 许可证(中文) | | .gitignore | Git 忽略规则 | | .cursorrules | Cursor AI 规则 | | tsconfig.json | TypeScript 配置 | | vite.config.js | Vite 构建配置 | | eslint.config.js | ESLint 配置 | | typedoc.json | TypeDoc 配置 | | .vscode/settings.json | VS Code 设置 | | .husky/pre-commit | Git pre-commit 钩子(代码规范 + 单元测试) | | scripts/prepublish.js | 发布前脚本 | | scripts/postpublish.js | 发布后脚本 | | scripts/postdocs.js | 文档生成后处理脚本(移动到 public/doc) |

GitHub Actions 工作流

| 工作流文件 | 说明 | |------|------| | pull-request.yml | 代码检查和测试(PR 或推送时触发) | | publish.yml | 发布到 npm(创建 Release 时触发) | | pages.yml | 部署文档到 GitHub Pages(发布成功后或手动触发) | | upload-oss.yml | 上传到阿里云 OSS(发布成功后或手动触发) |

OSS 上传配置

要启用 OSS 上传功能,需要在 GitHub 仓库的 Settings > Secrets and variables > Actions 中配置以下密钥:

  • OSS_REGION - OSS 区域(如 oss-cn-hangzhou
  • OSS_ACCESS_KEY_ID - 阿里云 AccessKey ID
  • OSS_ACCESS_KEY_SECRET - 阿里云 AccessKey Secret
  • OSS_BUCKET - OSS Bucket 名称

统一版本

| 依赖 | 版本 | |------|------| | TypeScript | 5.8.3 | | ESLint | 9.26.0 | | Vitest | ^3.1.3 | | Vite | ^6.3.5 | | TypeDoc | ^0.28.4 |

代码规范

缩进

  • 使用 4 空格缩进

引号

  • 使用单引号

命名规范

  • 变量和函数:camelCase
  • 类和接口:PascalCase
  • 常量:UPPER_SNAKE_CASE

Git 提交规范

  • 使用简体中文
  • 遵循 Conventional Commits 格式
  • 类型:feat, fix, refactor, perf, style, docs, test, chore, build, ci

Pre-commit 检查

提交代码前会自动执行:

  1. 代码规范检查 - 使用 ESLint 检查代码风格
  2. 单元测试 - 运行 vitest 确保测试通过

许可证

MIT