codex-webapp 0.1.6 → 0.1.8
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/ACKNOWLEDGEMENTS.md +11 -37
- package/README.ja.md +56 -101
- package/README.md +64 -103
- package/docs/architecture.md +85 -0
- package/docs/clean-release-verification.md +95 -0
- package/docs/codex-app-install.md +5 -0
- package/docs/distribution-boundary.md +37 -0
- package/docs/i18n/README.ko.md +11 -65
- package/docs/i18n/README.zh-CN.md +11 -65
- package/package.json +9 -2
- package/scripts/check-public-package-boundary.mjs +248 -0
- package/scripts/verify-clean-release.mjs +492 -0
- package/src/appServerBridge.js +150 -0
- package/src/appServerMessageCodec.js +12 -0
- package/src/auditEvidenceHook.js +18 -0
- package/src/bridgeEventEnvelope.js +29 -0
- package/src/browserPreload.js +176 -0
- package/src/browserSmoke.js +2 -2
- package/src/codexAppRenderer.js +12 -0
- package/src/codexWeb.js +7 -14
- package/src/commands.js +40 -33
- package/src/electronBridge.js +324 -0
- package/src/localServer.js +184 -0
- package/src/projectionManifest.js +8 -0
- package/src/rendererAssetSource.js +278 -0
- package/docs/assets/codex-webapp-readme.png +0 -0
package/ACKNOWLEDGEMENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Acknowledgements
|
|
2
2
|
|
|
3
|
-
Codex WebApp is an unofficial companion package for OpenAI
|
|
4
|
-
|
|
3
|
+
Codex WebApp is an unofficial companion package for OpenAI Codex
|
|
4
|
+
`remote-control`. It is not affiliated with or endorsed by OpenAI.
|
|
5
5
|
|
|
6
6
|
## OpenAI Codex
|
|
7
7
|
|
|
@@ -12,41 +12,15 @@ and `codex remote-control`.
|
|
|
12
12
|
- Codex App Server documentation:
|
|
13
13
|
https://github.com/openai/codex/tree/main/codex-rs/app-server
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
The remote-Codex and mobile-agent ecosystem is moving quickly. The following
|
|
18
|
-
projects are useful adjacent references for users and maintainers evaluating the
|
|
19
|
-
space:
|
|
20
|
-
|
|
21
|
-
- codex-web by 0xcaff: https://github.com/0xcaff/codex-web
|
|
22
|
-
- RemCodex: https://remcodex.com/
|
|
23
|
-
- Taskdex: https://www.taskdex.app/
|
|
24
|
-
- Taskdex GitHub: https://github.com/DhruvalGolakiya/taskdex
|
|
25
|
-
- Remodex: https://github.com/Emanuele-web04/remodex
|
|
26
|
-
- codexUI: https://github.com/friuns2/codexui
|
|
27
|
-
- FlyDex: https://flydex.net/
|
|
28
|
-
- The Companion: https://docs.thecompanion.sh/
|
|
29
|
-
- MobileCLI: https://www.mobilecli.app/
|
|
30
|
-
- RemoteVibeCode: https://remotevibecode.com/
|
|
31
|
-
- Nitori Codex Webview:
|
|
32
|
-
https://marketplace.visualstudio.com/items?itemName=Kaisei-Yasuzaki.nitori-codex-webview
|
|
33
|
-
|
|
34
|
-
Listing a project here is acknowledgement of prior art or adjacency, not a
|
|
35
|
-
claim that this package includes that project's code.
|
|
36
|
-
|
|
37
|
-
## codex-web
|
|
38
|
-
|
|
39
|
-
`0xcaff/codex-web` is a particularly important reference point for this package.
|
|
40
|
-
Its README describes a browser frontend for Codex Desktop running on a machine
|
|
41
|
-
the user controls, with a deliberately thin wrapper so upstream Codex changes can
|
|
42
|
-
be integrated quickly.
|
|
15
|
+
## Code Provenance
|
|
43
16
|
|
|
44
|
-
Codex WebApp
|
|
45
|
-
|
|
46
|
-
|
|
17
|
+
Codex WebApp ships its own local browser surface, install checks, safety guard,
|
|
18
|
+
and smoke-test workflow. It is intended as a clean public package for Codex App
|
|
19
|
+
users who want a local-first browser entry point.
|
|
47
20
|
|
|
48
|
-
##
|
|
21
|
+
## Related Work
|
|
49
22
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
23
|
+
The 0xcaff/codex-web project helped clarify the value of keeping the browser
|
|
24
|
+
surface close to the installed Codex renderer instead of rebuilding a separate
|
|
25
|
+
chat UI. Codex WebApp does not vendor, bundle, or depend on that project at
|
|
26
|
+
runtime.
|
package/README.ja.md
CHANGED
|
@@ -6,51 +6,34 @@
|
|
|
6
6
|
|
|
7
7
|
[English](./README.md) / 日本語 / [한국어](./docs/i18n/README.ko.md) / [简体中文](./docs/i18n/README.zh-CN.md)
|
|
8
8
|
|
|
9
|
-
**Codex WebApp は、Codex
|
|
9
|
+
**Codex WebApp は、Codex App ユーザー向けの非公式・ローカルファーストな renderer bridge です。** インストール済み Codex App の `/Applications/Codex.app/Contents/Resources/app.asar` から `webview/` だけを `~/.cache/codex-webapp/` へ抽出し、その renderer を `127.0.0.1` で配信し、最後に smoke test まで行えるようにします。
|
|
10
10
|
|
|
11
|
-
Codex
|
|
12
|
-
|
|
13
|
-

