Skip to content

Codex Credentials Extension

将当前 chatgpt.com 浏览器会话导出为 Codex CLI 可用的 auth.json 的 Chrome 扩展。 A Chrome extension that exports the current chatgpt.com browser session as a Codex CLI compatible auth.json.

Install: git clone https://github.com/liuzan678/codex-credentials-extension

Works with Codex · 25 GitHub stars

Install

$git clone https://github.com/liuzan678/codex-credentials-extension

Install command taken from the project's README or registry entry. Always review code before running it.

中文 | English

Codex 凭据导出器 / Codex Credentials Exporter

一个用于从浏览器当前 chatgpt.com 登录态中提取 OAuth access_token、生成 Codex CLI auth.json 并复制到剪贴板的 Chrome 扩展,跳过 Codex 登录阶段的手机号校验。

A Chrome extension that extracts the OAuth access_token from the current chatgpt.com browser session, generates a Codex CLI auth.json, and copies it to the clipboard,skipping the phone number verification during the Codex login process.


中文简介

功能特性

  • 跳过 Codex 登录阶段的手机号校验
  • 从当前浏览器登录态读取 chatgpt.com/api/auth/session
  • 自动提取 access_token
  • 生成可用于 Codex CLI 的 auth.json
  • 一键复制到剪贴板
  • 在弹窗中预览生成结果
  • 显示账号、套餐和过期时间等信息

截图

1. 安装扩展

2. 扩展弹窗界面

3. 生成并复制 auth.json

安装方法

  1. 克隆或下载本仓库
  2. 打开 Chrome / Edge 浏览器,进入扩展管理页面:
    • Chrome: chrome://extensions/
    • Edge: edge://extensions/
  3. 打开右上角的“开发者模式”
  4. 点击“加载已解压的扩展程序”
  5. 选择本仓库目录

使用方法

  1. 先在浏览器中登录 https://chatgpt.com
  2. 点击浏览器工具栏中的扩展图标
  3. 点击 “抓取并复制 auth.json”
  4. 扩展会读取当前会话并生成 auth.json
  5. 将复制到剪贴板的内容粘贴到:
~/.codex/auth.json

注意事项

  • auth.json 包含敏感凭据,请勿泄露给他人
  • 当前生成结果不包含 refresh_token
  • 当 access_token 过期后,需要重新在扩展中执行一次导出
  • 使用前请确保当前浏览器中的 chatgpt.com 登录状态有效

联系方式

一起交流与学习,请联系:liu_zan@aliyun.com

License

本项目采用 Apache License 2.0,详见 LICENSE。


English

Features

  • Skip phone number verification during Codex login
  • Reads the current chatgpt.com/api/auth/session browser session
  • Extracts the OAuth access_token
  • Generates a Codex CLI compatible auth.json
  • Copies the result to the clipboard with one click
  • Shows a preview inside the extension popup
  • Displays account, plan, and expiration details

Screenshots

1. Install the extension

2. Extension popup

3. Generated auth.json result

Installation

  1. Clone or download this repository
  2. Open the browser extension management page:
    • Chrome: chrome://extensions/
    • Edge: edge://extensions/
  3. Enable Developer mode
  4. Click Load unpacked
  5. Select this repository folder

Usage

  1. Sign in to https://chatgpt.com in your browser
  2. Click the extension icon in the browser toolbar
  3. Click “抓取并复制 auth.json”
  4. The extension will read the current session and generate auth.json
  5. Paste the copied content into:
~/.codex/auth.json

Notes

  • The generated auth.json contains sensitive credentials; do not share it
  • The output does not include a refresh_token
  • After the access_token expires, run the export again from the extension
  • Make sure your chatgpt.com session is valid before using the extension

Contact

For further discussion and learning, please contact: liu_zan@aliyun.com

License

This project is licensed under the Apache License 2.0. See LICENSE for details.

Similar plugs

All parts of Claude Code's system prompt, 27 builtin tool descriptions, sub agent prompts (Plan/Explore/Task), utility prompts (CLAUDE.md, compact, statusline, magic docs…

Python-powered shell. Full-featured, cross-platform and AI-friendly.

PluginDev tools+6 this week

Run Claude Code 100% on-device with local AI on Apple Silicon. MLX-native Anthropic-API server. 6 fighters incl. Muse-Glimmer 30B (now multimodal, reads images, abliterated)…

Open source AI terminal for cloud and infrastructure management, enabling you to deploy, troubleshoot, and automate services using natural language and intelligent agents.

Explore related