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

supercc

v0.1.1

Published

One-click Codex environment setup for NewAPI-compatible channels

Readme

NewAPI Codex Env Installer

这是一个面向 NewAPI 兼容渠道的 Codex 环境一键配置工具。

当前 npm 包名:supercc 当前命令名:supercc

现在的逻辑

当前版本采用完整的 Codex 配置流程:

  1. 检查 Node.js / npm / Codex CLI
  2. 缺失时尝试自动安装 @openai/codex
  3. 使用 /v1/models 校验 Base URL + API Key
  4. 直接写 ~/.codex/config.toml
  5. 直接写 ~/.codex/auth.json
  6. 覆盖前自动生成 .bak
  7. config.toml 使用自定义 provider
  8. auth.json 写入:
{
  "OPENAI_API_KEY": "用户输入的 key"
}

当前行为

核心参数化有三处:

  1. base_url
    • 使用用户输入的 Base URL
    • 自动规范成 .../v1
  2. provider
    • 默认使用 supercc
    • 也支持通过 --provider 自定义
  3. model
    • 默认使用 gpt-5.4
    • 若未显式指定模型,且默认模型不在 /v1/models 返回列表中,会自动切到可用模型

生成的 config.toml 结构

脚本会写成下面这种结构:

cli_auth_credentials_store = "file"
model_provider = "newapi"
model = "gpt-5.4"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.supercc]
name = "supercc"
base_url = "https://your-newapi.example.com/v1"
wire_api = "responses"
requires_openai_auth = true

[features]
apps = false

使用方式

cd installer/codex-env
node cli.js \
  --api-key sk-your-newapi-key \
  --base-url https://your-newapi.example.com

发布到 npm 后可直接这样用:

npx supercc --api-key sk-your-newapi-key --base-url https://your-newapi.example.com

可选指定模型:

node cli.js \
  --api-key sk-your-newapi-key \
  --base-url https://your-newapi.example.com \
  --model gpt-5.4

可选指定 provider 名:

node cli.js \
  --api-key sk-your-newapi-key \
  --base-url https://your-newapi.example.com \
  --provider my_newapi

可选跳过检查:

node cli.js \
  --api-key sk-your-newapi-key \
  --base-url https://your-newapi.example.com \
  --skip-verify \
  --skip-install

当前定位

这版已经不再只是最小可用版,而是更接近完整分发工具:

  1. 当前 newapi 渠道对 Codex 是否能直接跑通
  2. base_url=/v1 的兼容性是否正常
  3. 用户本地的 Codex 配置是否能被这种方式稳定接管
  4. 用户机器上没装 Codex CLI 时,能否自动兜底安装

如果你后面确认这条路没问题,再往里加:

  1. --restore 回滚配置
  2. Windows PowerShell 兼容增强
  3. 配置文件合并而非整文件覆盖
  4. 支持更多诊断和联网测试项