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

ustc1234

v0.1.0

Published

Configure Codex API key and base URL while preserving the local provider

Readme

ustc1234

ustc1234 是一个 Codex 配置小工具,用来更新本机 Codex 的 API Key 和 Base URL。

它不会修改 provider 名称。工具会读取 ~/.codex/config.toml 中已有的 model_provider,并只更新这个 provider 对应配置里的 base_url

使用

npx ustc1234

按提示输入:

  • API Key
  • Base URL

也可以直接传参:

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

如果传入的是根地址,工具会自动规范到 /v1

https://api.example.com -> https://api.example.com/v1

可选参数

npx ustc1234 --api-key sk-your-key --base-url https://api.example.com --skip-verify
  • --skip-verify:跳过 /v1/models 校验
  • --dry-run:只展示将写入的信息,不修改文件
  • --restore:从 .bak 备份恢复 config.tomlauth.json
  • --help:显示帮助

写入内容

工具会更新:

  • ~/.codex/config.toml:只更新当前本地 provider section 里的 base_url
  • ~/.codex/auth.json:写入 OPENAI_API_KEY

覆盖前会创建 .bak 备份文件。

如需回滚:

npx ustc1234 --restore

重要说明

ustc1234 不提供 --provider 参数,也不会把 provider 改成包名。它始终保留用户本机已有的 model_provider