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

@hua123an/claude-code

v2026.4.22

Published

Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal

Downloads

244

Readme

Claude Code Best (CCB) v1.3.7

终端里的 AI 编程助手 — 基于 Anthropic Claude Code CLI 的逆向还原与增强版本

简介

CCB 是 Anthropic 官方 Claude Code CLI 的源码逆向还原项目,在完整复现原版功能的基础上,新增了多供应商支持、账号管理、图片粘贴等实用增强。

核心特性

| 特性 | 说明 | |------|------| | 多供应商支持 | 兼容 OpenAI / Anthropic / Gemini / Grok 协议,支持 NVIDIA NIM、OpenRouter 等任意 OpenAI 兼容 API | | 账号管理 | /login 统一入口,多账号切换,模型选择持久化,支持远程模型列表拉取 | | 图片粘贴 | Ctrl+V 从剪贴板粘贴图片,macOS 原生剪贴板读取,自动压缩适配 API 限制 | | 多实例协作 | Pipe IPC 同机协作 + LAN 跨机器零配置发现与通讯 | | 语音模式 | Push-to-Talk 语音输入 | | Computer Use | 屏幕截图、键鼠控制 | | Web 搜索 | 内置网页搜索工具 | | 55+ 工具 | 文件读写、代码搜索、终端执行、Git 操作等完整工具链 |

环境要求

  • Bun >= 1.3.11(务必使用最新版,bun upgrade
  • macOS / Linux / WSL

快速开始

从源码运行

# 安装依赖
bun install

# 开发模式(版本号显示 888)
bun run dev

# 构建
bun run build

# 全局安装(构建后)
npm link
ccb

从 NPM 安装

bun i -g claude-code-best
bun pm -g trust claude-code-best
ccb

配置 API 供应商

首次启动后,输入 /login 进入账号配置:

  1. 选择供应商 — 新增账号或选择已有账号
  2. 选择模型 — 从远程拉取的模型列表中选择,支持搜索过滤

账号信息保存在 ~/.claude/accounts.json,支持多账号快速切换。

支持的供应商示例

| 供应商 | Base URL | 说明 | |--------|----------|------| | NVIDIA NIM | https://integrate.api.nvidia.com/v1 | 免费额度,模型丰富 | | OpenRouter | https://openrouter.ai/api/v1 | 聚合多家模型 | | 自建服务 | https://your-domain.com/v1 | 任意 OpenAI 兼容 API |

项目结构

src/
├── entrypoints/cli.tsx    # CLI 入口
├── main.tsx               # 主程序(Commander.js)
├── query.ts               # API 请求核心
├── QueryEngine.ts         # 查询编排器
├── screens/REPL.tsx       # 交互界面
├── components/            # React Ink UI 组件(149 个)
├── services/api/          # API 层(7 个供应商适配)
├── tools/                 # 工具系统(55 个工具)
├── commands/              # 斜杠命令
│   ├── login/             # /login 统一登录
│   └── account/           # 账号存储管理
├── hooks/                 # React Hooks
├── state/                 # 应用状态管理
└── utils/                 # 工具函数
packages/
├── @ant/ink/              # React Ink 定制版(快捷键系统)
└── image-processor-napi/  # 原生图片处理

构建系统

构建通过 build.ts 驱动 Bun.build(),采用 code splitting 多文件打包:

  • 产物输出到 dist/ 目录
  • 入口 dist/cli.js + chunk 文件
  • Bun 和 Node.js 均可运行
  • Feature Flags 通过 import { feature } from 'bun:bundle' 实现编译期开关

Feature Flags

通过环境变量启用额外功能:

FEATURE_VOICE_MODE=1 FEATURE_BUDDY=1 bun run dev

调试

TUI 模式需要真实终端,使用 VS Code attach 模式调试:

# 1. 终端启动
bun run dev:inspect

# 2. VS Code 中 F5 → "Attach to Bun (TUI debug)"

许可证

本项目仅供学习研究用途。Claude Code 的所有权利归 Anthropic 所有。