codex-account-orchestrator 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.4.0] - 2026-01-27
9
+
10
+ ### Added
11
+
12
+ - `cao status --pretty` dashboard view (TTY default)
13
+ - `cao status --doctor` and `cao status --report` consolidated flags
14
+
15
+ ### Changed
16
+
17
+ - `cao status` now defaults to a dashboard in TTY and compact output otherwise
18
+ - `cao doctor` and `cao report` are deprecated (status flags preferred)
19
+ - `cao list --details` removed in favor of `cao status`
20
+ - Added Chinese and Spanish README translations
21
+
22
+ ## [1.3.0] - 2026-01-27
23
+
24
+ ### Added
25
+
26
+ - `cao doctor` health checks with JSON output and exit codes
27
+ - `cao report` for Markdown/JSON shareable account summaries
28
+ - Interactive account switching (`cao switch`) and `cao current` convenience command
29
+ - Optional `cao run --gateway` to route traffic through the gateway without CLI fallback
30
+ - `cao status --pretty` for a framed dashboard view
31
+
32
+ ### Changed
33
+
34
+ - README emphasizes CAO’s unique observability and reporting features
35
+ - Added Korean and Japanese README translations
36
+ - Added Chinese and Spanish README translations
37
+
8
38
  ## [1.2.0] - 2026-01-27
9
39
 
10
40
  ### Added
