Skip to content

Commit 62edb7b

Browse files
author
Codex
committed
Harden Windows service Codex home handling
1 parent 726294f commit 62edb7b

23 files changed

Lines changed: 89 additions & 52 deletions

File tree

README.ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
7777
- **OAuth, API 키, 또는 ChatGPT forward.** xAI / Anthropic / Kimi 계정으로 로그인하거나(토큰은
7878
자동 갱신됩니다), `codex login`을 forward 하거나, 키를 붙여넣으세요(`${ENV_VARS}` 지원). 18개 프로바이더의
7979
API 키 카탈로그(**Ollama Cloud** 포함)가 기본 내장되어 있습니다.
80-
- **Codex에 바로 통합.** `~/.codex/config.toml``[model_providers.opencodex]` 테이블을 주입하고
80+
- **Codex에 바로 통합.** `$CODEX_HOME/config.toml`(기본값 `~/.codex/config.toml`)`[model_providers.opencodex]` 테이블을 주입하고
8181
라우팅된 모델을 Codex의 카탈로그와 서브에이전트 선택기에 병합합니다 — 완전히 되돌릴 수 있습니다.
8282
- **Sidecar.** OpenAI가 아닌 모델에도 ChatGPT 로그인을 통한 `gpt-5.4-mini`를 사용해 실제 **웹 검색**
8383
**이미지 이해** 기능을 제공합니다.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
8787
- **OAuth, API key, or ChatGPT forward.** Log in with your xAI / Anthropic / Kimi account (tokens
8888
auto-refresh), forward your `codex login`, or paste a key (`${ENV_VARS}` supported). An 18-provider
8989
API-key catalog (incl. **Ollama Cloud**) is built in.
90-
- **Drops into Codex.** Injects a `[model_providers.opencodex]` table into `~/.codex/config.toml` and
91-
merges routed models into Codex's catalog and subagent picker — fully reversible.
90+
- **Drops into Codex.** Injects a `[model_providers.opencodex]` table into
91+
`$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) and merges routed models into Codex's
92+
catalog and subagent picker — fully reversible.
9293
- **Sidecars.** Give non-OpenAI models real **web search** and **image understanding** via a
9394
`gpt-5.4-mini` over your ChatGPT login.
9495
- **Web dashboard** for providers, OAuth login, model selection, and request logs.

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
7777
- **OAuth、API key 或 ChatGPT 转发(forward)。** 用你的 xAI / Anthropic / Kimi 账户登录(token
7878
自动刷新)、转发你的 `codex login`,或直接粘贴一个 key(支持 `${ENV_VARS}`)。内置一份 18 家 provider 的
7979
API-key 目录(含 **Ollama Cloud**)。
80-
- **无缝接入 Codex。**`~/.codex/config.toml` 注入一个 `[model_providers.opencodex]` 表,并
80+
- **无缝接入 Codex。**`$CODEX_HOME/config.toml`(默认 `~/.codex/config.toml`注入一个 `[model_providers.opencodex]` 表,并
8181
将已路由的模型合并进 Codex 的目录和 subagent 选择器 —— 完全可逆。
8282
- **Sidecars。** 通过基于你 ChatGPT 登录的 `gpt-5.4-mini`,为非 OpenAI 模型提供真正的**网页搜索****图像理解**能力。
8383
- **Web 仪表盘**,用于管理 provider、OAuth 登录、模型选择和请求日志。

docs-site/src/content/docs/getting-started/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sends your traffic anywhere except the provider you configure.
1111
| Requirement | Why |
1212
| --- | --- |
1313
| **[Bun](https://bun.sh) ≥ 1.1** (recommended) or **Node ≥ 20** | `ocx` runs on the Bun runtime; the service runner invokes `bun`. |
14-
| **[OpenAI Codex](https://openai.com/codex)** (CLI, App, or SDK) | The client opencodex sits in front of. opencodex writes to `~/.codex/config.toml`. |
14+
| **[OpenAI Codex](https://openai.com/codex)** (CLI, App, or SDK) | The client opencodex sits in front of. opencodex writes to `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`). |
1515
| A provider account or API key | Anthropic, xAI, Kimi, Ollama Cloud, OpenRouter, an OpenAI-compatible endpoint, or your ChatGPT login. |
1616

1717
## Install
@@ -55,7 +55,7 @@ cd gui && bun install && bun dev
5555
| `~/.opencodex/ocx.pid` | PID of the running proxy (single-instance guard). |
5656
| `~/.opencodex/auth.json` | Stored OAuth credentials (when you `ocx login`). |
5757
| `~/.opencodex/catalog-backup.json` | Pristine Codex model catalog, backed up before any edit. |
58-
| `~/.codex/config.toml` | opencodex appends a `[model_providers.opencodex]` table here on `ocx init`. |
58+
| `$CODEX_HOME/config.toml` | opencodex appends a `[model_providers.opencodex]` table here on `ocx init` (defaults to `~/.codex/config.toml`). |
5959

6060
:::note
6161
opencodex never deletes your Codex config. Every injection is reversible — `ocx stop`, `ocx restore`,

docs-site/src/content/docs/getting-started/quickstart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ ocx init
1919
3. **Default model** — the model used when a request doesn't match another provider.
2020
4. **Proxy port** — defaults to `10100`.
2121
5. **Inject into Codex?** — when you accept, opencodex writes the `[model_providers.opencodex]` table
22-
into `~/.codex/config.toml` and sets `model_provider = "opencodex"` so Codex routes through the proxy.
22+
into `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) and sets
23+
`model_provider = "opencodex"` so Codex routes through the proxy.
2324

