Skip to content

Chinese Guide

github-actions[bot] edited this page Jul 14, 2026 · 3 revisions

中文指南

英文 Wiki 是 codex-switch 的主文档与行为依据。本页提供中文快速入口,不单独维护第二套实现说明。

codex-switch 用于管理本机多个 OpenAI Codex CLI 登录、查看额度,并在新会话前选择合适账号。它会操作 Codex 的文件型认证,因此请勿分享 profile、auth.json、Token、代理凭据或未经脱敏的 debug 输出。

快速开始

Codex 必须使用 file credential store。在 $CODEX_HOME/config.toml(通常是 ~/.codex/config.toml)中确认:

cli_auth_credentials_store = "file"

macOS / Linux 安装正式版:

curl -fsSL https://github.com/xjoker/codex-switch/releases/latest/download/install.sh | bash

如果未传 --system,脚本却显示 Installing to /usr/local/bin (requires sudo),说明运行的是旧 master 分支中的已淘汰脚本,请终止并改用上面的 Release 地址。当前脚本默认安装到 ~/.local/bin;只有清理 /usr/local/bin 中由 root 持有的旧二进制时,才会请求一次 sudo

Windows PowerShell 安装正式版:

irm https://github.com/xjoker/codex-switch/releases/latest/download/install.ps1 | iex

添加账号并打开界面:

codex-switch login
codex-switch tui

无浏览器服务器使用 codex-switch login --device

参与开发版测试

开发版属于滚动 prerelease 通道。安装、验证、回退和问题反馈步骤见 Testing development releases,其中附有中文摘要。

常用入口

命令行为以已安装版本的 codex-switch <命令> --help 为最终依据。

反馈问题

提交 Issue 时请附操作系统、终端、codex-switch --version、完整命令、预期结果、实际结果与最小复现步骤。分享 debug 输出前必须删除 Token、邮箱、account ID、工作区名称、可识别身份的路径和代理凭据。

提交 GitHub Issue

Next steps

Clone this wiki locally