{"_id":"c-apicc","_rev":"5-97acffd3b959f67150b545ca5d206b37","name":"c-apicc","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.4":{"name":"c-apicc","version":"0.1.4","keywords":["codex","newapi","cli","setup","openai-compatible"],"license":"AGPL-3.0-or-later","_id":"c-apicc@0.1.4","maintainers":[{"name":"coma111","email":"cbl1128@163.com"}],"homepage":"https://github.com/QuantumNous/new-api/tree/main/installer/codex-env","bugs":{"url":"https://github.com/QuantumNous/new-api/issues"},"bin":{"c-apicc":"cli.js"},"dist":{"shasum":"cc96c19829b014ef62bfd5c5c0c8ebb777d01982","tarball":"https://registry.npmjs.org/c-apicc/-/c-apicc-0.1.4.tgz","fileCount":6,"integrity":"sha512-VegMjh1f/uSDeepCnIzReumpCoW8J2/pThPWXVadly+XiUSiGf0mmII2Vk/y3833u1thPYFqhY5I+qGzxYn88Q==","signatures":[{"sig":"MEQCIHw9en0FT8kU6A7jujsf0XAa1j97aR5DFenkBW3Z/vhlAiBfJisQ+MBgwMC+7FUnzgupY4o/eGMDqUkQVgil/DDL5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63297},"main":"cli.js","type":"commonjs","engines":{"node":">=18.0.0"},"gitHead":"8b45b93b353c944d79eefa3774b7741367c1ea9c","_npmUser":{"name":"coma111","email":"cbl1128@163.com"},"repository":{"url":"git+https://github.com/QuantumNous/new-api.git","type":"git","directory":"installer/codex-env"},"_npmVersion":"9.2.0","description":"One-click Codex environment setup for NewAPI-compatible channels","directories":{},"_nodeVersion":"22.22.1","dependencies":{"chalk":"^4.1.2","prompts":"^2.4.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/c-apicc_0.1.4_1779202762437_0.8968790095750871","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"c-apicc","version":"0.1.5","keywords":["codex","newapi","cli","setup","openai-compatible"],"license":"AGPL-3.0-or-later","_id":"c-apicc@0.1.5","maintainers":[{"name":"coma111","email":"cbl1128@163.com"}],"homepage":"https://github.com/QuantumNous/new-api/tree/main/installer/codex-env","bugs":{"url":"https://github.com/QuantumNous/new-api/issues"},"bin":{"c-apicc":"cli.js"},"dist":{"shasum":"340bb6e0a578dc24a2eb34f30e38c92d6b5683bc","tarball":"https://registry.npmjs.org/c-apicc/-/c-apicc-0.1.5.tgz","fileCount":6,"integrity":"sha512-fhbnSIrPDiP3En7+U7A0myMAEUmXUnXhq3wovJwRfPe3y5yIjR4QzQQL3mndQJ7gzcVGZBN6vb/c+4PSkbdheg==","signatures":[{"sig":"MEUCIQC+tjZq+EbQqKMyHeJa5sJHB4pV5qHZolXG253Fu5c8YQIgSCianH5r295ZebnQ0fWAju11GLazqW9v4bwcIa8+lOo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63604},"main":"cli.js","type":"commonjs","engines":{"node":">=18.0.0"},"_npmUser":{"name":"coma111","email":"cbl1128@163.com"},"repository":{"url":"git+https://github.com/QuantumNous/new-api.git","type":"git","directory":"installer/codex-env"},"_npmVersion":"9.2.0","description":"One-click Codex environment setup for NewAPI-compatible channels","directories":{},"_nodeVersion":"22.22.1","dependencies":{"chalk":"^4.1.2","prompts":"^2.4.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/c-apicc_0.1.5_1779279537665_0.931542621521176","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"c-apicc","version":"0.1.6","keywords":["codex","c-api.cc","cli","setup","openai-compatible"],"license":"AGPL-3.0-or-later","_id":"c-apicc@0.1.6","maintainers":[{"name":"coma111","email":"cbl1128@163.com"}],"homepage":"https://github.com/QuantumNous/new-api/tree/main/installer/codex-env","bugs":{"url":"https://github.com/QuantumNous/new-api/issues"},"bin":{"c-apicc":"cli.js"},"dist":{"shasum":"94fbf637855dd890a2bf0a4bc91cad76b52280fa","tarball":"https://registry.npmjs.org/c-apicc/-/c-apicc-0.1.6.tgz","fileCount":6,"integrity":"sha512-SF+RTtTTfdsSJ74o4FrTrHwe1aEltz8/zJ+UIXEz974sZvncHLguxQx+EPKYiE1VxzHyncGEEqcbJAptGRt2Mw==","signatures":[{"sig":"MEUCIHlE3l2jA7l8If8skbwzprKnDT163BOr78c6ZQDKhMOnAiEAqF7BSCeQDmK/mhmDYtJSSmcMyT74BxArAnGX8AqXPCg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64248},"main":"cli.js","type":"commonjs","_from":"file:/root/npm-published-check/c-apicc/package/c-apicc-0.1.6.tgz","engines":{"node":">=18.0.0"},"_npmUser":{"name":"coma111","email":"cbl1128@163.com"},"_resolved":"/root/npm-published-check/c-apicc/package/c-apicc-0.1.6.tgz","_integrity":"sha512-SF+RTtTTfdsSJ74o4FrTrHwe1aEltz8/zJ+UIXEz974sZvncHLguxQx+EPKYiE1VxzHyncGEEqcbJAptGRt2Mw==","repository":{"url":"git+https://github.com/QuantumNous/new-api.git","type":"git","directory":"installer/codex-env"},"_npmVersion":"9.2.0","description":"One-click Codex environment setup for c-api.cc","directories":{},"_nodeVersion":"22.22.1","dependencies":{"chalk":"^4.1.2","prompts":"^2.4.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/c-apicc_0.1.6_1779282147526_0.7276096402011552","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"c-apicc","version":"1.0.1","description":"One-click Codex environment setup for c-api.cc","main":"cli.js","bin":{"c-apicc":"cli.js"},"keywords":["codex","c-api.cc","cli","setup","openai-compatible"],"repository":{"type":"git","url":"git+https://github.com/sky3100/c-apicc.git"},"homepage":"https://github.com/sky3100/c-apicc#readme","bugs":{"url":"https://github.com/sky3100/c-apicc/issues"},"type":"commonjs","dependencies":{"chalk":"^4.1.2","prompts":"^2.4.2"},"engines":{"node":">=18.0.0"},"license":"AGPL-3.0-or-later","_id":"c-apicc@1.0.1","gitHead":"df5635a80480adcecf023fe33a2147dcf9673a17","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-FeBznF1aUGHh5AJeORQORLnmGp+hxCAe5DBX7tHnwdDXmwwmyU45wcFWNYYjdh6JqQ9BdPRdE47UZriXscPFgA==","shasum":"2317dae314aceb7322f2f81351eee321a9a4127a","tarball":"https://registry.npmjs.org/c-apicc/-/c-apicc-1.0.1.tgz","fileCount":6,"unpackedSize":64126,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6E10lHN64Zk68zQH9E7cmYRRfizoZ5uo0tSoNiYqdvwIgUSqxrZ3u8KxwutvGkMgGD4l2Dzenujcpyl5IeXw8MTw="}]},"_npmUser":{"name":"sky3100","email":"xsky08037@gmail.com"},"directories":{},"maintainers":[{"name":"sky3100","email":"xsky08037@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/c-apicc_1.0.1_1779721920431_0.29079378037961234"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-19T14:59:22.436Z","modified":"2026-05-25T15:12:00.681Z","0.1.4":"2026-05-19T14:59:22.637Z","0.1.5":"2026-05-20T12:18:57.809Z","0.1.6":"2026-05-20T13:02:27.720Z","1.0.1":"2026-05-25T15:12:00.564Z"},"bugs":{"url":"https://github.com/sky3100/c-apicc/issues"},"license":"AGPL-3.0-or-later","homepage":"https://github.com/sky3100/c-apicc#readme","keywords":["codex","c-api.cc","cli","setup","openai-compatible"],"repository":{"type":"git","url":"git+https://github.com/sky3100/c-apicc.git"},"description":"One-click Codex environment setup for c-api.cc","maintainers":[{"name":"sky3100","email":"xsky08037@gmail.com"}],"readme":"# c-api.cc Codex Env Installer\n\n这是一个面向 c-api.cc 的 Codex 环境一键配置工具。\n\n当前 npm 包名：`c-apicc`\n当前命令名：`c-apicc`\n\n## 现在的逻辑\n\n当前版本采用完整的 Codex 配置流程：\n\n1. 检查 Node.js / npm / Codex CLI\n2. 缺失时尝试自动安装 `@openai/codex`\n3. 使用 `/v1/models` 校验 `Base URL + API 密钥`\n4. 直接写 `~/.codex/config.toml`\n5. 直接写 `~/.codex/auth.json`\n6. 覆盖前自动生成 `.bak`\n7. `config.toml` 使用自定义 provider\n8. `auth.json` 写入：\n\n```json\n{\n  \"OPENAI_API_KEY\": \"用户输入的 key\"\n}\n```\n\n## 当前行为\n\n核心参数化有三处：\n\n1. `base_url`\n   - 默认使用 `https://c-api.cc/v1`\n   - 也支持通过 `--base-url` 覆盖\n   - 自动规范成 `.../v1`\n2. `provider`\n   - 默认使用 `c-apicc`\n   - 也支持通过 `--provider` 自定义\n3. `model`\n   - 默认使用 `gpt-5.5`\n   - 普通交互流程不再询问模型\n   - 若未显式指定模型，且默认模型不在 `/v1/models` 返回列表中，会自动切到可用模型\n\n## 生成的 `config.toml` 结构\n\n脚本会写成下面这种结构：\n\n```toml\ncli_auth_credentials_store = \"file\"\nmodel_provider = \"c-apicc\"\nmodel = \"gpt-5.5\"\nmodel_reasoning_effort = \"high\"\ndisable_response_storage = true\npreferred_auth_method = \"apikey\"\n\n[model_providers.c-apicc]\nname = \"c-apicc\"\nbase_url = \"https://c-api.cc/v1\"\nwire_api = \"responses\"\nrequires_openai_auth = true\n\n[features]\napps = false\n```\n\n## 使用方式\n\n```bash\ncd installer/codex-env\nnode cli.js --api-key sk-your-c-api-key\n```\n\n发布到 npm 后可直接这样用：\n\n```bash\nnpx c-apicc --api-key sk-your-c-api-key\n```\n\n如果你没有通过 `--api-key` 传参，CLI 会先打印提示，再让用户自己复制并粘贴 API 密钥。\n\n如需覆盖默认地址：\n\n```bash\nnpx c-apicc --api-key sk-your-c-api-key --base-url https://your-channel.example.com\n```\n\n高级用法：如需覆盖默认模型，可手动指定：\n\n```bash\nnode cli.js \\\n  --api-key sk-your-c-api-key \\\n  --base-url https://your-channel.example.com \\\n  --model gpt-5.5\n```\n\n可选指定 provider 名：\n\n```bash\nnode cli.js \\\n  --api-key sk-your-c-api-key \\\n  --base-url https://your-channel.example.com \\\n  --provider my_c_apicc\n```\n\n可选跳过检查：\n\n```bash\nnode cli.js \\\n  --api-key sk-your-c-api-key \\\n  --base-url https://your-channel.example.com \\\n  --skip-verify \\\n  --skip-install\n```\n\n## 当前定位\n\n这版已经不再只是最小可用版，而是更接近完整分发工具：\n\n1. 当前 `c-api.cc` 渠道对 Codex 是否能直接跑通\n2. `base_url=/v1` 的兼容性是否正常\n3. 用户本地的 Codex 配置是否能被这种方式稳定接管\n4. 用户机器上没装 Codex CLI 时，能否自动兜底安装\n\n如果你后面确认这条路没问题，再往里加：\n\n1. `--restore` 回滚配置\n2. Windows PowerShell 兼容增强\n3. 配置文件合并而非整文件覆盖\n4. 支持更多诊断和联网测试项\n","readmeFilename":"README.zh-CN.md"}