2425
The result is saved to `~/.opencodex/config.json`.
2526

docs-site/src/content/docs/guides/codex-integration.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ description: How opencodex injects itself into Codex, syncs the model catalog, d
44
---
55

66
opencodex makes Codex route through the proxy by editing two things Codex reads: its config
7-
(`~/.codex/config.toml`) and its model catalog. Every edit is idempotent and reversible.
7+
(`$CODEX_HOME/config.toml`, default `~/.codex/config.toml`) and its model catalog. Every edit is
8+
idempotent and reversible.
89

910
## Config injection
1011

@@ -21,7 +22,7 @@ base_url = "http://localhost:10100/v1"
2122
wire_api = "responses"
2223
```
2324

24-
It also writes an optional profile at `~/.codex/opencodex.config.toml` so you can opt in explicitly:
25+
It also writes an optional profile at `$CODEX_HOME/opencodex.config.toml` so you can opt in explicitly:
2526

2627
```bash
2728
codex --profile opencodex ""
@@ -35,8 +36,8 @@ duplicate copies before re-writing — so re-running `ocx init` / `ocx sync` nev
3536

3637
## Model catalog sync
3738

38-
Codex shows models from an on-disk catalog (`~/.codex/opencodex-catalog.json` by default). On start
39-
and on `ocx sync`, opencodex:
39+
Codex shows models from an on-disk catalog (`$CODEX_HOME/opencodex-catalog.json` by default). On
40+
start and on `ocx sync`, opencodex:
4041

4142
1. **Backs up** the pristine catalog once to `~/.opencodex/catalog-backup.json` (so featuring is
4243
reversible).

docs-site/src/content/docs/index.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ Codex CLI / App / SDK ──/v1/responses──▶ opencodex ──▶ Any provi
4444
login, or paste an API key. Keys can be `${ENV_VARS}`.
4545
</Card>
4646
<Card title="Drops into Codex" icon="rocket">
47-
`ocx init` injects a provider into `~/.codex/config.toml` and merges routed models into Codex's
48-
catalog and subagent picker. `ocx stop` restores native Codex cleanly.
47+
`ocx init` injects a provider into `$CODEX_HOME/config.toml` (default
48+
`~/.codex/config.toml`) and merges routed models into Codex's catalog and subagent picker.
49+
`ocx stop` restores native Codex cleanly.
4950
</Card>
5051
<Card title="Sidecars" icon="magnifier">
5152
Give non-OpenAI models real **web search** and **image understanding** by routing those

