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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gongfu/cli

v0.2.1-alpha

Published

🥋 Kongfu MCP 大师 - 让任何人都能驱动 AI IDE 完成全流程开发

Readme

@kongfu/cli

🥋 Konfu MCP 大师 - 让任何人都能驱动 AI IDE 完成全流程开发

npm version License: MIT

简介

Konfu CLI 是一个革命性的 AI 驱动开发工具,通过智能化的任务分解和 IDE 集成,让任何人都能像专业开发者一样完成复杂的软件开发任务。

核心特性

  • 🤖 AI 驱动的任务分解 - 将想法自动转化为详细的开发任务
  • 🔌 多 IDE 支持 - 原生支持 Cursor、Claude Code 等 AI IDE
  • 📋 智能任务管理 - 基于 YAML 的任务跟踪和状态管理
  • 🎨 可视化界面 - 内置 Web UI,直观管理开发流程
  • 🚀 工作流自动化 - 从需求到代码的全流程自动化

安装

# 使用 npm
npm install -g @kongfu/cli

# 使用 bun
bun add -g @kongfu/cli

# 使用 yarn
yarn global add @kongfu/cli

快速开始

1. 初始化项目

# 在项目根目录初始化 Konfu
gongfu init

# 扫描现有项目结构
gongfu init --scan

2. 创建任务

# 从想法生成 PRD 和任务
gongfu new "实现用户登录功能,支持邮箱和手机号"

# 预览生成结果(不写入文件)
gongfu new "添加黑暗模式支持" --dry-run

3. 同步到 IDE

# 自动检测并同步到 IDE
gongfu sync

# 指定 IDE
gongfu sync --ide cursor
gongfu sync --ide claude

4. 启动可视化界面

# 启动 Web UI
gongfu ui

# 指定端口
gongfu ui --port 8080

命令详解

gongfu init

初始化 Konfu 工作空间,创建 .kongfu/ 目录结构。

选项:

  • --scan - 扫描现有代码结构并生成初始任务
  • --force - 强制重新初始化(覆盖现有配置)

gongfu new <idea>

根据自然语言描述生成产品需求文档(PRD)和任务分解。

参数:

  • <idea> - 功能描述或需求说明

选项:

  • --dry-run - 预览生成结果,不写入文件

gongfu sync

同步任务和配置到支持的 IDE。

选项:

  • --ide <type> - 指定 IDE 类型(cursor/claude)
  • --dry-run - 预览同步结果

gongfu ui

启动可视化管理界面。

选项:

  • --port <number> - 指定端口(默认:3000)
  • --host <string> - 指定主机(默认:localhost)

工作流程

graph LR
    A[想法/需求] --> B[gongfu new]
    B --> C[生成 PRD]
    B --> D[任务分解]
    D --> E[gongfu sync]
    E --> F[IDE 集成]
    F --> G[AI 辅助开发]
    G --> H[完成任务]

项目结构

初始化后的项目结构:

.kongfu/
├── prd/          # 产品需求文档
├── task/         # 任务 YAML 文件
├── flows/        # 工作流定义
├── prompts/      # 自定义提示词
└── config.yaml   # 项目配置

任务格式

任务使用 YAML 格式定义:

id: feature-user-login
name: 实现用户登录功能
type: feature
status: todo
priority: high
owner: "@developer"
est: 3d
description: |
  实现基本的用户登录功能,包括:
  - 邮箱/手机号登录
  - 密码验证
  - 记住登录状态
tags:
  - auth
  - frontend
  - backend
dependsOn:
  - feature-user-model

IDE 集成

Cursor

Konfu 会自动生成 .cursor/rules 配置文件,包含:

  • 项目上下文
  • 开发规范
  • 任务列表
  • 自定义提示词

Claude Code

生成 CLAUDE.md 文件,提供:

  • 项目说明
  • 当前任务
  • 开发指南
  • 代码规范

高级用法

自定义提示词

.kongfu/prompts/ 目录创建自定义提示词:

# .kongfu/prompts/code-review.yaml
name: 代码审查助手
description: 帮助进行代码审查
prompt: |
  请审查以下代码,关注:
  1. 代码质量
  2. 性能问题
  3. 安全隐患
  4. 最佳实践

工作流定义

创建自定义工作流:

# .kongfu/flows/feature-dev.yaml
name: 功能开发流程
steps:
  - name: 需求分析
    type: prd
  - name: 任务分解
    type: task
  - name: 开发实现
    type: dev
  - name: 测试验证
    type: test
  - name: 部署上线
    type: deploy

最佳实践

  1. 明确的需求描述 - 使用清晰、具体的语言描述功能需求
  2. 合理的任务粒度 - 每个任务控制在 1-3 天内可完成
  3. 及时更新状态 - 开发过程中及时更新任务状态
  4. 使用标签分类 - 使用标签对任务进行分类管理
  5. 定期同步 - 定期运行 gongfu sync 保持 IDE 配置最新

故障排除

常见问题

Q: IDE 无法识别 Konfu 配置? A: 确保在项目根目录运行 gongfu sync,并重启 IDE。

Q: 任务生成不准确? A: 提供更详细的需求描述,或编辑生成的 YAML 文件。

Q: UI 无法访问? A: 检查端口是否被占用,尝试使用 --port 指定其他端口。

调试模式

# 启用详细日志
DEBUG=gongfu:* gongfu sync

# 查看版本信息
gongfu --version

贡献指南

欢迎贡献代码、报告问题或提出建议!

  1. Fork 本仓库
  2. 创建功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m 'Add amazing feature')
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 创建 Pull Request

许可证

本项目基于 MIT 许可证开源。详见 LICENSE 文件。

链接


Made with ❤️ by Konfu Team