|
|
14
|
-
|
|
15
|
-
## なぜ作ったか
|
|
16
|
-
|
|
17
|
-
Codex は、ターミナルだけで完結するツールから、よりアプリらしい操作体験へ広がりつつあります。開発者としては Codex を自分のマシンで動かしつつ、ブラウザ、タブレット、スマホ、あるいは Codex App から自然に操作したいはずです。この package の目的は Codex CLI を置き換えることではありません。目的は、**「remote-control が来たらしい」** から **「ローカルのブラウザUIが起動し、表示確認まで通った」** までを最短にすることです。
|
|
18
|
-
|
|
19
|
-
| 欲しい体験 | Codex WebApp が用意するもの |
|
|
20
|
-
| --- | --- |
|
|
21
|
-
| ターミナルに慣れていなくても始めたい | Codex App に貼るだけで進められるセットアップ用プロンプト。 |
|
|
22
|
-
| 起動前に環境を確認したい | `doctor` による Codex CLI、version、`remote-control` の確認。 |
|
|
23
|
-
| 安全な既定値で使いたい | デフォルトは `127.0.0.1`。非 loopback host は明示的に許可しない限り拒否。 |
|
|
24
|
-
| 動いた証拠が欲しい | `smoke` によるURL確認と、必要に応じたブラウザ screenshot。 |
|
|
25
|
-
| 何を起動しているか把握したい | 小さな wrapper と、固定された `codex-web` runtime reference。 |
|
|
26
|
-
|
|
27
|
-
> **非公式だが、丁寧に扱うための companion です。** Codex WebApp は OpenAI の公式プロダクトではなく、OpenAI から承認・推奨されたものでもありません。ローカル制御を前提にし、telemetry、analytics、browser extension、project-operated phone-home path を含まない形を目指しています。
|
|
11
|
+

