Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Session Launcher

macOS utility that synchronizes a logged-in ChatGPT session from Google Chrome into Codex's auth.json, then launches the official ChatGPT desktop app.

What It Does

  • Reuses a locally cached session when possible.
  • Starts Chrome automatically when a browser refresh is needed.
  • Reads /api/auth/session from a temporary chatgpt.com tab.
  • Closes the temporary tab after synchronization.
  • Writes ~/.codex/auth.json atomically with restrictive permissions.
  • Opens the official ChatGPT.app through LaunchServices.

This is an independent community utility, not an official OpenAI product.

Requirements

  • macOS
  • Google Chrome with an existing chatgpt.com login
  • The official ChatGPT desktop app
  • Chrome: View > Developer > Allow JavaScript from Apple Events

Install

Download the latest Codex-Auto-Login-macOS.zip from Releases, unzip it, and move Codex Session Launcher.app to /Applications or ~/Applications. On first launch, allow the app to control Google Chrome, then add it to the Dock.

The app first tries the cached session token. If it is missing or expired, it starts Chrome, opens a temporary ChatGPT tab, synchronizes the session, closes that tab, and updates Codex authentication.

Build

./build.sh

The build creates a self-contained app and outputs/Codex-Auto-Login-macOS.zip. The app is ad-hoc signed for local use; distributing through a notarized Developer ID package requires the distributor's Apple Developer account.

Configuration

Optional overrides can be placed in ~/.config/codex-session-sync/config:

CODEX_HOME="$HOME/.codex"
CODEX_SESSION_TOKEN_FILE="$HOME/.codex/chatgpt-session-token"
CHROME_APP_PATH="/Applications/Google Chrome.app"

Privacy and Security

Session conversion and file writes happen locally. The app has no telemetry or project-owned upload service. When a cached login needs refreshing, it makes the required direct request to chatgpt.com; see PRIVACY.md for the exact data flow.

The app stores a browser session token locally with mode 600. Treat it as sensitive. Never commit ~/.codex/auth.json, the session-token file, cookies, or a copy of an already-used app bundle. The repository contains only source code, build metadata, and a clean release artifact.

About

macOS Codex 自动登录工具:从 Chrome 同步 ChatGPT 登录态,自动生成 Codex auth.json 并启动官方 ChatGPT 应用

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages