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

@yearhe9900/mb-toolbox-cli

v1.1.8

Published

MB ToolBox CLI - 项目创建与模板管理工具

Readme

MB ToolBox CLI

跨平台项目创建与模板管理工具,用于快速创建基于 Furion 框架的 Web API 项目。

✨ 功能特性

  • config - 管理 CLI 配置(NuGet 源地址等)
  • create - 交互式创建 Furion Web API 项目
  • update - 从 npmjs 更新 CLI 到最新版本
  • reinstall - 重新安装最新的 dotnet 模板
  • MCP Server - 为 AI Agent 提供标准化工具调用接口

📦 安装

前置条件

全局安装

npm install -g @yearhe9900/mb-toolbox-cli

🚀 快速开始

1. 配置 NuGet 源

首次使用前需要配置 NuGet 源地址:

# 设置 NuGet 源地址
mb-cli config --nuget-source https://your-nuget-server.com/repository/nuget-hosted/

# 查看当前配置
mb-cli config --show

2. 创建项目

# 交互式创建(默认当前目录)
mb-cli create

# 指定输出目录
mb-cli create -f /path/to/projects
mb-cli create --output ./my-projects

创建过程中会提示选择:

  • 项目名称
  • SqlSugar 注册模式(Singleton / Scoped)
  • 是否启用以下组件:
    • RabbitMQ
    • CSRedis
    • SmartQueue
    • IdGenerator (Yitter.IdGenerator)
    • EventBus (Furion EventBus)
    • UploadFileClient (IUploadFileClient)
  • CAP 存储模式(InMemory / RabbitMQ / None)

3. 更新 CLI

mb-cli update

4. 重新安装模板

当模板有新版本时,可以重新安装:

mb-cli reinstall

⚙️ 配置管理

CLI 配置存储在用户目录下的 ~/.mb-cli/config.json 文件中。

# 查看当前配置
mb-cli config --show

# 设置 NuGet 源地址
mb-cli config --nuget-source <url>

# 重置所有配置
mb-cli config --reset

🤖 MCP 集成

mb-cli 支持 MCP (Model Context Protocol) 协议,可以将 CLI 功能暴露给 AI Agent 使用。

支持的 MCP 工具

| 工具名称 | 描述 | |---------|------| | create_project | 创建 Furion Web API 项目,支持完整配置 | | show_config | 查看当前 mb-cli 配置 | | set_nuget_source | 设置 NuGet 源地址 | | check_environment | 检查 .NET SDK 环境状态 | | get_template_info | 获取模板安装状态和远程版本信息 | | reinstall_template | 重新安装最新模板 |

配置方法

Claude Code / Claude Desktop

在项目根目录创建 .mcp.json 或编辑全局配置 ~/.claude/settings.json

{
  "mcpServers": {
    "mb-cli": {
      "command": "node",
      "args": ["./src/mcp-server.mjs"],
      "cwd": "/path/to/mb-cli"
    }
  }
}

Qwen (通义千问)

在 Qwen CLI 配置文件中添加(通常位于 ~/.qwen/config.json):

{
  "mcpServers": {
    "mb-cli": {
      "command": "node",
      "args": ["./src/mcp-server.mjs"],
      "cwd": "/path/to/mb-cli"
    }
  }
}

Mimo (小米)

在 Mimo 配置文件中添加(通常位于 ~/.mimo/config.json):

{
  "mcpServers": {
    "mb-cli": {
      "command": "node",
      "args": ["./src/mcp-server.mjs"],
      "cwd": "/path/to/mb-cli"
    }
  }
}

Cursor

~/.cursor/mcp.json 或项目 .cursor/mcp.json 中添加:

{
  "mcpServers": {
    "mb-cli": {
      "command": "node",
      "args": ["./src/mcp-server.mjs"],
      "cwd": "/path/to/mb-cli"
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json 中添加:

{
  "mcpServers": {
    "mb-cli": {
      "command": "node",
      "args": ["./src/mcp-server.mjs"],
      "cwd": "/path/to/mb-cli"
    }
  }
}

全局安装后使用

如果已通过 npm install -g @yearhe9900/mb-toolbox-cli 全局安装,可直接使用命令名:

{
  "mcpServers": {
    "mb-cli": {
      "command": "mb-cli-mcp"
    }
  }
}

使用示例

配置完成后,可以直接用自然语言与 AI Agent 交互:

  • "帮我创建一个名为 GasService 的项目,启用 RabbitMQ 和 EventBus"
  • "检查一下 .NET 环境是否正常"
  • "查看当前的 NuGet 源配置"
  • "重新安装 Furion 模板"

首次使用

  1. 先配置 NuGet 源:AI Agent 会调用 set_nuget_source 工具
  2. 然后就可以创建项目了

📁 项目结构

mb-cli/
├── src/
│   ├── cli.js              # CLI 入口
│   ├── mcp-server.mjs      # MCP Server 入口 (ESM)
│   ├── core/
│   │   ├── dotnet.js       # dotnet 操作纯函数 (无 UI)
│   │   └── create.js       # 非交互式创建逻辑
│   ├── commands/
│   │   ├── config.js       # config 命令
│   │   ├── create.js       # create 命令
│   │   ├── update.js       # update 命令
│   │   └── reinstall.js    # reinstall 命令
│   └── utils/
│       ├── banner.js       # 终端 UI 工具
│       ├── config.js       # 配置管理
│       ├── dotnet.js       # dotnet 命令封装
│       └── prompt.js       # 交互式提示
├── package.json
├── .npmrc                  # npm registry 配置
├── MCP.md                  # MCP 详细文档
└── README.md

🛠️ 开发

# 克隆项目
git clone <your-repo-url>
cd mb-cli

# 安装依赖
npm install

# 本地链接测试
npm link

# 测试命令
mb-cli --help
mb-cli config --show
mb-cli create --help

📤 发布到 npmjs

# 登录(首次)
npm login

# 发布
npm publish

📄 许可证

MIT License