docs-site/src/content/docs/ko/getting-started/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ opencodex는 단일 CLI인 `ocx`로 제공됩니다. 작은 로컬 HTTP 서버(B
1111
| 요구 사항 | 이유 |
1212
| --- | --- |
1313
| **[Bun](https://bun.sh) ≥ 1.1**(권장) 또는 **Node ≥ 20** | `ocx`는 Bun 런타임에서 실행되며, 서비스 러너가 `bun`을 호출합니다. |
14-
| **[OpenAI Codex](https://openai.com/codex)**(CLI, App, 또는 SDK) | opencodex가 앞단에 위치하는 클라이언트입니다. opencodex는 `~/.codex/config.toml`에 기록합니다. |
14+
| **[OpenAI Codex](https://openai.com/codex)**(CLI, App, 또는 SDK) | opencodex가 앞단에 위치하는 클라이언트입니다. opencodex는 `$CODEX_HOME/config.toml`(기본값 `~/.codex/config.toml`)에 기록합니다. |
1515
| 프로바이더 계정 또는 API 키 | Anthropic, xAI, Kimi, Ollama Cloud, OpenRouter, OpenAI 호환 엔드포인트, 또는 ChatGPT 로그인. |
1616

1717
## 설치
@@ -55,7 +55,7 @@ cd gui && bun install && bun dev
5555
| `~/.opencodex/ocx.pid` | 실행 중인 프록시의 PID(단일 인스턴스 가드). |
5656
| `~/.opencodex/auth.json` | 저장된 OAuth 자격 증명(`ocx login` 시). |
5757
| `~/.opencodex/catalog-backup.json` | 변경 전에 백업해 둔 원본 Codex 모델 카탈로그. |
58-
| `~/.codex/config.toml` | opencodex가 `ocx init` 시 여기에 `[model_providers.opencodex]` 테이블을 추가합니다. |
58+
| `$CODEX_HOME/config.toml` | opencodex가 `ocx init` 시 여기에 `[model_providers.opencodex]` 테이블을 추가합니다(기본값 `~/.codex/config.toml`). |
5959

6060
:::note
6161
opencodex는 절대 Codex 설정을 삭제하지 않습니다. 모든 주입은 되돌릴 수 있습니다 — `ocx stop`, `ocx restore`,

docs-site/src/content/docs/ko/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ocx init
1919
3. **기본 모델** — 요청이 다른 프로바이더와 매칭되지 않을 때 사용되는 모델입니다.
2020
4. **프록시 포트** — 기본값은 `10100`입니다.
2121
5. **Codex에 주입할까요?** — 동의하면 opencodex가 `[model_providers.opencodex]` 테이블을
22-
`~/.codex/config.toml`에 기록하고, `model_provider = "opencodex"`로 설정해 Codex가 프록시를 통해 라우팅하도록 합니다.
22+
`$CODEX_HOME/config.toml`(기본값 `~/.codex/config.toml`)에 기록하고, `model_provider = "opencodex"`로 설정해 Codex가 프록시를 통해 라우팅하도록 합니다.
2323

2424
결과는 `~/.opencodex/config.json`에 저장됩니다.
2525

docs-site/src/content/docs/ko/guides/codex-integration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Codex 통합
33
description: opencodex가 Codex에 자신을 주입하고, 모델 카탈로그를 동기화하고, 서브에이전트 선택기를 구동하며, 깔끔하게 복원하는 방식.
44
---
55

6-
opencodex는 Codex가 읽는 두 가지, 즉 설정(`~/.codex/config.toml`)과 모델 카탈로그를 편집하여 Codex가
6+
opencodex는 Codex가 읽는 두 가지, 즉 설정(`$CODEX_HOME/config.toml`, 기본값 `~/.codex/config.toml`)과 모델 카탈로그를 편집하여 Codex가
77
프록시를 경유하도록 만듭니다. 모든 편집은 멱등적이며 되돌릴 수 있습니다.
88

99
## 설정 주입
@@ -21,7 +21,7 @@ base_url = "http://localhost:10100/v1"
2121
wire_api = "responses"
2222
```
2323

24-
또한 `~/.codex/opencodex.config.toml`에 선택적 프로파일을 작성하여 명시적으로 옵트인할 수 있게 합니다:
24+
또한 `$CODEX_HOME/opencodex.config.toml`에 선택적 프로파일을 작성하여 명시적으로 옵트인할 수 있게 합니다:
2525

2626
```bash
2727
codex --profile opencodex ""
@@ -35,7 +35,7 @@ codex --profile opencodex "…"
3535

3636
## 모델 카탈로그 동기화
3737

38-
Codex는 디스크의 카탈로그(기본값 `~/.codex/opencodex-catalog.json`)에 있는 모델을 표시합니다. 시작 시와
38+
Codex는 디스크의 카탈로그(기본값 `$CODEX_HOME/opencodex-catalog.json`)에 있는 모델을 표시합니다. 시작 시와
3939
`ocx sync` 시, opencodex는:
4040

4141
1. 원본 카탈로그를 `~/.opencodex/catalog-backup.json`에 한 번 **백업**합니다(featuring을 되돌릴 수 있도록).

0 commit comments

Comments
 (0)