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

baidu-ccc-dev

v1.0.4

Published

CLI tool for managing and syncing coding configurations across teams

Downloads

438

Readme

baidu-ccc-dev

CLI 工具,用于下载和管理 Claude Code 编码配置(commands/hooks/skills/agents/scripts)。

核心特性

  • 📦 一键安装:从 URL 下载配置压缩包并自动安装
  • 🎯 双级配置:支持个人级(~/.claude/)和项目级(./.claude/
  • 🔄 智能同步:冲突检测与交互式解决
  • 🛠️ 脚本安装:自动安装 shell 脚本为全局命令
  • 📊 变更追踪:展示新增、更新、删除的文件

安装

npm install -g baidu-ccc-dev

快速开始

安装配置

# 从默认 URL 下载并安装配置
baidu-ccc-dev install

# 或从自定义 URL 安装
baidu-ccc-dev install https://example.com/my-config.tar.gz

安装时会:

  1. 交互式选择配置级别(个人级/项目级)
  2. 下载并解压配置包
  3. 检测并解决文件冲突
  4. 自动安装 shell 脚本
  5. 展示文件变更

查看状态

baidu-ccc-dev status

显示配置目录、下载源等信息。

命令说明

install [url]

下载并安装配置。

参数:

  • url(可选)- 自定义配置下载 URL,默认使用 https://ai-coding-config.bj.bcebos.com/base/ai-coding-config.tar.gz

交互式流程:

  1. 选择配置级别:
    • 个人级:安装到 ~/.claude/(全局配置)
    • 项目级:安装到当前目录 ./.claude/(项目专属)
  2. 自动下载并解压配置包
  3. 检测冲突并交互式解决
  4. 安装 scripts/ 下的 shell 脚本为全局命令

status

查看当前配置状态,包括:

  • 个人配置目录
  • 安装记录文件
  • 配置下载源

配置包结构

配置包(tar.gz)应包含以下目录:

ai-coding-config/
├── commands/      # Claude Code 命令配置
├── hooks/         # Git hooks 和其他钩子
├── skills/        # Claude Code 技能配置
├── agents/        # AI 代理配置
└── scripts/       # Shell 脚本(自动安装为全局命令)

冲突处理

安装时如果检测到文件冲突,工具会交互式提示:

  • RemoteDeleted:远程已删除,本地仍存在 → 自动删除本地文件
  • BothModified:本地和远程都有修改 → 选择保留本地或使用远程
    • 可查看文件差异(并排对比)
    • 支持逐个文件决策
  • RemoteModified:仅远程修改 → 自动同步
  • LocalOnly:仅本地存在 → 保留不变

脚本自动安装

安装配置时,scripts/ 目录下的 .sh 脚本会自动安装为全局命令:

  1. 复制到配置目录(如 ~/.claude/scripts/
  2. 创建符号链接到 ~/.local/bin
  3. 自动设置执行权限
  4. 命令名为脚本文件名去掉 .sh 后缀

示例:

# 配置包中有 scripts/continuous_claude.sh
baidu-ccc-dev install

# 安装后可直接使用
continuous_claude

PATH 配置:

如果 ~/.local/bin 不在 PATH 中,工具会提示:

# 添加到 ~/.zshrc 或 ~/.bashrc
export PATH="$HOME/.local/bin:$PATH"

# 使配置生效
source ~/.zshrc

使用场景

个人使用

# 安装到个人目录
baidu-ccc-dev install
# 选择:个人级 (~/.claude/)

# 所有项目都会使用此配置

项目级配置

# 进入项目目录
cd /path/to/project

# 安装到项目目录
baidu-ccc-dev install
# 选择:项目级 (./.claude/)

# 将配置纳入版本控制
git add .claude/
git commit -m "Add Claude Code configuration"

# 团队成员克隆后自动获得配置

自定义配置源

# 从企业内网下载配置
baidu-ccc-dev install https://internal.company.com/configs/team-a.tar.gz

# 从对象存储下载配置
baidu-ccc-dev install https://my-bucket.s3.amazonaws.com/claude-config.tar.gz

文件变更追踪

安装完成后,工具会展示文件变更:

文件变更:
  新增 3 个文件:
    + commands/custom-command.md
    + skills/code-review.md
    + scripts/deploy.sh
  更新 2 个文件:
    ~ hooks/pre-commit.sh
    ~ agents/reviewer.json
  删除 1 个文件:
    - commands/deprecated-cmd.md

开发

# 安装依赖
npm install

# 开发模式运行
npm run dev

# 构建
npm run build

# 测试
npm test               # 运行测试
npm run test:watch     # 监听模式
npm run test:coverage  # 生成覆盖率报告

# 清理构建产物
npm run clean

# 本地测试
npm link
baidu-ccc-dev --help

技术栈

  • TypeScript - 类型安全
  • Commander.js - CLI 框架
  • Inquirer - 交互式提示
  • fs-extra - 文件系统操作
  • Ora - 终端加载动画
  • Chalk - 终端文本样式
  • Jest - 单元测试

项目结构

src/
├── cli.ts              # CLI 入口
├── constants.ts        # 全局常量
├── types/              # 类型定义
├── commands/           # 命令实现
│   ├── install.ts      # 安装配置
│   └── status.ts       # 查看状态
└── utils/
    ├── conflict.ts     # 冲突检测
    ├── diff.ts         # 差异显示
    ├── file-changes.ts # 变更追踪
    ├── prompt.ts       # 交互式提示
    ├── script.ts       # 脚本安装
    ├── sync-record.ts  # 同步记录
    └── git.ts          # 临时目录管理

常见问题

Q: 配置文件存储在哪里?

  • 个人级:~/.claude/
  • 项目级:./.claude/(在项目根目录)
  • 安装记录:~/.baidu-ccc-dev/.sync-record.json

Q: 如何更新配置?

重新运行 baidu-ccc-dev install,工具会自动检测变更并提示冲突解决。

Q: 如何切换配置源?

baidu-ccc-dev install <new-url>

Q: 脚本安装后无法执行?

确保 ~/.local/bin 在 PATH 中:

echo $PATH | grep "$HOME/.local/bin"

如果不在,添加到 shell 配置文件(~/.zshrc~/.bashrc):

export PATH="$HOME/.local/bin:$PATH"
source ~/.zshrc

Q: 配置包格式要求?

  • 必须是 .tar.gz 格式
  • 解压后应包含 commands/hooks/skills/agents/scripts/ 中的至少一个目录
  • 支持单层或双层目录结构(如 ai-coding-config/commands/

License

MIT