{"_id":"@rebecca554owen/cc-cli","_rev":"32-f34769003f01db153bd4229a4d7dc570","name":"@rebecca554owen/cc-cli","dist-tags":{"latest":"2.12.0"},"versions":{"2.10.0":{"name":"@rebecca554owen/cc-cli","version":"2.10.0","keywords":["cli","claude-code","api","config","management","anthropic","ai","configuration","tool"],"author":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"license":"MIT","_id":"@rebecca554owen/cc-cli@2.10.0","maintainers":[{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"}],"homepage":"https://github.com/rebecca554owen/cc-cli#readme","bugs":{"url":"https://github.com/rebecca554owen/cc-cli/issues"},"bin":{"cc":"bin/cc.js","cc-cli":"bin/cc.js"},"dist":{"shasum":"6ffbcfd1ee06fd3f33a8fd01b3617d5c530f7115","tarball":"https://registry.npmjs.org/@rebecca554owen/cc-cli/-/cc-cli-2.10.0.tgz","fileCount":35,"integrity":"sha512-K+sWMGlLc8HfEh8iMWMaxNe4PIXqZ0hw7Ry898/gj++FfK1zVRK17Rc/xfusst9y5Kgw/40LH4yE8vW6G/HIlw==","signatures":[{"sig":"MEUCIQC2TqzeGBC6JwIEKgA7W9w/mkibOQbe+hBGa5fIxcQ1/gIgOxCulqmAgOmhbyxcw2ReES01xfApee1QpvnhfWZI9gE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":252103},"main":"src/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"ac8b99c732d013f7baf468df22893e106773fb28","scripts":{"link":"npm link","test":"node bin/cc.js --help","start":"node bin/cc.js","unlink":"npm unlink","prepublishOnly":"npm test"},"_npmUser":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"repository":{"url":"git+https://github.com/rebecca554owen/cc-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CC CLI 终端配置管理工具 - Claude Code / Codex 配置管理","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^5.4.1","toml":"^3.0.0","boxen":"^5.1.2","chalk":"^4.1.2","figlet":"^1.5.2","fs-extra":"^11.1.0","inquirer":"^8.2.0","commander":"^9.0.0","update-notifier":"^7.3.1"},"preferGlobal":true,"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cc-cli_2.10.0_1759834122167_0.24749445074985377","host":"s3://npm-registry-packages-npm-production"}},"2.11.0":{"name":"@rebecca554owen/cc-cli","version":"2.11.0","keywords":["cli","claude-code","api","config","management","anthropic","ai","configuration","tool"],"author":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"license":"MIT","_id":"@rebecca554owen/cc-cli@2.11.0","maintainers":[{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"}],"homepage":"https://github.com/rebecca554owen/cc-cli#readme","bugs":{"url":"https://github.com/rebecca554owen/cc-cli/issues"},"bin":{"cc":"bin/cc.js","cc-cli":"bin/cc.js"},"dist":{"shasum":"2a999a390776e7849fc1fac0450226dc6b15bab9","tarball":"https://registry.npmjs.org/@rebecca554owen/cc-cli/-/cc-cli-2.11.0.tgz","fileCount":44,"integrity":"sha512-6uV/p7MXZWhjwKNCt67pTWyUbT9m1IKMaj+E72fiwiG4PCzbphYVH3Zo3fCc1h6QHsXEzGR1Boe+IqibwbpCFA==","signatures":[{"sig":"MEUCIQDC1Zxq7aAN5PWaX8U/SRPX1++HLuVw2i7MWShs9T9O/AIgFRqer3CtyOVhZL9SlOqwOS2xLc66x4INfjblsyZwHlY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":328602},"main":"src/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"32ad3f88890f164d5f1a3eff3141f2bac7127938","scripts":{"link":"npm link","test":"node bin/cc.js --help","start":"node bin/cc.js","unlink":"npm unlink","prepublishOnly":"npm test"},"_npmUser":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"repository":{"url":"git+https://github.com/rebecca554owen/cc-cli.git","type":"git"},"_npmVersion":"10.8.2","description":"CC CLI 终端配置管理工具 - Claude Code / Codex 配置管理","directories":{},"_nodeVersion":"20.19.5","dependencies":{"ora":"^5.4.1","toml":"^3.0.0","boxen":"^5.1.2","chalk":"^4.1.2","figlet":"^1.5.2","fs-extra":"^11.1.0","inquirer":"^8.2.0","commander":"^9.0.0","update-notifier":"^7.3.1"},"preferGlobal":true,"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cc-cli_2.11.0_1759897264359_0.025812163458207582","host":"s3://npm-registry-packages-npm-production"}},"2.12.0":{"name":"@rebecca554owen/cc-cli","version":"2.12.0","description":"CC CLI 终端配置管理工具 - Claude Code / Codex 配置管理","main":"src/index.js","type":"module","bin":{"cc":"bin/cc.js","cc-cli":"bin/cc.js"},"publishConfig":{"access":"public"},"scripts":{"test":"node bin/cc.js --help","link":"npm link","unlink":"npm unlink","start":"node bin/cc.js","prepublishOnly":"npm test"},"keywords":["cli","claude-code","api","config","management","anthropic","ai","configuration","tool"],"author":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"license":"MIT","dependencies":{"boxen":"^5.1.2","chalk":"^4.1.2","commander":"^9.0.0","figlet":"^1.5.2","fs-extra":"^11.1.0","inquirer":"^8.2.0","ora":"^5.4.1","toml":"^3.0.0","update-notifier":"^7.3.1"},"engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/rebecca554owen/cc-cli.git"},"homepage":"https://github.com/rebecca554owen/cc-cli#readme","bugs":{"url":"https://github.com/rebecca554owen/cc-cli/issues"},"preferGlobal":true,"_id":"@rebecca554owen/cc-cli@2.12.0","gitHead":"bc0140d604e2ccac9ca4205820943cf3914fecfe","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-X32Wci7LQlO0vR0st7R/9yj/5uBLlIAaIAk18as8YdhCwibQMe8UsDoNM7t3cshqTx+7hNjQEtpwqElQ3e6yQQ==","shasum":"328b55e87a1f1bca0836953cb0367d502180bbdf","tarball":"https://registry.npmjs.org/@rebecca554owen/cc-cli/-/cc-cli-2.12.0.tgz","fileCount":44,"unpackedSize":329289,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB8JAmy7Yx6qpnBihziYiPKvbdOXQQ7L7VH1guwHMmnaAiASu6dzF5ujzpv+u7pQbxeNFVJQHHPz8y7Xpg4SUFVD6A=="}]},"_npmUser":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"directories":{},"maintainers":[{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cc-cli_2.12.0_1759920707275_0.5903909208656837"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-07T10:48:42.067Z","modified":"2025-10-08T10:51:47.638Z","2.9.0":"2025-10-05T14:21:13.127Z","1.0.0":"2025-10-05T14:31:51.250Z","2.0.0":"2025-10-05T14:41:51.213Z","2.8.1":"2025-10-05T15:48:40.493Z","2.8.2":"2025-10-05T17:16:22.766Z","2.8.3":"2025-10-05T17:38:16.181Z","2.8.4":"2025-10-06T02:16:23.010Z","2.8.5":"2025-10-06T03:25:49.529Z","2.8.6":"2025-10-06T03:48:43.331Z","2.8.7":"2025-10-06T04:39:08.164Z","2.8.8":"2025-10-06T05:17:02.283Z","2.9.1":"2025-10-06T05:43:08.218Z","2.9.2":"2025-10-06T10:39:43.886Z","2.9.3":"2025-10-06T12:01:27.729Z","2.9.4":"2025-10-06T12:40:47.070Z","2.9.5":"2025-10-06T12:57:42.823Z","2.9.6":"2025-10-06T13:21:21.207Z","2.9.7":"2025-10-06T13:50:41.267Z","2.9.8":"2025-10-06T14:46:50.904Z","2.9.9":"2025-10-06T20:27:48.214Z","3.0.0":"2025-10-06T21:22:25.429Z","3.0.1":"2025-10-06T21:34:11.377Z","3.0.2":"2025-10-06T22:11:53.860Z","3.0.3":"2025-10-06T22:18:24.809Z","3.0.4":"2025-10-06T22:25:01.229Z","2.10.0":"2025-10-07T10:48:42.375Z","2.11.0":"2025-10-08T04:21:04.557Z","2.12.0":"2025-10-08T10:51:47.484Z"},"bugs":{"url":"https://github.com/rebecca554owen/cc-cli/issues"},"author":{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"},"license":"MIT","homepage":"https://github.com/rebecca554owen/cc-cli#readme","keywords":["cli","claude-code","api","config","management","anthropic","ai","configuration","tool"],"repository":{"type":"git","url":"git+https://github.com/rebecca554owen/cc-cli.git"},"description":"CC CLI 终端配置管理工具 - Claude Code / Codex 配置管理","maintainers":[{"name":"rebecca554owen","email":"rebecca554owen@gmail.com"}],"readme":"# CC CLI - Claude Code Configuration Management Tool\n\n**Language**: [中文](README_CN.md) | [English](README.md)\n\n[![NPM Version](https://img.shields.io/npm/v/@rebecca554owen/cc-cli.svg)](https://www.npmjs.com/package/@rebecca554owen/cc-cli)\n[![Downloads](https://img.shields.io/npm/dm/@rebecca554owen/cc-cli.svg)](https://www.npmjs.com/package/@rebecca554owen/cc-cli)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n\nA command-line tool for one-click switching of Claude Code / Codex configurations. Supports multi-site, multi-token management, intelligent configuration merging, and no manual file editing required.\n\n## 📸 Interface Preview\n\n```\n┌──────────────────────────────────────────────────────┐\n│                                                      │\n│         ___ ___    ___ _    ___                      │\n│        / __/ __|  / __| |  |_ _|                     │\n│       | (_| (__  | (__| |__ | |                      │\n│        ______|  ___|____|___|                        │\n│                                                      │\n│      Claude Code配置管理CLI工具                      │\n│             v2.10.0 (最新)                          │\n│                                                      │\n│   🤖 当前激活配置                                    │\n│   ══════════════════════════════════════════════════ │\n│   📡 Claude Code: siliconflow                       │\n│     BASEURL: http://192.168.5.10:3001/proxy/siliconflow │\n│     TOKEN: sk-bTRkGXYhv3w3...                        │\n│     MODEL: deepseek-ai/DeepSeek-V3.1-Terminus        │\n│                                                      │\n│   💻 Codex API: api                                  │\n│     BASEURL: http://192.168.5.10:3001/proxy/coreshub/v1 │\n│     API Key: sk-bTRkGXYhv3w3...                      │\n│     MODEL: DeepSeek-V3.1-Terminus                    │\n│                                                      │\n│   💡 快速使用: cc use | cc usex                      │\n│   🛠️  管理工具: cc api | cc apix                     │\n│                                                      │\n└──────────────────────────────────────────────────────┘\n\n? 请选择功能模块：\n  📡 Claude 配置管理 - Claude Code API \n  💻 Codex  配置管理 - OpenAI Codex API \n  📊 查看当前API状态 - Status\n  📦 备份与恢复配置 - Backup & Restore\n  ❓ 查看命令帮助文档 - Help\n  ──────────────\n  🚪 Exit - 退出\n```\n\n## 📑 Table of Contents\n\n- [✨ Core Features](#-core-features)\n- [📦 Installation](#-installation)\n- [🚀 Usage](#-usage)\n- [📋 Configuration File Description](#-configuration-file-description)\n- [🔄 Working Principle](#-working-principle)\n\n## ✨ Core Features\n\n- 🔄 **One-Click Switching** - Quickly switch between different API sites and tokens\n- 📋 **Configuration Management** - View, add, and delete API configurations\n- 🔗 **Intelligent Merging** - Automatically sync with Claude Code/Codex configuration files\n- ⚙️ **Full Support** - Supports all Claude Code/Codex configuration items\n- 💻 **Codex Support** - Manage Codex configurations with auto mode support\n- 🚀 **Auto Mode** - Unconditionally approve all tool usage requests (Claude Code / Codex)\n\n## 📦 Installation\n\n```bash\n# Global installation\nnpm install -g @rebecca554owen/cc-cli\n```\n\n## 🚀 Usage\n\n### Quick Start\n\n```bash\n# Start interactive interface\ncc\n\n# If you encounter command conflicts, use the backup command\ncc-cli\n```\n\n**⚠️ Command Conflict Resolution**: If you encounter `clang: error` errors, it means the `cc` command conflicts with the system's C compiler, please use the `cc-cli` command.\n\n### Claude Code API Commands\n\n```bash\n# Interactive management interface\ncc api\n\n# Quick switch configuration (Recommended)\ncc use\n\n# Command line operations\ncc api --list        # List all configurations\ncc api --add         # Add new configuration\ncc api --edit        # Edit configuration file\ncc api --delete      # Delete configuration\ncc api --help        # Show help\n```\n\n### Codex API Commands\n\n```bash\n# Interactive management interface\ncc apix\n\n# Quick switch configuration (Recommended)\ncc usex\n\n# Command line operations\ncc apix --list       # List all configurations\ncc apix --edit       # Edit configuration file\ncc apix --auto       # Enable/Disable auto mode\ncc apix --help       # Show help\n```\n\n### Other Commands\n\n```bash\n# View current configuration status\ncc status\n\n# Backup and restore configuration\ncc backup\n\n# View global help\ncc --help\n```\n\n## 📋 Configuration File Description\n\n### Configuration File Locations\n\n- **API Configuration**: `~/.claude/api_configs.json`\n- **Claude Code**: `~/.claude/settings.json`\n- **Codex**: `~/.codex/config.toml`, `~/.codex/auth.json`\n\n### Intelligent Configuration Merging\n\nThe tool will automatically merge your selected API configuration with existing Claude Code/Codex settings, preserving all original configuration items and only updating API-related settings.\n\n### Configuration Format Examples\n\n#### 1. Claude Code Configuration\n```json\n{\n  \"sites\": {\n    \"Claude Example\": {\n      \"url\": \"https://api.anthropic.com\",\n      \"description\": \"Claude Code API configuration\",\n      \"claude\": {\n        \"env\": {\n          \"ANTHROPIC_BASE_URL\": \"https://api.anthropic.com\",\n          \"ANTHROPIC_AUTH_TOKEN\": {\n            \"Primary Token\": \"sk-ant-api03-xxxxxxxxxxxxxx\",\n            \"Backup Token\": \"sk-ant-api03-yyyyyyyyyyyyyy\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n#### 2. Codex Configuration (Advanced Authentication)\n```json\n{\n  \"sites\": {\n    \"Codex Example\": {\n      \"url\": \"https://api.openai.com\",\n      \"description\": \"Codex with custom authentication\",\n      \"codex\": {\n        \"OPENAI_API_KEY\": {\n          \"Primary Key\": \"sk-xxxxxxxxxxxxxx\",\n          \"Test Key\": \"sk-yyyyyyyyyyyyyy\"\n        },\n        \"model\": \"gpt-5\",\n        \"model_reasoning_effort\": \"high\",\n        \"model_providers\": {\n          \"deepseek\": {\n            \"name\": \"DeepSeek API\",\n            \"base_url\": \"https://api.deepseek.com/v1\",\n            \"wire_api\": \"chat\",\n            \"requires_openai_auth\": false,\n            \"http_headers\": {\n              \"Authorization\": \"Bearer sk-bTRkGXYhv3w3odoM46291721A3Eb40Af99E08cEe8f3458Ad\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n### Codex Advanced Authentication\n\nCodex supports two authentication modes:\n\n#### 1. Standard OpenAI Authentication\n```json\n\"model_providers\": {\n  \"openai\": {\n    \"name\": \"OpenAI\",\n    \"base_url\": \"https://api.openai.com/v1\",\n    \"wire_api\": \"responses\",\n    \"requires_openai_auth\": true\n  }\n}\n```\n\n#### 2. Custom Authentication with HTTP Headers\n```json\n\"model_providers\": {\n  \"custom_api\": {\n    \"name\": \"Custom API\",\n    \"base_url\": \"https://api.example.com/v1\",\n    \"wire_api\": \"chat\",\n    \"requires_openai_auth\": false,\n    \"http_headers\": {\n      \"Authorization\": \"Bearer sk-bTRkGXYhv3w3odoM46291721A3Eb40Af99E08cEe8f3458Ad\",\n      \"X-API-Key\": \"custom-key\",\n      \"Content-Type\": \"application/json\"\n    }\n  }\n}\n```\n\n**Wire API Modes:**\n- `\"responses\"` - Standard OpenAI response format\n- `\"chat\"` - Chat completion format (requires `http_headers`)\n\n## 🔄 Working Principle\n\n### Auto Mode Explanation\n\n**Claude Code Auto Mode**:\n- Adds hooks configuration to `~/.claude/settings.json`\n- Uses `cc claude-auto` command for automatic tool approval\n- Automatically approves all tool usage requests without manual confirmation\n\n**Codex Auto Mode**:\n- Set `approval_policy: \"never\"`\n- Set `sandbox_mode: \"danger-full-access\"`\n- Most permissive execution permissions\n- Allows all system operations without confirmation\n\n⚠️ **Warning**: Auto mode will unconditionally approve all operations, use with caution!\n\n## ⭐ Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=rebecca554owen/cc-cli&type=Date)](https://star-history.com/#rebecca554owen/cc-cli&Date)\n\n---\n\n**License**: MIT License\n","readmeFilename":"README.md"}