|
|
28
12
|
|
|
29
13
|
## Codex App から始める
|
|
30
14
|
|
|
31
|
-
Codex App
|
|
15
|
+
Codex App に次を貼ってください。
|
|
32
16
|
|
|
33
17
|
```text
|
|
34
18
|
Codex WebApp をこのPCで起動してください。
|
|
35
19
|
|
|
36
|
-
これは
|
|
37
|
-
token、cookie、private repository の中身、顧客データ、内部URL
|
|
38
|
-
`.env` や `SECRET`、`KEY`、`TOKEN` を含むterminal出力は、AIにもissueにも貼らないでください。
|
|
20
|
+
これは Codex App ユーザー向けの非公式ローカル renderer bridge です。
|
|
21
|
+
token、cookie、private repository の中身、顧客データ、内部URL、`.env`、SECRET、KEY、TOKEN を含む内容は表示しないでください。
|
|
39
22
|
|
|
40
23
|
次の順番で進めてください。
|
|
41
24
|
|
|
42
|
-
1.
|
|
43
|
-
2. `npx -y codex-webapp@latest doctor`
|
|
44
|
-
3.
|
|
45
|
-
4. `npx -y codex-webapp@latest start --dry-run`
|
|
46
|
-
5. 問題なければ `npx -y codex-webapp@latest start`
|
|
47
|
-
6.
|
|
48
|
-
7.
|
|
25
|
+
1. `node -v`、`npm -v`、`npx -v` を確認してください。
|
|
26
|
+
2. `npx -y codex-webapp@latest doctor` を実行してください。
|
|
27
|
+
3. doctor が失敗した場合は、start に進まず原因と直し方を説明してください。
|
|
28
|
+
4. `npx -y codex-webapp@latest start --dry-run` を実行してください。
|
|
29
|
+
5. 問題なければ `npx -y codex-webapp@latest start` を実行してください。
|
|
30
|
+
6. 起動できたら `http://127.0.0.1:8214/` をブラウザで開くように案内してください。
|
|
31
|
+
7. terminal window を閉じるとWeb画面は止まること、PC再起動後はもう一度 start が必要なことも説明してください。
|
|
49
32
|
|
|
50
|
-
|
|
33
|
+
スマホや外出先PCから使う場合は、raw UI server を public IP へ直接公開せず、Tailscale、Cloudflare Access、または同等の信頼できるアクセス境界を使ってください。
|
|
51
34
|
```
|
|
52
35
|
|
|
53
|
-
|
|
36
|
+
実際にはおおむね次を実行します。
|
|
54
37
|
|
|
55
38
|
```bash
|
|
56
39
|
npx -y codex-webapp@latest doctor
|
|
@@ -58,51 +41,27 @@ npx -y codex-webapp@latest start --dry-run
|
|
|
58
41
|
npx -y codex-webapp@latest start
|
|
59
42
|
```
|
|
60
43
|
|
|
61
|
-
`npx` は、npm に公開されている package を一時的に実行する仕組みです。試すだけなら、この repository を clone したり、手元で新しい project を作ったりする必要はありません。READMEでは、常に公開済みの最新パッチを使うため `codex-webapp@latest` を指定しています。
|
|
62
|
-
|
|
63
|
-
> **秘密情報はユーザー側でも確認してください。** Codexには秘密情報を出さないよう指示していますが、AIへの指示だけで安全が保証されるわけではありません。terminal output、`.env`、error log、issue本文を貼る前に、`SECRET`、`KEY`、`TOKEN`、cookie、顧客名、private URL が含まれていないか必ず見てください。
|
|
64
|
-
|
|
65
|
-
## 起動中だけ使える、という基本
|
|
66
|
-
|
|
67
|
-
Codex WebApp はクラウド上に常駐するサービスではありません。あなたのPC上で `npx -y codex-webapp@latest start` が動いている間だけ、ブラウザUIが使えます。
|
|
68
|
-
|
|
69
|
-
大事なポイントは、**PCを再起動すると、このプロセスは自動では戻らない**ということです。昨日使えていても、今日PCを再起動した後は、もう一度 `npx -y codex-webapp@latest start` を実行する必要があります。
|
|
70
|
-
|
|
71
|
-
| できごと | 何が起きるか | どうすればよいか |
|
|
72
|
-
| --- | --- | --- |
|
|
73
|
-
| terminal window を閉じた | Web画面は止まります。 | もう一度 `npx -y codex-webapp@latest start` を実行します。 |
|
|
74
|
-
| 起動中のUIを止めたい | terminal上のプロセスを止めます。 | 起動しているterminalで `Ctrl+C` を押してください。 |
|
|
75
|
-
| PCをスリープした | 復帰後に動く場合もありますが、接続が切れることがあります。 | 開けない場合は起動し直してください。 |
|
|
76
|
-
| PCを再起動した | プロセスは残りません。昨日のWeb画面はもう動いていません。 | 再起動後にもう一度 `npx -y codex-webapp@latest start` を実行してください。 |
|
|
77
|
-
| 別のPCやスマホから開きたい | `127.0.0.1` は「このPC自身」を指すため、そのままでは別端末から開けません。 | Tailscale、Cloudflare Access、または同等の安全なアクセス境界を用意してください。 |
|
|
78
|
-
|
|
79
|
-
まずは同じPCのブラウザで `http://127.0.0.1:8214/` を開けるところまでを確認してください。スマホや外出先PCからの利用は、その次の段階です。認証なしのport-forwardingやpublic tunnelでraw UI serverを公開すると、意図しない第三者にあなたのPC上のCodex操作面を見せる危険があります。
|
|
80
|
-
|
|
81
|
-
毎日使う場合は、PC起動時に自動で `npx -y codex-webapp@latest start` を実行する設定を検討できます。これは「PCを再起動しても、毎回自分でstartし直さなくてよい」ようにするための設定です。ただし、初回セットアップではなく常用者向けです。まず手動起動で `doctor`、`start`、ブラウザ表示、止め方、アクセス境界を確認してから、macOS の Login Items、`launchd`、または自分が管理できるプロセスマネージャーで設定してください。自動起動する場合も、raw UI server を認証なしで外へ出さないでください。
|
|
82
|
-
|
|
83
44
|
## ターミナルから始める
|
|
84
45
|
|
|
85
|
-
自分でコマンドを実行したい場合は、次の順番で進めてください。Codex WebApp には **Node.js 20 以上** と **Codex CLI 0.130.0 以上** が必要です。
|
|
86
|
-
|
|
87
46
|
```bash
|
|
88
47
|
npx -y codex-webapp doctor
|
|
89
48
|
npx -y codex-webapp start --dry-run
|
|
90
49
|
npx -y codex-webapp start
|
|
91
50
|
```
|
|
92
51
|
|
|
93
|
-
|
|
52
|
+
起動したら開きます。
|
|
94
53
|
|
|
95
54
|
```text
|
|
96
55
|
http://127.0.0.1:8214/
|
|
97
56
|
```
|
|
98
57
|
|
|
99
|
-
|
|
58
|
+
表示確認:
|
|
100
59
|
|
|
101
60
|
```bash
|
|
102
61
|
npx -y codex-webapp smoke --url http://127.0.0.1:8214/
|
|
103
62
|
```
|
|
104
63
|
|
|
105
|
-
|
|
64
|
+
screenshot 証跡:
|
|
106
65
|
|
|
107
66
|
```bash
|
|
108
67
|
npx -y codex-webapp smoke \
|
|
@@ -111,48 +70,53 @@ npx -y codex-webapp smoke \
|
|
|
111
70
|
--screenshot artifacts/codex-webapp.png
|
|
112
71
|
```
|
|
113
72
|
|
|
114
|
-
##
|
|
73
|
+
## 何を起動するか
|
|
115
74
|
|
|
116
|
-
|
|
75
|
+
`codex-webapp start` は、この package に同梱されているローカル renderer bridge を起動します。bridge は、このMacにインストール済みの Codex App から webview を準備し、抽出済み renderer を `~/.cache/codex-webapp/` にcacheし、cache header付きで静的配信します。別runtimeを同梱せず、hosted service でもなく、phone-home もしません。
|
|
117
76
|
|
|
118
|
-
|
|
119
|
-
| --- | --- | --- |
|
|
120
|
-
| `doctor` | Codex CLI、version、`remote-control` の利用可否を確認します。 | 準備完了の要約、または更新が必要な箇所の説明。 |
|
|
121
|
-
| `start --dry-run` | 実際には起動せず、起動予定の内容を表示します。 | ローカルURLと内部で実行する `npx` command。 |
|
|
122
|
-
| `start` | 確認後にローカルのブラウザUIを起動します。 | `http://127.0.0.1:8214/` で動くUI。 |
|
|
123
|
-
| `start --yes` | 対話確認なしで起動します。 | script や自動化されたローカル検証に便利。 |
|
|
124
|
-
| `smoke` | UI URL に到達でき、期待する内容があるかを確認します。 | 速い pass/fail 結果。 |
|
|
125
|
-
| `smoke --browser --screenshot ...` | headless browser でUIを開き、証跡を保存します。 | debug や support に使える screenshot。 |
|
|
77
|
+
この package は adapter であり、Codex App 本体ではありません。Codex/OpenAI binaries、`app.asar`、抽出済み `webview/`、token、cookie、signed URL、private session database、private repository contents、customer data は同梱しません。実行時にユーザーのローカル Codex App を読み、`webview/` だけをユーザーのローカル cache に抽出して、そのローカルコピーを配信します。
|
|
126
78
|
|
|
127
|
-
|
|
79
|
+
| コマンド | 目的 |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `doctor` | Codex CLI、version、`remote-control` の利用可否を確認します。 |
|
|
82
|
+
| `start --dry-run` | 実際には起動せず、予定URLを表示します。 |
|
|
83
|
+
| `start` | インストール済み Codex App renderer を準備して配信します。 |
|
|
84
|
+
| `start --yes` | 対話確認なしで起動します。 |
|
|
85
|
+
| `smoke` | UI URLが応答し、期待する文字列を含むか確認します。 |
|
|
86
|
+
| `smoke --browser --screenshot ...` | browserで開いて証跡を保存します。 |
|
|
128
87
|
|
|
129
|
-
|
|
130
|
-
github:0xcaff/codex-web#585613f5a3a355af5aefc388ca4e31b07a472cda
|
|
131
|
-
```
|
|
88
|
+
adapter boundary の開発者向け概要は [Architecture](./docs/architecture.md) を参照してください。
|
|
132
89
|
|
|
133
|
-
##
|
|
90
|
+
## 安全性
|
|
134
91
|
|
|
135
|
-
|
|
92
|
+
URLに到達できる人は、そのhost上の Codex を操作できる可能性があります。そのため Codex WebApp はデフォルトで `127.0.0.1` に bind し、非 loopback host は `--allow-non-loopback` を明示しない限り拒否します。
|
|
136
93
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
| issue で相談する | token、cookie、private repository、customer data、internal URL は必ず redact してください。 |
|
|
94
|
+
raw UI server を public IP に直接公開しないでください。スマホや別PCから使う場合は、Tailscale、Cloudflare Access、WireGuard、SSH tunneling、または同等の信頼できるアクセス境界を先に置いてください。
|
|
95
|
+
|
|
96
|
+
Codex WebApp は telemetry、analytics、browser extension、project-operated phone-home path を含みません。
|
|
97
|
+
|
|
98
|
+
## 起動中だけ使える
|
|
143
99
|
|
|
144
|
-
Codex WebApp
|
|
100
|
+
Codex WebApp はクラウドサービスではありません。`npx -y codex-webapp start` がこのPCで動いている間だけ、ブラウザUIを使えます。
|
|
101
|
+
|
|
102
|
+
| できごと | 何が起きるか | どうするか |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| terminal window を閉じた | UIは止まります。 | もう一度 `npx -y codex-webapp start` を実行します。 |
|
|
105
|
+
| PCをスリープした | 接続が切れることがあります。 | 開けない場合は起動し直します。 |
|
|
106
|
+
| PCを再起動した | プロセスは残りません。 | 再起動後にもう一度 start します。 |
|
|
107
|
+
| スマホから開きたい | `127.0.0.1` は同じPCだけです。 | 信頼できるアクセス境界を先に用意します。 |
|
|
145
108
|
|
|
146
109
|
## 必要条件
|
|
147
110
|
|
|
148
111
|
| 項目 | version または補足 |
|
|
149
112
|
| --- | --- |
|
|
150
|
-
| Codex CLI | `
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
113
|
+
| Codex CLI | `0.130.0` 以上。 |
|
|
114
|
+
| Codex App | macOS app として `/Applications/Codex.app` にインストール済み。 |
|
|
115
|
+
| Node.js | `20.11` 以上。 |
|
|
116
|
+
| network binding | デフォルトは `127.0.0.1`。 |
|
|
117
|
+
| package | npm の `codex-webapp`。 |
|
|
154
118
|
|
|
155
|
-
Codex
|
|
119
|
+
Codex が古い場合:
|
|
156
120
|
|
|
157
121
|
```bash
|
|
158
122
|
npm install -g @openai/codex@latest
|
|
@@ -160,17 +124,9 @@ codex --version
|
|
|
160
124
|
codex remote-control --help
|
|
161
125
|
```
|
|
162
126
|
|
|
163
|
-
|
|
127
|
+
Codex App が標準位置に無い場合は先にインストールするか、`CODEX_APP_PATH` でローカルの `Codex.app` を指定するか、`CODEX_WEBAPP_CODEX_ASAR` でローカルの `app.asar` を指定してください。この package は実行時に `webview/` だけを抽出します。上流rendererファイルは package に含めません。
|
|
164
128
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
| 症状 | 最初に見るもの | 次に試すこと |
|
|
168
|
-
| --- | --- | --- |
|
|
169
|
-
| `Codex CLI was not found` と出る | `codex --version` | Codex CLI を install または update してください。 |
|
|
170
|
-
| `remote-control` が使えない | `codex remote-control --help` | Codex CLI `0.130.0` 以上へ更新してください。 |
|
|
171
|
-
| UI が開かない | `npx -y codex-webapp start --dry-run` | port の衝突や起動コマンドを確認してください。 |
|
|
172
|
-
| smoke test が失敗する | `npx -y codex-webapp smoke --url http://127.0.0.1:8214/` | server が起動中か、URL が正しいかを確認してください。 |
|
|
173
|
-
| debug 用の証跡が欲しい | `smoke --browser --screenshot artifacts/codex-webapp.png` | screenshot と redact 済み log を issue に添付してください。 |
|
|
129
|
+
ローカル renderer cache を消したい場合は `~/.cache/codex-webapp/` を削除してください。次に `start` したときに再作成されます。
|
|
174
130
|
|
|
175
131
|
## Development
|
|
176
132
|
|
|
@@ -178,18 +134,17 @@ codex remote-control --help
|
|
|
178
134
|
npm test
|
|
179
135
|
npm pack --dry-run
|
|
180
136
|
npm run start:dry-run
|
|
137
|
+
npm run verify:clean-release
|
|
181
138
|
```
|
|
182
139
|
|
|
140
|
+
release handoff 前に clean release gate を実行し、redact 済みの証跡を添付してください。詳細は [Clean Release Verification](./docs/clean-release-verification.md) を参照してください。
|
|
141
|
+
|
|
183
142
|
## Support
|
|
184
143
|
|
|
185
144
|
issue には OS、shell、Node version、Codex version、実行した command、redact 済みの `doctor` / `start` / `smoke` output を入れてください。token、cookie、private repository contents、customer data、internal URL は public issue に貼らないでください。
|
|
186
145
|
|
|
187
|
-
|
|
146
|
+
[SECURITY.md](./SECURITY.md) と [SUPPORT.md](./SUPPORT.md) も参照してください。
|
|
188
147
|
|
|
189
148
|
## License
|
|
190
149
|
|
|
191
150
|
[Apache-2.0](./LICENSE.md)
|
|
192
|
-
|
|
193
|
-
## References
|
|
194
|
-
|
|
195
|
-
[^1]: [openai/codex Releases: 0.130.0](https://github.com/openai/codex/releases/tag/rust-v0.130.0) では、`codex remote-control` が headless かつ remotely controllable な app-server を起動しやすくする entrypoint として追加されたことが説明されています。
|
package/README.md
CHANGED
|
@@ -6,77 +6,42 @@
|
|
|
6
6
|
|
|
7
7
|
[English](./README.md) / [日本語](./README.ja.md) / [한국어](./docs/i18n/README.ko.md) / [简体中文](./docs/i18n/README.zh-CN.md)
|
|
8
8
|
|
|
9
|
-
**Codex WebApp
|
|
9
|
+
**Codex WebApp is an unofficial, local-first renderer bridge for Codex App users.** It reads the installed Codex App renderer from `/Applications/Codex.app/Contents/Resources/app.asar`, extracts only the `webview/` tree into `~/.cache/codex-webapp/`, serves that renderer on `127.0.0.1`, and gives you a repeatable smoke test.
|
|
10
10
|
|
|
11
|
-
Codex
|
|
11
|
+

|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Quick Start From Codex App
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Codex is becoming more useful outside a terminal-only workflow. Developers want to keep Codex running on their machine, but review and control it from a browser, a tablet, a phone, or an app-like surface. The goal of this package is therefore not to replace Codex CLI. The goal is to give Codex App users a simple path from **“I heard remote-control is here”** to **“I have a local browser UI running and smoke-tested.”**
|
|
18
|
-
|
|
19
|
-
| Need | What Codex WebApp provides |
|
|
20
|
-
| --- | --- |
|
|
21
|
-
| A non-terminal entry point | A pasteable Codex App prompt that lets Codex run the setup steps for you. |
|
|
22
|
-
| Confidence before starting | `doctor` checks whether Codex CLI is installed and whether `remote-control` is available. |
|
|
23
|
-
| A safe default | The UI binds to `127.0.0.1` by default and refuses non-loopback hosts unless you explicitly opt in. |
|
|
24
|
-
| A quick proof that it works | `smoke` verifies the local URL and can capture browser evidence when needed. |
|
|
25
|
-
| A thin, inspectable wrapper | The runtime is pinned to a known `codex-web` reference rather than hidden behind a large installer. |
|
|
26
|
-
|
|
27
|
-
> **Unofficial but respectful.** Codex WebApp is not affiliated with or endorsed by OpenAI. It is designed to stay close to Codex’s local-control model and to avoid telemetry, analytics, browser extensions, or a project-operated phone-home path.
|
|
28
|
-
|
|
29
|
-
## Quick start from Codex App
|
|
30
|
-
|
|
31
|
-
If you are using Codex App, paste the following instruction. Codex should perform the checks, run a dry run, start the local UI, and report whether the smoke test passed.
|
|
15
|
+
Paste this into Codex App:
|
|
32
16
|
|
|
33
17
|
```text
|
|
34
|
-
Please
|
|
18
|
+
Please start Codex WebApp on this computer.
|
|
19
|
+
|
|
20
|
+
This is an unofficial local renderer bridge for Codex App users.
|
|
21
|
+
Do not print tokens, cookies, private repository contents, customer data, internal URLs, `.env` values, or anything containing SECRET, KEY, or TOKEN.
|
|
35
22
|
|
|
36
|
-
|
|
37
|
-
codex-webapp
|
|
23
|
+
Please do this in order:
|
|
38
24
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
1. Check `node -v`, `npm -v`, and `npx -v`.
|
|
26
|
+
2. Run `npx -y codex-webapp@latest doctor`.
|
|
27
|
+
3. If doctor fails, stop and explain the fix.
|
|
28
|
+
4. Run `npx -y codex-webapp@latest start --dry-run`.
|
|
29
|
+
5. If the dry run looks good, run `npx -y codex-webapp@latest start`.
|
|
30
|
+
6. When it starts, tell me to open `http://127.0.0.1:8214/`.
|
|
31
|
+
7. Explain that closing this terminal stops the page, and that after a computer restart I need to run start again.
|
|
45
32
|
|
|
46
|
-
|
|
47
|
-
Keep any raw Codex browser server on localhost unless I have a trusted access boundary such as Tailscale or Cloudflare Access.
|
|
33
|
+
For phone or remote access, do not expose the raw UI server directly to a public IP. Use Tailscale, Cloudflare Access, or an equivalent trusted access boundary.
|
|
48
34
|
```
|
|
49
35
|
|
|
50
|
-
Codex will
|
|
36
|
+
Codex will usually run:
|
|
51
37
|
|
|
52
38
|
```bash
|
|
53
|
-
npx -y codex-webapp doctor
|
|
54
|
-
npx -y codex-webapp start --dry-run
|
|
55
|
-
npx -y codex-webapp start
|
|
39
|
+
npx -y codex-webapp@latest doctor
|
|
40
|
+
npx -y codex-webapp@latest start --dry-run
|
|
41
|
+
npx -y codex-webapp@latest start
|
|
56
42
|
```
|
|
57
43
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## It only works while the process is running
|
|
61
|
-
|
|
62
|
-
Codex WebApp is not a hosted cloud service. The browser UI is available only while `npx -y codex-webapp start` is running on your computer.
|
|
63
|
-
|
|
64
|
-
The important point: **after your computer restarts, that process does not come back automatically.** Even if the browser UI worked yesterday, you need to run `npx -y codex-webapp start` again after a reboot unless you have deliberately configured auto-start.
|
|
65
|
-
|
|
66
|
-
| Event | What happens | What to do |
|
|
67
|
-
| --- | --- | --- |
|
|
68
|
-
| You close the terminal window | The browser UI stops. | Run `npx -y codex-webapp start` again. |
|
|
69
|
-
| The computer sleeps | The connection may survive, but it can also break. | Restart the command if the page no longer opens. |
|
|
70
|
-
| The computer restarts | The process is gone. Yesterday’s browser UI is no longer running. | Run `npx -y codex-webapp start` again after rebooting. |
|
|
71
|
-
| You want to open it from a phone or another PC | `127.0.0.1` means “this same computer,” so another device cannot use that URL directly. | Put Tailscale, Cloudflare Access, or an equivalent trusted access boundary in front first. |
|
|
72
|
-
|
|
73
|
-
Start with the same computer first: run the command, then open `http://127.0.0.1:8214/` in that computer’s browser. Phone and remote access should come after that local check passes.
|
|
74
|
-
|
|
75
|
-
If you use this every day, you may eventually want an auto-start setup that runs `npx -y codex-webapp start` when the computer starts. Treat that as an advanced, after-the-first-success step. First confirm manual `doctor`, `start`, browser access, how to stop the process, and your trusted access boundary. If you do configure auto-start through Login Items, `launchd`, or a process manager you control, still do not expose the raw UI server without authentication.
|
|
76
|
-
|
|
77
|
-
## Quick start from a terminal
|
|
78
|
-
|
|
79
|
-
Use this route if you prefer to control the commands yourself. Codex WebApp requires **Node.js 20 or newer** and **Codex CLI 0.130.0 or newer**.
|
|
44
|
+
## Terminal Quick Start
|
|
80
45
|
|
|
81
46
|
```bash
|
|
82
47
|
npx -y codex-webapp doctor
|
|
@@ -84,19 +49,19 @@ npx -y codex-webapp start --dry-run
|
|
|
84
49
|
npx -y codex-webapp start
|
|
85
50
|
```
|
|
86
51
|
|
|
87
|
-
|
|
52
|
+
Then open:
|
|
88
53
|
|
|
89
54
|
```text
|
|
90
55
|
http://127.0.0.1:8214/
|
|
91
56
|
```
|
|
92
57
|
|
|
93
|
-
|
|
58
|
+
Verify the page:
|
|
94
59
|
|
|
95
60
|
```bash
|
|
96
61
|
npx -y codex-webapp smoke --url http://127.0.0.1:8214/
|
|
97
62
|
```
|
|
98
63
|
|
|
99
|
-
|
|
64
|
+
For screenshot evidence:
|
|
100
65
|
|
|
101
66
|
```bash
|
|
102
67
|
npx -y codex-webapp smoke \
|
|
@@ -105,48 +70,53 @@ npx -y codex-webapp smoke \
|
|
|
105
70
|
--screenshot artifacts/codex-webapp.png
|
|
106
71
|
```
|
|
107
72
|
|
|
108
|
-
## What
|
|
73
|
+
## What It Runs
|
|
109
74
|
|
|
110
|
-
|
|
75
|
+
`codex-webapp start` starts the local renderer bridge shipped by this package. The bridge prepares the Codex App webview from the Codex App already installed on this Mac, caches the extracted renderer under `~/.cache/codex-webapp/`, and serves those static files with cache headers. It does not bundle another runtime, does not start a hosted service, and does not phone home.
|
|
111
76
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
| `
|
|
117
|
-
| `start --
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
77
|
+
This package is the adapter, not Codex App itself. It does not bundle Codex/OpenAI binaries, `app.asar`, a pre-extracted `webview/`, tokens, cookies, signed URLs, private session databases, private repository contents, or customer data. At runtime it reads the user's locally installed Codex App, extracts only `webview/` into the user's local cache, and serves that local copy.
|
|
78
|
+
|
|
79
|
+
| Command | Purpose |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `doctor` | Checks Codex CLI, version, and `remote-control` availability. |
|
|
82
|
+
| `start --dry-run` | Shows the planned local URL without starting the server. |
|
|
83
|
+
| `start` | Prepares and serves the installed Codex App renderer. |
|
|
84
|
+
| `start --yes` | Starts without an interactive confirmation prompt. |
|
|
85
|
+
| `smoke` | Checks that the local UI URL responds with expected content. |
|
|
86
|
+
| `smoke --browser --screenshot ...` | Opens the page in a browser and saves evidence. |
|
|
120
87
|
|
|
121
|
-
|
|
88
|
+
For a developer-friendly overview of the adapter boundary, see [Architecture](./docs/architecture.md).
|
|
122
89
|
|
|
123
|
-
|
|
124
|
-
github:0xcaff/codex-web#585613f5a3a355af5aefc388ca4e31b07a472cda
|
|
125
|
-
```
|
|
90
|
+
## Safety Model
|
|
126
91
|
|
|
127
|
-
|
|
92
|
+
The UI is powerful because anyone who can reach it may be able to operate Codex on the host machine. Codex WebApp therefore defaults to `127.0.0.1`, refuses non-loopback hosts unless `--allow-non-loopback` is provided, and prints a confirmation before starting.
|
|
128
93
|
|
|
129
|
-
|
|
94
|
+
Do not expose the raw UI server on a public IP. For phone or remote access, put Tailscale, Cloudflare Access, WireGuard, SSH tunneling, or an equivalent trusted boundary in front first.
|
|
130
95
|
|
|
131
|
-
|
|
132
|
-
| --- | --- |
|
|
133
|
-
| Same machine | Keep the default `http://127.0.0.1:8214/`. |
|
|
134
|
-
| Phone or another computer you control | Use Tailscale, Cloudflare Access, or an equivalent trusted access layer before exposing anything beyond localhost. |
|
|
135
|
-
| Public internet | Do not expose the raw UI server directly on a public IP. |
|
|
136
|
-
| Support issue | Redact tokens, cookies, private repository contents, customer data, and internal URLs before sharing logs. |
|
|
96
|
+
Codex WebApp does not include telemetry, analytics, a browser extension, or a project-operated phone-home path.
|
|
137
97
|
|
|
138
|
-
|
|
98
|
+
## It Only Works While The Process Is Running
|
|
99
|
+
|
|
100
|
+
Codex WebApp is not a hosted cloud service. The browser UI exists only while `npx -y codex-webapp start` is running on your computer.
|
|
101
|
+
|
|
102
|
+
| Event | Result | Fix |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| You close the terminal window | The UI stops. | Run `npx -y codex-webapp start` again. |
|
|
105
|
+
| The computer sleeps | The connection may break. | Restart the command if the page stops opening. |
|
|
106
|
+
| The computer restarts | The process is gone. | Run `npx -y codex-webapp start` again after rebooting. |
|
|
107
|
+
| You want phone access | `127.0.0.1` only works on the same computer. | Add a trusted access boundary first. |
|
|
139
108
|
|
|
140
109
|
## Requirements
|
|
141
110
|
|
|
142
111
|
| Requirement | Version or note |
|
|
143
112
|
| --- | --- |
|
|
144
|
-
| Codex CLI | `0.130.0` or newer
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
113
|
+
| Codex CLI | `0.130.0` or newer. |
|
|
114
|
+
| Codex App | macOS app installed at `/Applications/Codex.app`. |
|
|
115
|
+
| Node.js | `20.11` or newer. |
|
|
116
|
+
| Binding | `127.0.0.1` by default. |
|
|
117
|
+
| Package | `codex-webapp` from npm. |
|
|
148
118
|
|
|
149
|
-
If Codex is missing or too old
|
|
119
|
+
If Codex is missing or too old:
|
|
150
120
|
|
|
151
121
|
```bash
|
|
152
122
|
npm install -g @openai/codex@latest
|
|
@@ -154,17 +124,9 @@ codex --version
|
|
|
154
124
|
codex remote-control --help
|
|
155
125
|
```
|
|
156
126
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
Most setup failures fall into a small number of categories. Run the commands in this order and share only redacted output if you open an issue.
|
|
127
|
+
If Codex App is missing from the default location, install it first, set `CODEX_APP_PATH` to the local `Codex.app`, or point `CODEX_WEBAPP_CODEX_ASAR` at a local `app.asar`. The package extracts only `webview/` at runtime; renderer files from Codex App are not included in this package.
|
|
160
128
|
|
|
161
|
-
|
|
162
|
-
| --- | --- | --- |
|
|
163
|
-
| `Codex CLI was not found` | `codex --version` | Install or update Codex CLI. |
|
|
164
|
-
| `remote-control` is unavailable | `codex remote-control --help` | Upgrade to Codex CLI `0.130.0` or newer. |
|
|
165
|
-
| The UI does not open | `npx -y codex-webapp start --dry-run` | Check whether the port is available and whether the launch command is correct. |
|
|
166
|
-
| The smoke test fails | `npx -y codex-webapp smoke --url http://127.0.0.1:8214/` | Confirm the server is still running and that you are using the printed URL. |
|
|
167
|
-
| You need proof for debugging | `smoke --browser --screenshot artifacts/codex-webapp.png` | Attach the screenshot and redacted logs to an issue. |
|
|
129
|
+
To remove the local renderer cache, delete `~/.cache/codex-webapp/`. It will be prepared again the next time `start` runs.
|
|
168
130
|
|
|
169
131
|
## Development
|
|
170
132
|
|
|
@@ -172,18 +134,17 @@ Most setup failures fall into a small number of categories. Run the commands in
|
|
|
172
134
|
npm test
|
|
173
135
|
npm pack --dry-run
|
|
174
136
|
npm run start:dry-run
|
|
137
|
+
npm run verify:clean-release
|
|
175
138
|
```
|
|
176
139
|
|
|
140
|
+
Before release handoff, run the clean release gate and attach redacted evidence. See [Clean Release Verification](./docs/clean-release-verification.md).
|
|
141
|
+
|
|
177
142
|
## Support
|
|
178
143
|
|
|
179
144
|
Open an issue with your OS, shell, Node version, Codex version, the command you ran, and redacted output from `doctor`, `start`, or `smoke`. Do not paste tokens, cookies, private repository contents, customer data, or internal URLs into a public issue.
|
|
180
145
|
|
|
181
|
-
See [SECURITY.md](./SECURITY.md)
|
|
146
|
+
See [SECURITY.md](./SECURITY.md) and [SUPPORT.md](./SUPPORT.md).
|
|
182
147
|
|
|
183
148
|
## License
|
|
184
149
|
|
|
185
150
|
[Apache-2.0](./LICENSE.md)
|
|
186
|
-
|
|
187
|
-
## References
|
|
188
|
-
|
|
189
|
-
[^1]: [openai/codex Releases: 0.130.0](https://github.com/openai/codex/releases/tag/rust-v0.130.0) states that `codex remote-control` was added as a simpler entrypoint for starting a headless, remotely controllable app-server.
|