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

@journey1018/ccm

v0.0.20

Published

CCM - 多 AI CLI 配置管理工具

Readme

CCM - 多 AI CLI 配置管理工具

Language: 中文 | English

NPM版本 下载量 License

一键切换 Claude Code / Codex / Gemini 配置的命令行工具。支持多站点、多 Token 管理,智能合并配置,WebDAV 云端备份,无需手动修改配置文件。

📸 界面预览

配置切换界面

📑 目录

✨ 核心功能

  • 🔄 一键切换 - 快速切换不同的 API 站点和 Token
  • 📋 配置管理 - 查看、添加、删除 API 配置
  • 🔗 智能合并 - 自动与 Claude Code 配置文件同步
  • ⚙️ 完整支持 - 支持所有 Claude Code 配置项
  • 💻 Codex 支持 - 管理 Claude Code Codex 配置(仅支持 Claude 模型),支持开启/关闭 YOLO 模式
  • 🚀 YOLO 模式 - 为 Claude Code API 和 Codex 提供最宽松配置模式,无条件批准所有工具使用请求
  • 🔔 智能通知 - Claude Code 响应完成、工具批准等事件时自动推送系统通知,避免长时间等待
  • ☁️ WebDAV 备份 - 支持全局配置云端备份与恢复,兼容 Windows / macOS / Linux 间迁移(坚果云、其他标准 WebDAV 等)
    • CCM 配置备份 - 📁 .ccm/api_configs.json 等全局配置
    • Claude Code 配置备份 - 📄 settings.json 📄 config.json 📄 .claude.json(仅提取用户级根级 mcpServers,恢复时合并写回并保留其他字段)📄 CLAUDE.md 📁 agents/ 📁 commands/ 📁 hooks/ 📁 skills/
    • Codex 备份 - 📄 config.toml 📄 auth.json 📄 hooks.json 📄 AGENTS.md 📄 AGENTS.override.md 📁 hooks/ 📁 prompts/ 📁 skills/ 📁 agents/ 📁 ~/.agents/skills/ 📁 ~/.agent/skills/ 📁 ~/.agent/workflows/
    • Cursor 备份 - 📄 hooks.json 📁 commands/ 📁 skills/ 📁 agents/ 📁 hooks/ 📁 rules/
    • Gemini CLI 备份 - 📄 settings.json 📄 .env 📄 GEMINI.md 📁 hooks/ 📁 commands/ 📁 agents/ 📁 skills/
    • Antigravity 备份 - 📄 antigravity/mcp_config.json 📁 antigravity/skills/ 📁 antigravity/workflows/ 📁 antigravity/global_workflows/

📦 安装使用

# 全局安装
npm install -g @journey1018/ccm

# 检查并升级到最新版本
ccm update

🚀 使用方法

主要命令

# 启动交互式界面
ccm

# Claude配置管理
ccm api

# Codex 配置管理
ccm codexapi

# Gemini 配置管理
ccm geminiapi

# 快速切换 API 配置
ccm apiuse

# 查看当前状态
ccm status

# 检查是否有新版本
ccm update --check

# 检查并确认升级
ccm update

# 跳过确认直接升级
ccm update --yes

# 查看帮助
ccm --help

ccm 为唯一命令入口,避免与系统 cc 命令冲突。

📋 配置文件说明

智能配置合并

工具会自动将你选择的 API 配置与现有的 Claude Code/codex 设置合并,保留所有原有配置项,只更新 API 相关设置。

配置格式示例

{
  "sites": {
    "XX公益站": {
      "url": "https://api.example.com",
      "description": "同时支持Claude Code和Codex",
      "claude": {
        "env": {
          "ANTHROPIC_BASE_URL": "https://api.example.com",
          "ANTHROPIC_AUTH_TOKEN": {
            "主力Token": "sk-xxxxxxxxxxxxxx",
            "备用Token": "sk-yyyyyyyyyyyyyy"
          }
        }
      },
      "codex": {
        "OPENAI_API_KEY": "sk-xxxxxxxxxxxxxx",
        "model": "gpt-5",
        "model_reasoning_effort": "high",
        "model_providers": {
          "duckcoding": {
            "name": "duckcoding",
            "base_url": "https://jp.duckcoding.com/v1"
          }
        }
      },
      "gemini": {
        "env": {
          "GEMINI_API_KEY": {
            "主力Key": "gm-xxxxxxxxxxxxxx",
            "备用Key": "gm-yyyyyyyyyyyyyy"
          },
          "GEMINI_MODEL": "gemini-2.5-pro",
          "GOOGLE_GEMINI_BASE_URL": "https://generativelanguage.googleapis.com"
        }
      }
    },
    // 具体看注释
    "XX公益站2": {
      "url": "https://api.demo.com", // (可选)站点的地址 免得忘记公益站点,后期会支持一键打开
      "description": "仅支持Claude Code API", // 随意 可不填
      // Claude Code API配置(最简配置,兼容官方大部分配置,会覆盖配置文件)
      "claude": {
        "env": {
          "ANTHROPIC_BASE_URL": "https://api.demo.com",
          // Token支持两种格式:
          // 1. 对象格式(支持多个token)
          "ANTHROPIC_AUTH_TOKEN": {
            "Token1": "sk-aaaaaaaaaaaaaaa",
            "Token2": "sk-bbbbbbbbbbbbbbb"
          }
          // 2. 字符串格式(单个token,自动命名为"默认Token")
          // "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxxxx"
        }
      },
      // Codex API配置(最简配置,兼容官方大部分配置)
      "codex": {
        // API Key同样支持两种格式:
        // 1. 对象格式(支持多个API Key)
        "OPENAI_API_KEY": {
          "主要Key": "sk-xxxxxxxxxxxxxx",
          "测试Key": "sk-zzzzzzzzzzzzzzz"
        },
        // 2. 字符串格式(单个API Key,自动命名为"默认API Key")
        // "OPENAI_API_KEY": "sk-xxxxxxxxxxxxxx",
        "model": "gpt-5-code", // 使用Claude模型
        "model_reasoning_effort": "medium", // 推理强度:low/medium/high
        "model_providers": {
          "custom_provider": {
            "name": "custom_provider",
            "base_url": "https://api.demo.com/v1"
          }
        }
      },
      // Gemini API 配置(写入 ~/.gemini/.env)
      "gemini": {
        "env": {
          // API Key 同样支持两种格式:
          // 1. 对象格式(支持多个 API Key)
          "GEMINI_API_KEY": {
            "主要Key": "gm-xxxxxxxxxxxxxx",
            "测试Key": "gm-zzzzzzzzzzzzzzz"
          },
          // 2. 字符串格式(单个 API Key,自动命名为“默认 API Key”)
          // "GEMINI_API_KEY": "gm-xxxxxxxxxxxxxx",
          "GEMINI_MODEL": "gemini-2.5-flash",
          "GOOGLE_GEMINI_BASE_URL": "https://proxy.demo.com"
        }
      }
    }
  }
}

⭐ Star History

Star History Chart