Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oc-chatgpt-multi-auth",
"name": "oc-codex-multi-auth",
"version": "5.4.9",
"description": "Install and operate oc-chatgpt-multi-auth for OpenCode with ChatGPT Plus/Pro OAuth, GPT-5 and Codex model presets, and multi-account failover.",
"description": "Install and operate oc-codex-multi-auth for OpenCode with Codex-first GPT-5 workflows, ChatGPT Plus/Pro OAuth, and multi-account failover.",
"skills": "./skills/"
}
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ npm run lint # eslint
## NOTES
- OAuth callback: `http://127.0.0.1:1455/auth/callback`.
- ChatGPT backend requires `store: false`, include `reasoning.encrypted_content`.
- Per-project accounts: `~/.opencode/projects/<project-key>/openai-codex-accounts.json` (walks up to find project root).
- Global accounts: `~/.opencode/openai-codex-accounts.json`.
- Per-project accounts: `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` (walks up to find project root).
- Global accounts: `~/.opencode/oc-codex-multi-auth-accounts.json`.
- Prompt templates synced from Codex CLI GitHub releases with ETag caching.
- 5xx server errors trigger account rotation and health penalty (same as network errors).
- API deprecation/sunset headers (RFC 8594) are logged as warnings.
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

all notable changes to this project. dates are ISO format (YYYY-MM-DD).

## [unreleased]
## [6.0.0] - 2026-04-06

### added

Expand All @@ -12,19 +12,23 @@ all notable changes to this project. dates are ISO format (YYYY-MM-DD).
- **backup/import safety controls**: `codex-export` now supports auto timestamped backup paths; `codex-import` adds `dryRun` preview and automatic pre-import backup on apply.
- **beginner safe mode config**: new `beginnerSafeMode` config key and `CODEX_AUTH_BEGINNER_SAFE_MODE` env override for conservative retry behavior.
- **startup preflight summary**: one-time startup health summary with recommended next action.
- **breaking rebrand migration**: current runtime storage now uses package-aligned files (`oc-codex-multi-auth-accounts.json`, `oc-codex-multi-auth-flagged-accounts.json`) with automatic migration from legacy package-era and pre-package storage names on first load.

### changed

- **account storage schema**: V3 account metadata now includes optional `accountTags` and `accountNote`.
- **docs refresh for operational flows**: README + docs portal/development guides updated to reflect beginner commands, safe mode, interactive picker behavior, and backup/import safeguards.
- **repository presentation refresh**: rewrote the README as a landing page, added a public FAQ and code of conduct, refreshed package metadata, and removed stale CI/test claims from public docs surfaces.
- **test matrix expansion**: coverage now includes beginner UI helpers, safe-fix diagnostics edge cases, tag/note command behavior, and timestamped backup/import preview utilities.
- **package line renamed**: the supported package, repo, plugin entry, installer surface, and docs now use `oc-codex-multi-auth` instead of `oc-chatgpt-multi-auth`.
- **codex-first auth wording**: OAuth options, installer guidance, and onboarding docs now describe the Codex-first flow directly instead of the older MULTI-branded labels.

### fixed

- **non-interactive command guidance**: optional-index commands provide explicit usage guidance when interactive menus are unavailable.
- **doctor safe-fix edge path**: `codex-doctor fix` now reports a clear non-crashing message when no eligible account is available for auto-switch.
- **first-time import flow**: `codex-import` no longer fails with `No accounts to export` when storage is empty; pre-import backup is skipped cleanly in zero-account setups.
- **installer cache hygiene**: the installer now removes both the old and new package names from OpenCode cache metadata so cutover installs do not stay pinned to stale artifacts.

## [5.4.8] - 2026-03-24

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thank you for contributing to `oc-chatgpt-multi-auth`.
Thank you for contributing to `oc-codex-multi-auth`.

This project accepts improvements that make the OpenCode plugin clearer, safer, easier to maintain, and more useful for personal development workflows.

Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# oc-chatgpt-multi-auth
# oc-codex-multi-auth

