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

@wll8/mini-code-cli

v1.0.29

Published

mcc 客户端

Readme

Mini Code Cli (MCC)

一个 CLI 包装器,包装例如 claude code 等 AI 编程工具,扩展其功能。

功能特性

  • 自动环境配置(Windows 平台自动下载 Node.js 和 Git)
  • 多认证配置管理与自动切换
  • Web 界面配置管理
  • 请求拦截与失败重试机制
  • 内置常见 MCP
  • 内置优化过的系统提示词

安装

通过 npm 安装

npm install -g @wll8/mini-code-cli

Windows 便携版

  1. 下载 mini-code-cli.zip
  2. 解压到任意目录
  3. 以管理员身份运行 安装.bat

配置

首次配置

首次运行时,如果没有配置认证信息,会自动打开配置页面:

mcc

Web 配置界面

使用以下命令启动配置管理界面:

mcc mcc config

配置文件格式

配置文件位置:~/.mcc/cfg.json

{
  "AUTH": [
    {
      "BASE_URL": "https://example.com/",
      "TOKEN": "your-token-here",
      "ENV": [
        {"key": "HTTP_PROXY", "value": "http://proxy:8080"}
      ],
      "invalid": "false"
    }
  ]
}

使用方法

基本使用

# 启动 mcc 并进入交互模式
mcc

# 直接发送提示词
mcc -p "请帮我写一个 Hello World 程序"

# 在指定目录中工作
mcc /path/to/project

使用指定配置启动

如果你有多个认证配置,可以通过以下方式指定使用某个配置:

# 使用配置名称启动(需要在配置中设置 name 字段)
mcc mcc-<配置名称>

# 使用配置序号启动(从 1 开始)
mcc mcc-1  # 使用第一个配置
mcc mcc-2  # 使用第二个配置
mcc mcc-3  # 使用第三个配置

配置文件示例(带名称):

{
  "AUTH": [
    {
      "name": "primary",
      "BASE_URL": "https://example.com/",
      "TOKEN": "your-token-here",
      "invalid": "false"
    },
    {
      "name": "backup",
      "BASE_URL": "https://backup.example.com/",
      "TOKEN": "another-token",
      "invalid": "false"
    }
  ]
}

启动方式:

# 使用名为 "primary" 的配置
mcc mcc-primary

# 使用名为 "backup" 的配置
mcc mcc-backup

注意事项:

  • 使用 mcc mcc-<name>mcc mcc-<序号> 启动时,会进入强制模式
  • 强制模式下,即使该配置失败也不会自动切换到其他配置
  • 适用于调试特定配置或确保使用指定配置的场景

管理命令

# 打开配置界面
mcc mcc config

# 查看系统环境信息
mcc mcc --env

# 更新 MCC 到最新版本
mcc mcc update

# 卸载 MCC
mcc mcc uninstall

# 查看帮助
mcc mcc --help

项目架构

核心模块

  • cli.js - 主入口文件,处理命令行参数
  • cfg.js - 配置管理模块
  • util.js - 工具函数模块
  • interceptor.js - 请求拦截器
  • config-server.js - Web 配置服务器

工作流程

  1. 启动时检查环境配置
  2. 加载配置文件,验证认证信息
  3. 启动 claude-code 子进程
  4. 拦截器监控 API 请求状态
  5. 自动切换失效配置

开发

本地开发

# 克隆仓库
git clone https://github.com/wll8/mini-code-cli.git
cd mini-code-cli

# 安装依赖
npm install

# 测试运行
npm run dev

# 构建项目
npm run build

构建发布

# 开发构建
node build.js

# 生产构建(包含完整打包)
node build.js prod

# 仅构建 npm 包
node build.js --npm

常见问题

Q: 如何切换到不同的认证配置?

A: 有两种方式:

  1. 自动切换:当前配置失效后,系统会自动切换到下一个可用配置
  2. 手动指定:使用 mcc mcc-<配置名称>mcc mcc-<序号> 指定使用某个配置

Q: Windows 下自动下载的 Node.js 和 Git 存放在哪里?

A: 存放在 ~/.mcc/lib/ 目录下。

Q: 配置文件损坏了怎么办?

A: 删除 ~/.mcc/cfg.json 文件,重新运行 mcc mcc config 创建新配置。

许可证

MIT License