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

claude-init-cli

v1.0.0

Published

CLI tool to initialize claude-code-spec-workflow

Readme

claude-init-cli

一个用于快速初始化 claude-code-spec-workflow 系统的 CLI 工具。

这个工具自动化了安装和设置过程,让您能够在几秒钟内开始使用 Claude Code Spec Workflow。

特性

  • 🚀 一键初始化:使用单个命令完成完整工作流的设置
  • 📦 灵活安装:支持全局和本地安装选项
  • 🔍 智能验证:自动检查 Node.js 版本和系统要求
  • 🎨 用户友好:彩色输出和进度指示器,提升用户体验
  • 节省时间:跳过手动步骤,将设置时间从几分钟缩短到几秒钟
  • 🛡️ 安全可靠:检查现有安装,防止意外覆盖

前提条件

  • Node.js:版本 16.0.0 或更高
  • npm:Node 包管理器(通常随 Node.js 一起安装)
  • Claude Code:您需要已经安装并配置了 Claude Code

安装

全局安装(推荐)

全局安装后可以从任何目录使用该命令:

npm install -g claude-init-cli

本地安装

作为项目依赖安装:

npm install claude-init-cli --save-dev

使用 npx(无需安装)

无需安装即可直接运行:

npx claude-init-cli

使用方法

基本初始化

在当前目录初始化工作流:

claude-init

在指定目录初始化

指定一个目录来初始化工作流:

claude-init --project /path/to/your/project

强制覆盖现有文件

如果已存在 .claude 目录,使用此选项强制覆盖:

claude-init --force

跳过依赖安装

如果已经安装了 claude-code-spec-workflow,可以跳过安装步骤:

claude-init --skip-install

显示帮助信息

显示帮助信息:

claude-init --help

显示版本

显示当前版本:

claude-init --version

工作流程

当您运行 claude-init 时,该工具将:

  1. 检查 Node.js 版本:确保您使用的是 Node.js 16.0.0 或更高版本
  2. 验证目录:检查目标目录是否存在且有效
  3. 安装依赖:安装 claude-code-spec-workflow 包
  4. 运行初始化:执行官方工作流初始化
  5. 验证结果:验证 .claude 目录是否成功创建
  6. 显示下一步:提供后续操作指南

输出结构

成功初始化后,您将在项目中找到一个 .claude 目录,其结构如下:

.claude/
├── commands/      # Claude Code 的斜杠命令
├── steering/      # 项目上下文和指南
├── templates/     # 文档模板
├── specs/         # 生成的规格文档
├── bugs/          # 缺陷跟踪文档
└── agents/        # 可选的代理配置

配置

命令行选项

| 选项 | 别名 | 描述 | | ------------------ | ---- | ----------------------- | | --project <path> | -p | 指定项目目录 | | --force | -f | 覆盖现有的 .claude 目录 | | --skip-install | -s | 跳过依赖安装 | | --help | -h | 显示帮助信息 | | --version | -v | 显示版本号 |

故障排除

Node.js 版本错误

如果您看到关于 Node.js 版本的错误,请将 Node.js 升级到 16.0.0 或更高版本:

# 使用 nvm(推荐)
nvm install 16
nvm use 16

# 或者从 nodejs.org 下载

权限被拒绝

在 Linux/macOS 上,您可能需要使用 sudo 进行全局安装:

sudo npm install -g claude-init-cli

在 Windows 上,请以管理员身份运行命令提示符。

网络问题

如果由于网络问题导致安装失败,请检查您的互联网连接或使用代理:

npm config set proxy http://proxy.example.com:8080

现有安装

如果您已经有一个 .claude 目录,请使用 --force 选项覆盖它:

claude-init --force

示例

示例 1:基本用法

# 创建一个新目录并初始化
mkdir my-new-project
cd my-new-project
claude-init

示例 2:在指定目录初始化

# 在现有目录中初始化
claude-init --project ~/projects/my-existing-project

示例 3:强制覆盖

# 覆盖现有的 .claude 目录
claude-init --force

示例 4:使用 npx 运行

# 无需安装直接运行
npx claude-init-cli --project ./my-project

贡献

欢迎贡献!请随时提交问题和拉取请求。

开发设置

# 克隆仓库
git clone <repository-url>
cd claude-init-cli

# 安装依赖
npm install

# 本地运行 CLI
node bin/claude-init.js

# 运行测试
npm test

# 代码检查
npm run lint

许可证

MIT 许可证 - 详见 LICENSE 文件

相关项目

支持

如果您遇到任何问题或有疑问,请在 GitHub 仓库中创建一个 issue。

更新日志

v1.0.0

  • 初始版本发布
  • 基本初始化功能
  • 支持全局和本地安装
  • 跨平台兼容性