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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wecode

v1.3.6

Published

WeCode Codex CLI 自动配置工具

Readme

WeCode Codex CLI 配置工具

自动配置 WeCode Codex CLI 环境的 NPX 工具。

功能特性

  • ✅ 跨平台支持(macOS / Linux / Windows)
  • ✅ 自动安装 Codex CLI
  • ✅ 自动生成 Codex 配置文件
  • ✅ 跨平台环境变量配置(自动检测 shell 类型)
  • ✅ 交互式命令行界面
  • ✅ 支持线路快速切换(无需重新配置)

使用前提

  • 需要预先安装 Node.js (>= 12.0.0) 和 npm

使用方法

通过 npx 运行(推荐)

无需安装,直接运行:

# 交互式配置(显示主菜单)
npx wecode

# 快速配置(直接传入 API Key,使用默认线路)
npx wecode cr_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

全局安装

npm install -g wecode
wecode

# 快速配置
wecode cr_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

主菜单

运行后会显示主菜单,包含以下选项:

1. 首次配置(完整配置流程)

完整的初始化配置流程:

  1. 选择线路(默认线路 / 中国线路)
    • 默认线路: api.wecode.zone
    • 中国线路: apix.wecode.zone
  2. 输入 WeCode API Key(格式:cr_ 开头,67 字符)
  3. 自动安装 Codex CLI(如未安装)
  4. 生成配置文件到 ~/.codex/
  5. 配置环境变量 CRS_OAI_KEY

2. 修改线路(仅更改 API 线路)

快速切换 API 线路,无需重新输入 API Key 或重装 CLI:

  • 选择新的线路
  • 自动更新 ~/.codex/config.toml 中的 base_url
  • 保留其他所有配置

3. 清除配置(删除所有配置)

删除 ~/.codex/ 目录下的所有配置文件:

  • config.toml
  • auth.json
  • auth.toml

支持的 Shell

  • bash
  • zsh
  • fish
  • 其他(通用 .profile)

License

MIT