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

@cc123hh/claude-config-cli

v0.0.8

Published

Claude API 配置管理工具 - 管理 API URL 和 Token 预设

Readme

Claude Config CLI

Claude API 配置管理工具 - 管理 API URL 和 Token 预设的 Node.js/TypeScript CLI 工具。

功能特性

  • 跨平台支持 - Windows、macOS、Linux 原生支持
  • 类型安全 - TypeScript 提供编译时类型检查
  • 友好交互 - 使用 inquirer 提供美观的交互式菜单
  • 彩色输出 - 使用 chalk 实现彩色终端输出
  • 预设管理 - 支持添加、删除、编辑 API 预设配置
  • Token 脱敏 - 自动脱敏显示敏感信息
  • JSON 配置 - 预设配置采用 JSON 格式,易于管理

安装方式

方式一:直接使用 npx(推荐)

npx @cc123hh/claude-config-cli

方式二:全局安装

npm install -g @cc123hh/claude-config-cli
claude-config-cli

方式三:本地开发

# 克隆项目
git clone <repository>
cd claude-config-cli

# 安装依赖
npm install

# 编译 TypeScript
npm run build

# 运行
npm start

# 或者开发模式
npm run dev

使用指南

启动后会显示主菜单:

╔════════════════════════════════════════╗
║    Claude API 配置管理工具               ║
╚════════════════════════════════════════╝

当前配置:
┌────────────────────────────────────────────┐
URL:     https://open.bigmodel.cn/api/anthropic
Token:   aab6c23...3a9b
└────────────────────────────────────────────┘

请选择操作:

  1) 从预设配置选择
  2) 手动输入配置
  3) 管理预设配置
  4) 查看当前配置
  5) 编辑配置文件
  6) 退出

功能说明

  1. 从预设配置选择 - 从预设列表中选择并应用 API 配置
  2. 手动输入配置 - 手动输入 API URL 和 Token
  3. 管理预设配置 - 添加、删除、编辑 API 预设
  4. 查看当前配置 - 显示当前 Claude API 配置
  5. 编辑配置文件 - 使用编辑器打开配置文件
  6. 退出 - 退出程序

预设配置格式

预设配置文件位于 presets.json

{
  "presets": [
    {
      "name": "智谱 AI (BigModel)",
      "url": "https://open.bigmodel.cn/api/anthropic",
      "token": "your-token-here"
    },
    {
      "name": "Anthropic 官方",
      "url": "https://api.anthropic.com"
    }
  ]
}

技术栈

  • 语言: TypeScript 5.x
  • 交互: inquirer 9.x
  • 样式: chalk 5.x
  • 配置: JSON

项目结构

claude-config-cli/
├── src/
│   ├── index.ts              # 主入口
│   ├── types.ts              # 类型定义
│   ├── config/
│   │   └── manager.ts        # API 配置管理
│   ├── presets/
│   │   └── manager.ts        # 预设配置管理
│   └── ui/
│       ├── menu.ts           # 交互式菜单
│       └── display.ts        # 显示输出
├── presets.json              # 预设配置
├── package.json
├── tsconfig.json
└── README.md

开发

# 安装依赖
npm install

# 开发模式
npm run dev

# 编译
npm run build

# 运行编译后的版本
npm start

许可证

MIT

致谢

感谢原 shell 脚本作者的设计思路。