package/README.es.md ADDED
@@ -0,0 +1,162 @@
1
+ # codex-account-orchestrator (CAO)
2
+
3
+ [![CI](https://github.com/DAWNCR0W/codex-account-orchestrator/actions/workflows/ci.yml/badge.svg)](https://github.com/DAWNCR0W/codex-account-orchestrator/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/codex-account-orchestrator.svg)](https://www.npmjs.com/package/codex-account-orchestrator)
5
+ [![npm downloads](https://img.shields.io/npm/dm/codex-account-orchestrator.svg)](https://www.npmjs.com/package/codex-account-orchestrator)
6
+ [![license](https://img.shields.io/npm/l/codex-account-orchestrator.svg)](LICENSE)
7
+ [![node](https://img.shields.io/node/v/codex-account-orchestrator.svg)](https://nodejs.org/)
8
+ [![typescript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
9
+
10
+ Orquestador de cuentas OAuth de Codex. CAO mantiene un `CODEX_HOME` separado por cuenta y cambia automáticamente a la siguiente cuenta cuando se agota la cuota.
11
+
12
+ Language: [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [中文](README.zh.md) | Español
13
+
14
+ ## Por qué CAO
15
+
16
+ - Fallback automático cuando se agota la cuota
17
+ - Modo gateway sin cortar la sesión
18
+ - Resúmenes de estado y health checks
19
+ - Reportes en Markdown o JSON
20
+ - Aislamiento por cuenta
21
+
22
+ ## Requisitos
23
+
24
+ - Node.js 18+
25
+ - Codex CLI instalado y disponible en `PATH`
26
+
27
+ ## Instalación
28
+
29
+ ```bash
30
+ npm install -g codex-account-orchestrator
31
+ ```
32
+
33
+ El CLI está disponible como `cao` o `codex-account-orchestrator`.
34
+
35
+ ## Inicio rápido
36
+
37
+ 1. Agregar cuentas
38
+
39
+ ```bash
40
+ cao add accountA
41
+ cao add accountB
42
+ ```
43
+
44
+ 2. Seleccionar cuenta por defecto
45
+
46
+ ```bash
47
+ cao switch
48
+ ```
49
+
50
+ 3. Ejecutar con fallback
51
+
52
+ ```bash
53
+ cao run
54
+ ```
55
+
56
+ Para pasar argumentos a Codex, colócalos después de `--`:
57
+
58
+ ```bash
59
+ cao run -- exec "summarize README"
60
+ ```
61
+
62
+ ## Comandos principales
63
+
64
+ | Comando | Descripción |
65
+ | --- | --- |
66
+ | `cao add <name>` | Agregar cuenta e iniciar sesión |
67
+ | `cao switch` | Cambio interactivo |
68
+ | `cao current` | Cuenta por defecto actual |
69
+ | `cao list` | Lista rápida de cuentas |
70
+ | `cao status` | Dashboard en TTY o resumen compacto |
71
+ | `cao status --full` | Estado completo (verbose) |
72
+ | `cao status --compact` | Resumen en una línea |
73
+ | `cao status --doctor` | Health checks |
74
+ | `cao status --report [md|json]` | Reporte en Markdown/JSON |
75
+ | `cao run` | Ejecutar con fallback |
76
+ | `cao run --gateway` | Ejecutar vía gateway |
77
+
78
+ ## Observabilidad
79
+
80
+ ```bash
81
+ cao status # Dashboard en TTY, resumen si no
82
+ cao status --full # Salida completa (verbose)
83
+ cao status --compact # Resumen en una línea
84
+ cao status --pretty # Forzar dashboard
85
+ ```
86
+
87
+ Health checks (0=ok, 1=warn, 2=error):
88
+
89
+ ```bash
90
+ cao status --doctor
91
+ cao status --doctor --json
92
+ ```
93
+
94
+ Reportes:
95
+
96
+ ```bash
97
+ cao status --report # Reporte Markdown
98
+ cao status --report json # Reporte JSON
99
+ ```
100
+
101
+ ## Modo Gateway (sin cortar sesión)
102
+
103
+ Iniciar gateway:
104
+
105
+ ```bash
106
+ cao gateway start
107
+ ```
108
+
109
+ Ejecutar vía gateway (fallback del CLI desactivado):
110
+
111
+ ```bash
112
+ cao run --gateway
113
+ ```
114
+
115
+ ## Cómo funciona
116
+
117
+ Cada cuenta vive en su propio directorio:
118
+
119
+ ```text
120
+ ~/.codex-account-orchestrator/<account>/
121
+ ```
122
+
123
+ Se crea un `config.toml` por cuenta:
124
+
125
+ ```toml
126
+ cli_auth_credentials_store = "file"
127
+ forced_login_method = "chatgpt"
128
+ ```
129
+
130
+ ## Estructura de datos
131
+
132
+ ```text
133
+ ~/.codex-account-orchestrator/
134
+ registry.json
135
+ account_status.json
136
+ <account>/auth.json
137
+ <account>/config.toml
138
+ ```
139
+
140
+ ## Importar snapshots (opcional)
141
+
142
+ ```bash
143
+ cao import codex-auth
144
+ cao import codex-auth --source ~/.codex/accounts
145
+ cao import codex-auth --overwrite
146
+ ```
147
+
148
+ ## Desarrollo
149
+
150
+ ```bash
151
+ npm install
152
+ npm run test
153
+ ```
154
+
155
+ ## Notas
156
+
157
+ - El fallback captura salida y puede hacer que Codex detecte un stdout no TTY. Usa `--no-fallback` si necesitas TTY puro.
158
+ - El detector de cuota es por palabras clave y se puede ampliar en `src/constants.ts`.
159
+
160
+ ## Changelog
161
+
162
+ Consulta `CHANGELOG.md`.
package/README.ja.md ADDED
@@ -0,0 +1,157 @@
1
+ # codex-account-orchestrator (CAO)
2
+
3
+ [![CI](https://github.com/DAWNCR0W/codex-account-orchestrator/actions/workflows/ci.yml/badge.svg)](https://github.com/DAWNCR0W/codex-account-orchestrator/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/codex-account-orchestrator.svg)](https://www.npmjs.com/package/codex-account-orchestrator)
5
+ [![npm downloads](https://img.shields.io/npm/dm/codex-account-orchestrator.svg)](https://www.npmjs.com/package/codex-account-orchestrator)
6
+ [![license](https://img.shields.io/npm/l/codex-account-orchestrator.svg)](LICENSE)
7
+ [![node](https://img.shields.io/node/v/codex-account-orchestrator.svg)](https://nodejs.org/)
8
+ [![typescript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
9
+
10
+ Codex OAuth アカウントのオーケストレーター。CAO はアカウントごとに `CODEX_HOME` を分離し、クォータ消費時に自動で次のアカウントへ切り替えます。
11
+
12
+ Language: [English](README.md) | [한국어](README.ko.md) | 日本語 | [中文](README.zh.md) | [Español](README.es.md)
13
+
14
+ ## CAO の特徴
15
+
16
+ - クォータ枯渇時の自動フォールバック
17
+ - セッションを切らさないゲートウェイモード
18
+ - 状態サマリーとヘルスチェック
19
+ - 共有可能なレポート出力
20
+ - アカウントごとの完全分離
21
+
22
+ ## 必要条件
23
+
24
+ - Node.js 18+
25
+ - Codex CLI が PATH にあること
26
+
27
+ ## インストール
28
+
29
+ ```bash
30
+ npm install -g codex-account-orchestrator
31
+ ```
32
+
33
+ CLI は `cao` または `codex-account-orchestrator` で実行できます。
34
+
35
+ ## クイックスタート
36
+
37
+ 1. アカウント追加
38
+
39
+ ```bash
40
+ cao add accountA
41
+ cao add accountB
42
+ ```
43
+
44
+ 2. デフォルト切り替え
45
+
46
+ ```bash
47
+ cao switch
48
+ ```
49
+
50
+ 3. フォールバック実行
51
+
52
+ ```bash
53
+ cao run
54
+ ```
55
+
56
+ Codex 引数は `--` の後に渡します:
57
+
58
+ ```bash
59
+ cao run -- exec "summarize README"
60
+ ```
61
+
62
+ ## 主要コマンド
63
+
64
+ | コマンド | 説明 |
65
+ | --- | --- |
66
+ | `cao add <name>` | アカウント追加とログイン |
67
+ | `cao switch` | 対話式で切り替え |
68
+ | `cao current` | 現在のデフォルトを表示 |
69
+ | `cao list` | アカウント一覧 (簡易) |
70
+ | `cao status` | ステータスダッシュボード (TTY) または簡易サマリー |
71
+ | `cao status --full` | 詳細フル出力 |
72
+ | `cao status --compact` | 1 行サマリー |
73
+ | `cao status --doctor` | ヘルスチェック |
74
+ | `cao status --report [md|json]` | レポート出力 |
75
+ | `cao run` | フォールバック実行 |
76
+ | `cao run --gateway` | ゲートウェイ経由 |
77
+
78
+ ## 可視化
79
+
80
+ ```bash
81
+ cao status # TTYならダッシュボード、それ以外はサマリー
82
+ cao status --full # 詳細フル出力
83
+ cao status --compact # 1 行サマリー
84
+ cao status --pretty # ダッシュボード強制
85
+ ```
86
+
87
+ ヘルスチェック (0=ok, 1=warn, 2=error):
88
+
89
+ ```bash
90
+ cao status --doctor
91
+ cao status --doctor --json
92
+ ```
93
+
94
+ レポート:
95
+
96
+ ```bash
97
+ cao status --report # Markdown レポート
98
+ cao status --report json # JSON レポート
99
+ ```
100
+
101
+ ## ゲートウェイモード
102
+
103
+ ゲートウェイはセッションを維持したまま切り替えます。
104
+
105
+ ```bash
106
+ cao gateway start
107
+ cao run --gateway
108
+ ```
109
+
110
+ ## 仕組み
111
+
112
+ アカウントごとのディレクトリ:
113
+
114
+ ```text
115
+ ~/.codex-account-orchestrator/<account>/
116
+ ```
117
+
118
+ `config.toml` は各アカウントごとに作成されます:
119
+
120
+ ```toml
121
+ cli_auth_credentials_store = "file"
122
+ forced_login_method = "chatgpt"
123
+ ```
124
+
125
+ ## データ配置
126
+
127
+ ```text
128
+ ~/.codex-account-orchestrator/
129
+ registry.json
130
+ account_status.json
131
+ <account>/auth.json
132
+ <account>/config.toml
133
+ ```
134
+
135
+ ## スナップショット取り込み (任意)
136
+
137
+ ```bash
138
+ cao import codex-auth
139
+ cao import codex-auth --source ~/.codex/accounts
140
+ cao import codex-auth --overwrite
141
+ ```
142
+
143
+ ## 開発
144
+
145
+ ```bash
146
+ npm install
147
+ npm run test
148
+ ```
149
+
150
+ ## ノート
151
+
152
+ - フォールバックは出力をキャプチャするため、TTY ではないと見なされる場合があります。必要なら `--no-fallback` を使ってください。
153
+ - クォータ検出はキーワードベースで、`src/constants.ts` で拡張できます。
154
+
155
+ ## 変更履歴
156
+
157
+ `CHANGELOG.md` を参照してください。
package/README.ko.md ADDED
@@ -0,0 +1,157 @@
1
+ # codex-account-orchestrator (CAO)
2
+
3
+ [![CI](https://github.com/DAWNCR0W/codex-account-orchestrator/actions/workflows/ci.yml/badge.svg)](https://github.com/DAWNCR0W/codex-account-orchestrator/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/codex-account-orchestrator.svg)](https://www.npmjs.com/package/codex-account-orchestrator)
5
+ [![npm downloads](https://img.shields.io/npm/dm/codex-account-orchestrator.svg)](https://www.npmjs.com/package/codex-account-orchestrator)
6
+ [![license](https://img.shields.io/npm/l/codex-account-orchestrator.svg)](LICENSE)
7
+ [![node](https://img.shields.io/node/v/codex-account-orchestrator.svg)](https://nodejs.org/)
8
+ [![typescript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
9
+
10
+ Codex OAuth 계정 오케스트레이터. CAO는 계정마다 별도의 `CODEX_HOME`을 만들고, 쿼터가 소진되면 자동으로 다음 계정으로 전환합니다.
11
+
12
+ Language: [English](README.md) | 한국어 | [日本語](README.ja.md) | [中文](README.zh.md) | [Español](README.es.md)
13
+
14
+ ## CAO의 강점
15
+
16
+ - 쿼터 소진 시 자동 폴백
17
+ - 세션이 끊기지 않는 게이트웨이 모드
18
+ - 상태 요약과 헬스체크
19
+ - 공유 가능한 보고서 출력
20
+ - 계정별 완전 격리
21
+
22
+ ## 요구 사항
23
+
24
+ - Node.js 18+
25
+ - Codex CLI 설치 및 PATH 등록
26
+
27
+ ## 설치
28
+
29
+ ```bash
30
+ npm install -g codex-account-orchestrator
31
+ ```
32
+
33
+ CLI는 `cao` 또는 `codex-account-orchestrator`로 실행합니다.
34
+
35
+ ## 빠른 시작
36
+
37
+ 1. 계정 추가
38
+
39
+ ```bash
40
+ cao add accountA
41
+ cao add accountB
42
+ ```
43
+
44
+ 2. 기본 계정 선택
45
+
46
+ ```bash
47
+ cao switch
48
+ ```
49
+
50
+ 3. 폴백 실행
51
+
52
+ ```bash
53
+ cao run
54
+ ```
55
+
56
+ Codex 인자를 넘길 때는 `--` 뒤에 넣습니다:
57
+
58
+ ```bash
59
+ cao run -- exec "summarize README"
60
+ ```
61
+
62
+ ## 주요 명령어
63
+
64
+ | 명령어 | 설명 |
65
+ | --- | --- |
66
+ | `cao add <name>` | 계정 추가 및 로그인 |
67
+ | `cao switch` | 대화형 계정 전환 |
68
+ | `cao current` | 현재 기본 계정 표시 |
69
+ | `cao list` | 계정 목록 (간단) |
70
+ | `cao status` | 상태 대시보드 (TTY) 또는 간단 요약 |
71
+ | `cao status --full` | 상세 전체 출력 |
72
+ | `cao status --compact` | 한 줄 요약 |
73
+ | `cao status --doctor` | 헬스체크 및 종료 코드 |
74
+ | `cao status --report [md|json]` | 보고서 생성 |
75
+ | `cao run` | 폴백 실행 |
76
+ | `cao run --gateway` | 게이트웨이 경유 |
77
+
78
+ ## 관측성
79
+
80
+ ```bash
81
+ cao status # TTY에서는 대시보드, 그 외에는 요약
82
+ cao status --full # 상세 전체 출력
83
+ cao status --compact # 한 줄 요약
84
+ cao status --pretty # 대시보드 강제
85
+ ```
86
+
87
+ 헬스체크 (0=ok, 1=warn, 2=error):
88
+
89
+ ```bash
90
+ cao status --doctor
91
+ cao status --doctor --json
92
+ ```
93
+
94
+ 보고서:
95
+
96
+ ```bash
97
+ cao status --report # Markdown 보고서
98
+ cao status --report json # JSON 보고서
99
+ ```
100
+
101
+ ## 게이트웨이 모드
102
+
103
+ 게이트웨이는 세션을 유지한 채 계정을 전환합니다.
104
+
105
+ ```bash
106
+ cao gateway start
107
+ cao run --gateway
108
+ ```
109
+
110
+ ## 동작 방식
111
+
112
+ 계정별 디렉터리 구조:
113
+
114
+ ```text
115
+ ~/.codex-account-orchestrator/<account>/
116
+ ```
117
+
118
+ `config.toml`은 계정마다 생성됩니다:
119
+
120
+ ```toml
121
+ cli_auth_credentials_store = "file"
122
+ forced_login_method = "chatgpt"
123
+ ```
124
+
125
+ ## 데이터 레이아웃
126
+
127
+ ```text
128
+ ~/.codex-account-orchestrator/
129
+ registry.json
130
+ account_status.json
131
+ <account>/auth.json
132
+ <account>/config.toml
133
+ ```
134
+
135
+ ## 스냅샷 가져오기 (선택)
136
+
137
+ ```bash
138
+ cao import codex-auth
139
+ cao import codex-auth --source ~/.codex/accounts
140
+ cao import codex-auth --overwrite
141
+ ```
142
+
143
+ ## 개발
144
+
145
+ ```bash
146
+ npm install
147
+ npm run test
148
+ ```
149
+
150
+ ## 참고
151
+
152
+ - 폴백 모드는 출력 캡처로 인해 TTY가 아닌 것처럼 보일 수 있습니다. 순수 TTY가 필요하면 `--no-fallback`을 사용하세요.
153
+ - 쿼터 감지는 키워드 기반이며 `src/constants.ts`에서 확장할 수 있습니다.
154
+
155
+ ## 변경 이력
156
+
157
+ `CHANGELOG.md`를 참고하세요.