[![npm version](https://img.shields.io/npm/v/oc-chatgpt-multi-auth.svg)](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
[![npm downloads](https://img.shields.io/npm/dw/oc-chatgpt-multi-auth.svg)](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
[![npm version](https://img.shields.io/npm/v/oc-codex-multi-auth.svg)](https://www.npmjs.com/package/oc-codex-multi-auth)
[![npm downloads](https://img.shields.io/npm/dw/oc-codex-multi-auth.svg)](https://www.npmjs.com/package/oc-codex-multi-auth)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/Codex model presets, and multi-account failover.

`oc-chatgpt-multi-auth` is an OpenCode plugin for developers who want ChatGPT-backed GPT-5 and Codex workflows in OpenCode without switching to separate Platform API credentials for personal use. It uses the same official OAuth flow as the Codex CLI, adds model templates for current GPT-5 families, and can rotate across multiple ChatGPT accounts when one account is rate-limited or unavailable.
`oc-codex-multi-auth` is an OpenCode plugin for developers who want Codex-first GPT-5 workflows in OpenCode without switching to separate Platform API credentials for personal use. It uses the same official OAuth flow as the Codex CLI, adds model templates for current GPT-5 families, and can rotate across multiple ChatGPT accounts when one account is rate-limited or unavailable.

## What This Project Does

Expand All @@ -19,7 +19,7 @@ Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/C

```bash
# 1. Install or refresh the plugin config
npx -y oc-chatgpt-multi-auth@latest
npx -y oc-codex-multi-auth@latest

# 2. Sign in with ChatGPT Plus/Pro
opencode auth login
Expand All @@ -32,7 +32,7 @@ What the installer does:

- writes `~/.config/opencode/opencode.json`
- backs up an existing config before changing it
- normalizes the plugin entry to `"oc-chatgpt-multi-auth"`
- normalizes the plugin entry to `"oc-codex-multi-auth"`
- clears the cached plugin copy so OpenCode reinstalls the latest package

By default, the installer now writes a full catalog config that includes both:
Expand Down Expand Up @@ -103,7 +103,7 @@ Use the quick-start path above for the fastest setup. For full setup, local deve
If you prefer the compact variant-only config on OpenCode `v1.0.210+`, use:

```bash
npx -y oc-chatgpt-multi-auth@latest --modern
npx -y oc-codex-multi-auth@latest --modern
```

## Configuration
Expand All @@ -125,7 +125,16 @@ Start here if the plugin does not load or authenticate correctly:

Common first checks:

- confirm `"plugin": ["oc-chatgpt-multi-auth"]` is present in your OpenCode config
- confirm `"plugin": ["oc-codex-multi-auth"]` is present in your OpenCode config

## 6.0.0 Cutover

This release intentionally breaks the old package line and moves the runtime to package-aligned storage names.

- Rename the GitHub repository to `ndycode/oc-codex-multi-auth`
- Publish `oc-codex-multi-auth@6.0.0`
- Deprecate `oc-chatgpt-multi-auth` on npm with a pointer to the new package
- Verify docs, badges, repo links, and OpenCode config examples all resolve to `oc-codex-multi-auth`
- rerun `opencode auth login`
- inspect `~/.opencode/logs/codex-plugin/` after running one request with `ENABLE_PLUGIN_REQUEST_LOGGING=1`

Expand Down
8 changes: 4 additions & 4 deletions assets/readme-hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion config/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration

This directory contains the official OpenCode config templates for the ChatGPT Codex OAuth plugin.
This directory contains the official OpenCode config templates for `oc-codex-multi-auth`.

## Required: choose the right config file

Expand Down
2 changes: 1 addition & 1 deletion config/minimal-opencode.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["oc-chatgpt-multi-auth"],
"plugin": ["oc-codex-multi-auth"],

"provider": {
"openai": {
Expand Down
2 changes: 1 addition & 1 deletion config/opencode-legacy.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"oc-chatgpt-multi-auth"
"oc-codex-multi-auth"
],
"provider": {
"openai": {
Expand Down
2 changes: 1 addition & 1 deletion config/opencode-modern.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"oc-chatgpt-multi-auth"
"oc-codex-multi-auth"
],
"provider": {
"openai": {
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
theme: jekyll-theme-hacker
title: oc-chatgpt-multi-auth
title: oc-codex-multi-auth
description: Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login and GPT-5/Codex presets
show_downloads: true
12 changes: 6 additions & 6 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration Reference

Complete reference for configuring `oc-chatgpt-multi-auth`. Most of this is optional; the defaults work for most people.
Complete reference for configuring `oc-codex-multi-auth`. Most of this is optional; the defaults work for most people.

---

Expand All @@ -9,7 +9,7 @@ Complete reference for configuring `oc-chatgpt-multi-auth`. Most of this is opti
```json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["oc-chatgpt-multi-auth"],
"plugin": ["oc-codex-multi-auth"],
"provider": {
"openai": {
"options": {
Expand Down Expand Up @@ -256,7 +256,7 @@ same settings for all models:

```json
{
"plugin": ["oc-chatgpt-multi-auth"],
"plugin": ["oc-codex-multi-auth"],
"provider": {
"openai": {
"options": {
Expand Down Expand Up @@ -303,7 +303,7 @@ model options override global options.
global (`~/.config/opencode/opencode.json`):
```json
{
"plugin": ["oc-chatgpt-multi-auth"],
"plugin": ["oc-codex-multi-auth"],
"provider": {
"openai": {
"options": { "reasoningEffort": "medium" }
Expand Down Expand Up @@ -335,8 +335,8 @@ result: project uses `high`, other projects use `medium`.
| `<project>/.opencode.json` | project-specific config |
| `~/.opencode/openai-codex-auth-config.json` | plugin config |
| `~/.opencode/auth/openai.json` | oauth tokens |
| `~/.opencode/openai-codex-accounts.json` | global account storage |
| `~/.opencode/projects/<project-key>/openai-codex-accounts.json` | per-project account storage |
| `~/.opencode/oc-codex-multi-auth-accounts.json` | global account storage |
| `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` | per-project account storage |
| `~/.opencode/backups/codex-backup-YYYYMMDD-HHMMSSmmm-<hex>.json` | timestamped export backup (global storage mode) |
| `~/.opencode/projects/<project-key>/backups/codex-backup-YYYYMMDD-HHMMSSmmm-<hex>.json` | timestamped export backup (per-project storage mode) |
| `.../backups/codex-pre-import-backup-YYYYMMDD-HHMMSSmmm-<hex>.json` | automatic snapshot created before non-dry-run imports when existing accounts are present |
Expand Down
4 changes: 2 additions & 2 deletions docs/development/CONFIG_FIELDS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Config Fields

This document summarizes the current config fields that matter for `oc-chatgpt-multi-auth`.
This document summarizes the current config fields that matter for `oc-codex-multi-auth`.

## Top-Level Fields

Expand All @@ -10,7 +10,7 @@ Use the plain package name in OpenCode config:

```json
{
"plugin": ["oc-chatgpt-multi-auth"]
"plugin": ["oc-codex-multi-auth"]
}
```

Expand Down
14 changes: 7 additions & 7 deletions docs/development/CONFIG_FLOW.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenCode Config Flow

This document describes the current config surfaces used by `oc-chatgpt-multi-auth` on `main`.
This document describes the current config surfaces used by `oc-codex-multi-auth` on `main`.

## Primary Config Surfaces

Expand Down Expand Up @@ -45,17 +45,17 @@ That file controls plugin behavior such as retry policy, beginner safe mode, fal

## Installer Flow

`scripts/install-opencode-codex-auth.js` performs these steps:
`scripts/install-oc-codex-multi-auth.js` performs these steps:

1. Load the selected template set (`full` by default, `config/opencode-modern.json` with `--modern`, `config/opencode-legacy.json` with `--legacy`).
2. Back up an existing `~/.config/opencode/opencode.json`.
3. Normalize the plugin list so it ends with plain `oc-chatgpt-multi-auth`.
3. Normalize the plugin list so it ends with plain `oc-codex-multi-auth`.
4. Replace `provider.openai` with the selected shipped template block.
5. Clear the cached OpenCode plugin copy under `~/.cache/opencode/`.

Important detail:

- The installer intentionally writes the plugin entry as `oc-chatgpt-multi-auth`, not `oc-chatgpt-multi-auth@latest`.
- The installer intentionally writes the plugin entry as `oc-codex-multi-auth`, not `oc-codex-multi-auth@latest`.
- The default `full` install mode merges the modern base-model template with the explicit legacy preset entries so users can access `--variant` workflows and still see the full shipped preset catalog directly.

## Shipped Template Structure
Expand Down Expand Up @@ -86,7 +86,7 @@ Example shape:

```json
{
"plugin": ["oc-chatgpt-multi-auth"],
"plugin": ["oc-codex-multi-auth"],
"provider": {
"openai": {
"options": {
Expand Down Expand Up @@ -170,8 +170,8 @@ Important runtime behavior:
| `<project>/.opencode.json` | project-local OpenCode override |
| `~/.opencode/openai-codex-auth-config.json` | plugin runtime config |
| `~/.opencode/auth/openai.json` | OAuth token storage |
| `~/.opencode/openai-codex-accounts.json` | global account storage |
| `~/.opencode/projects/<project-key>/openai-codex-accounts.json` | per-project account storage |
| `~/.opencode/oc-codex-multi-auth-accounts.json` | global account storage |
| `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` | per-project account storage |
| `~/.opencode/logs/codex-plugin/` | plugin request/debug logs |

## See Also
Expand Down
8 changes: 4 additions & 4 deletions docs/development/TESTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Testing Guide

This guide describes the current validation surface for `oc-chatgpt-multi-auth` on `main`.
This guide describes the current validation surface for `oc-codex-multi-auth` on `main`.

## Release-Grade Commands

Expand Down Expand Up @@ -46,7 +46,7 @@ When documentation changes touch setup or config guidance, verify the docs again

1. Confirm commands exist in `index.ts`.
2. Confirm config examples match `config/opencode-modern.json`, `config/opencode-legacy.json`, and `config/minimal-opencode.json`.
3. Confirm install/update guidance matches `scripts/install-opencode-codex-auth.js`.
3. Confirm install/update guidance matches `scripts/install-oc-codex-multi-auth.js`.
4. Confirm repo scripts listed in docs still exist in `package.json`.

Useful commands:
Expand All @@ -63,14 +63,14 @@ Use these when a change affects setup, auth flow, or account operations.
### Install + config smoke

```bash
npx -y oc-chatgpt-multi-auth@latest --dry-run
npx -y oc-codex-multi-auth@latest --dry-run
opencode debug config
```

Verify:

- the global config path is `~/.config/opencode/opencode.json`
- the plugin entry resolves to `oc-chatgpt-multi-auth`
- the plugin entry resolves to `oc-codex-multi-auth`
- the selected template contributes the expected `provider.openai` block

### Model surface smoke
Expand Down
2 changes: 1 addition & 1 deletion docs/development/TUI_PARITY_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TUI Parity Checklist (Codex Multi-Auth)

Use this checklist to keep `oc-chatgpt-multi-auth` aligned with the Antigravity-style auth TUI pattern, while preserving Codex-specific logic and storage behavior.
Use this checklist to keep `oc-codex-multi-auth` aligned with the Antigravity-style auth TUI pattern, while preserving Codex-specific logic and storage behavior.

## Scope

Expand Down
4 changes: 2 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What is this project?

`oc-chatgpt-multi-auth` is an OpenCode plugin that lets you sign in with ChatGPT Plus/Pro through OAuth and use GPT-5/Codex model presets from OpenCode.
`oc-codex-multi-auth` is an OpenCode plugin that lets you sign in with ChatGPT Plus/Pro through OAuth and use GPT-5/Codex model presets from OpenCode.

## Who is it for?

Expand Down Expand Up @@ -41,4 +41,4 @@ Start with [Troubleshooting](troubleshooting.md), rerun `opencode auth login`, a

## I used the old package name. What changed?

The package was renamed from `opencode-openai-codex-auth-multi` to `oc-chatgpt-multi-auth`. If you still reference the old name in your OpenCode config, replace it with `oc-chatgpt-multi-auth`.
The package was renamed from `opencode-openai-codex-auth-multi` to `oc-chatgpt-multi-auth`, and now from `oc-chatgpt-multi-auth` to `oc-codex-multi-auth`. If you still reference either older name in your OpenCode config, replace it with `oc-codex-multi-auth`.
Loading