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

@mengzai1/cce

v1.1.1

Published

Claude Code 配置切换工具 - 管理多个 API Provider/Profile 并快速切换

Readme

中文文档

claude-code-env (cce)

A CLI tool for managing multiple Claude API configurations via a Provider-Profile architecture, configuring both Claude Code and OpenCode simultaneously.

Features

  • Provider-Profile architecture: separate API endpoint definitions from user configurations
  • Switch profiles to update Claude Code and OpenCode configs at once
  • Secure API key management with strict file permissions (0o600/0o700)
  • Interactive CLI with Inquirer.js
  • WebUI management dashboard
  • Built-in configuration diagnostics (cce doctor)

Installation

npm install -g @mengzai1/cce

Requires Node.js >= 16.0.0.

Quick Start

# 1. Initialize config directory (~/.config/cce)
cce init

# 2. Add a provider (e.g. Volcano Engine)
cce provider add volcano

# 3. Create a profile referencing the provider
cce create work

# 4. Activate the profile
cce use work

Commands

Profile Management

| Command | Alias | Description | |---------|-------|-------------| | cce init | | Initialize the configuration directory | | cce create <name> | | Create a new profile (interactively select a provider) | | cce use [name] | | Activate a profile (interactive selection if name is omitted) | | cce list | ls | List all profiles | | cce current | c | Show the currently active profile | | cce show <name> | | Show profile details | | cce edit <name> | | Edit a profile | | cce remove <name> | rm | Remove a profile |

Provider Management

| Command | Description | |---------|-------------| | cce provider add <type> | Add a new provider | | cce provider list | List all providers | | cce provider show <name> | Show provider details | | cce provider edit <name> | Edit a provider | | cce provider remove <name> | Remove a provider |

Supported provider types: openai-compatible, anthropic-compatible, custom

Other Commands

| Command | Description | |---------|-------------| | cce doctor | Check configuration for issues | | cce ui | Launch the WebUI dashboard |

cce ui options:

  • -p, --port <port> — specify a port
  • --no-open — don't auto-open the browser

How It Works

Profile (references) -> Provider (resolves) -> EffectiveConfig (generates) -> Config Files

When you run cce use <profile>:

  1. Loads the profile and resolves the referenced provider
  2. Merges into an EffectiveConfig (baseURL, apiKey, model)
  3. Writes Claude Code config (~/.claude/settings.json) and OpenCode config (~/.config/opencode/opencode.json)

Configuration

Directory Layout

~/.config/cce/
├── providers/          # Provider definitions
│   └── volcano-prod.json
├── profiles/           # User profiles
│   └── work.json
└── active              # Currently active profile name

Provider Example

{
  "name": "volcano-prod",
  "displayName": "Volcano Engine Production",
  "type": "openai-compatible",
  "baseURL": "https://ark.cn-beijing.volces.com/api/v3",
  "apiKey": "your-api-key",
  "models": ["ep-20250101-xxxx", "ep-20250201-yyyy"],
  "defaultModel": "ep-20250201-yyyy"
}

Profile Example

{
  "name": "work",
  "description": "Work environment",
  "provider": "volcano-prod",
  "model": "ep-20250101-xxxx",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z"
}

FAQ

Q: What does cce use actually modify? A: It writes to ~/.claude/settings.json (Claude Code) and ~/.config/opencode/opencode.json (OpenCode).

Q: How are API keys secured? A: The ~/.config/cce directory is set to 700, config files to 600 (owner read/write only).

Q: Can I override the model in a profile? A: Yes. A profile can specify a model field to override the provider's defaultModel.

License

MIT