remcodex 0.1.0-beta.3 → 0.1.0-beta.5

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/README.md CHANGED
@@ -1,81 +1,103 @@
1
- # RemCodex
2
-
3
- > Control Codex from anywhere. Even on your phone.
4
-
5
- RemCodex is a local-first web UI for running, reviewing, approving, and resuming Codex sessions from your browser.
6
-
7
- It is built for the real workflow: long-running sessions, mobile check-ins, approval prompts, imported rollout history, and timeline-style execution flow.
8
-
9
- ```mermaid
10
- flowchart LR
11
- subgraph D[Your devices]
12
- P[Phone]
13
- B[Browser]
14
- end
15
-
16
- subgraph M[Your work machine]
17
- subgraph R[RemCodex]
18
- UI[Web UI]
19
- S[Server]
20
- T[Timeline + approvals + sync]
21
- end
22
-
23
- subgraph C[Local Codex runtime]
24
- X[Codex CLI / app-server]
25
- F[Workspace files]
26
- H[~/.codex sessions]
27
- end
28
- end
29
-
30
- P --> UI
31
- B --> UI
32
- UI --> S
33
- S --> T
34
- S --> X
35
- X --> F
36
- X --> H
37
- H --> S
38
- T --> UI
39
- ```
1
+ # 🚀 RemCodex
2
+
3
+ > Control your AI coding agent from anywhere.
4
+ > Built for Codex. Ready for more.
5
+
6
+ Run Codex once on your computer.
7
+ Watch, approve, and control it from any device.
8
+
9
+ > Not a wrapper. Not a proxy.
10
+ > A real-time control layer for AI execution.
11
+ > Turns AI execution into a controllable system.
12
+
13
+ ![RemCodex hero cover](docs/assets/hero-cover.png)
14
+
15
+ ---
16
+
17
+ ## ✨ What is RemCodex?
18
+
19
+ RemCodex is a **local-first control layer for Codex**.
20
+
21
+ It turns AI execution into a **controllable system** —
22
+ visible, interruptible, and continuous.
23
+
24
+ - 👀 See what the AI is doing — in real time
25
+ - ✅ Approve or reject actions before execution
26
+ - ⏹ Interrupt or stop at any moment
27
+ - 📱 Access your session from any device
28
+ - 🔄 Sessions don’t break — they resume
29
+
30
+ > One session. Any device.
31
+
32
+ ---
33
+
34
+ ## 🎬 A real workflow
35
+
36
+ You start a long Codex session on your machine.
37
+
38
+ Then you leave your desk.
39
+
40
+ On your phone:
41
+
42
+ - you see progress in real time
43
+ - you receive an approval request
44
+ - you approve it
45
+
46
+ The session continues instantly.
47
+
48
+ > Everything else can disconnect — your session won’t.
40
49
 
41
- - Watch live Codex runs without staying in the terminal
42
- - Approve sensitive actions from a cleaner UI
43
- - Pick up the same session again after refresh, sleep, or reconnect
50
+ ---
44
51
 
45
- ## Status
52
+ ## 🔥 Why RemCodex exists
46
53
 
47
- This project is currently a **beta / developer preview**.
54
+ AI coding agents are powerful.
55
+ But today, they run like a black box.
48
56
 
49
- MIT licensed — free for personal and commercial use.
57
+ You either:
50
58
 
51
- Cloud version coming soon.
59
+ - trust everything blindly
60
+ - or sit in front of your terminal watching it
52
61
 
53
- It is already usable for local and internal workflows, but it is not yet packaged as a one-click desktop app.
62
+ RemCodex fixes that.
54
63
 
55
- ## Why People Use It
64
+ > AI is no longer a black box.
56
65
 
57
- Codex is powerful in the terminal, but many real workflows need a better control surface:
66
+ ---
58
67
 
59
- - checking progress from your phone
60
- - watching a long run without babysitting a terminal window
61
- - approving writes from a cleaner interface
62
- - reopening a session after refresh, sleep, or reconnect
63
- - reviewing imported rollout history next to native sessions
68
+ ## What it does
64
69
 
65
- RemCodex turns Codex's event stream into a browser-based workspace that is easier to follow, easier to resume, and easier to operate.
70
+ - Real-time execution timeline (messages, commands, approvals)
71
+ - Human-in-the-loop command approval
72
+ - Multi-device access to the same live session
73
+ - Resume after refresh, sleep, or reconnect
74
+ - Browser-based UI — **no extra client required**
75
+ - Works with Codex CLI
66
76
 
67
- ## What It Does
77
+ > No extra client install. Just open a browser.
78
+ > Your code never leaves your machine.
68
79
 
69
- - Run Codex sessions from a browser
70
- - View sessions in a single-page workspace with a sidebar and execution timeline
71
- - Follow streaming assistant output, commands, patches, and approvals
72
- - Approve or reject file-system actions from the UI
73
- - Import existing Codex rollout sessions from `~/.codex/sessions/...`
74
- - Keep imported sessions in sync while they are still active
75
- - Resume stale sessions after the page comes back from background
76
- - Work well on desktop and on mobile
80
+ ---
77
81
 
78
- ## Screenshots
82
+ ## 🚀 Quick start
83
+
84
+ ```bash
85
+ npx remcodex
86
+ ```
87
+
88
+ Then open:
89
+
90
+ http://127.0.0.1:18840
91
+
92
+ Access from another device:
93
+
94
+ http://<your-ip>:18840
95
+
96
+ > Runs entirely on your local machine. No cloud, no data upload.
97
+
98
+ ---
99
+
100
+ ## 🖥 Screenshots
79
101
 
80
102
  ![RemCodex desktop workspace](docs/assets/hero-desktop.png)
81
103
 
@@ -91,121 +113,114 @@ RemCodex turns Codex's event stream into a browser-based workspace that is easie
91
113
 
92
114
  ![RemCodex imported Codex session](docs/assets/imported-session.png)
93
115
 
94
- > Bring imported Codex rollouts into the same workspace and keep them easy to review.
116
+ > Bring imported Codex rollouts into the same workspace.
117
+
118
+ ---
119
+
120
+ ## 🧠 What it actually is
95
121
 
96
- ## Who It Is For
122
+ RemCodex is a **browser-based workspace for Codex sessions**.
97
123
 
98
- - developers who already use Codex locally
99
- - people who want a browser-based control surface instead of raw terminal watching
100
- - teams who want to review or monitor runs from another device on the same network
101
- - anyone who wants approvals, timeline view, and imported rollout history in one place
124
+ It is built for real workflows:
102
125
 
103
- ## Screens It Aims To Replace
126
+ - long-running sessions
127
+ - mobile check-ins
128
+ - approval prompts
129
+ - imported rollout history
130
+ - timeline-style execution flow
104
131
 
105
- - terminal-only session watching
106
- - ad-hoc mobile remote desktop checks
107
- - raw log scrolling for approvals and command progress
108
- - fragmented session history between local and imported rollouts
132
+ Instead of raw terminal logs, you get a structured, visual timeline you can follow and control.
109
133
 
110
- ## Current Product Shape
134
+ ---
135
+
136
+ ## 🧩 Current product shape
111
137
 
112
138
  - Single-page workspace UI
113
139
  - Left sidebar for session navigation
114
- - Right-side timeline / execution flow for the active session
115
- - Fixed composer at the bottom
140
+ - Right-side execution timeline
141
+ - Fixed input composer
116
142
  - Semantic timeline rendering for:
117
- - user messages
118
- - assistant commentary / final messages
119
- - thinking
120
- - commands
121
- - patches
122
- - approvals
123
- - system events
143
+ - user messages
144
+ - assistant output
145
+ - thinking
146
+ - commands
147
+ - patches
148
+ - approvals
149
+ - system events
124
150
 
125
- ## Tech Stack
151
+ ---
126
152
 
127
- - Backend: Node.js + TypeScript + Express + WebSocket
128
- - Database: SQLite via `better-sqlite3`
129
- - Terminal/runtime integration: `node-pty` + Codex app-server
130
- - Frontend: zero-build static web app (`web/`)
131
- - Markdown rendering: `markdown-it`
153
+ ## ⚙️ Key behaviors
132
154
 
133
- ## Requirements
155
+ ### Approvals
134
156
 
135
- Before running this project, you should have:
157
+ - Writes inside working area auto allowed
158
+ - Writes outside → require approval
159
+ - `Allow once` / `Allow for this turn` supported
160
+ - Approval history stays visible in timeline
136
161
 
137
- - Node.js installed
138
- - Codex CLI installed and already working locally
139
- - A machine where this app can access your local Codex data and working directories
162
+ ---
140
163
 
141
- On Linux, the first install may need a native build toolchain for `better-sqlite3` and `node-pty`:
164
+ ### Timeline
142
165
 
143
- - `python3`
144
- - `make`
145
- - `g++`
166
+ - Semantic rendering (not raw logs)
167
+ - Commands grouped into readable activity blocks
168
+ - Running / failed states clearly visible
169
+ - Smooth streaming + recovery after refresh
146
170
 
147
- This project is currently developed primarily around a local macOS workflow.
171
+ ---
148
172
 
149
- ## Quick Start
173
+ ### Imported sessions
150
174
 
151
- For the current beta, the fastest way to try RemCodex is:
175
+ - Import from `~/.codex/sessions/...`
176
+ - Keep syncing if still active
177
+ - Unified view with native sessions
152
178
 
153
- ```bash
154
- npx remcodex
155
- ```
179
+ ---
156
180
 
157
- You can also install it globally:
181
+ ## 🧠 Architecture
158
182
 
159
- ```bash
160
- npm install -g remcodex
161
- remcodex
183
+ ```
184
+ Codex CLI Event stream → Semantic layer → Timeline → Web UI
162
185
  ```
163
186
 
164
- RemCodex starts a local server and opens the browser for you.
165
-
166
- If you want to make it reachable from your phone, expose the local machine on your LAN and open the same URL with your host IP.
187
+ ---
167
188
 
168
- ### Linux Install Note
189
+ ## ⚙️ Requirements
169
190
 
170
- If `npx remcodex` appears to hang during the first install, it is usually still installing or compiling native dependencies.
191
+ - Node.js
192
+ - Codex CLI (already working locally)
171
193
 
172
- Make sure the machine has:
194
+ ---
173
195
 
174
- - `python3`
175
- - `make`
176
- - `g++`
196
+ ## ⚙️ Configuration
177
197
 
178
- Common setup examples:
198
+ Default port: **18840**
179
199
 
180
200
  ```bash
181
- # Debian / Ubuntu
182
- apt-get install -y python3 make g++
183
-
184
- # RHEL / CentOS / Rocky / Alibaba Cloud Linux
185
- yum install -y python3 make gcc-c++
201
+ PORT=18841 npx remcodex
186
202
  ```
187
203
 
188
- ## Install FAQ
204
+ ---
189
205
 
190
- ### Why does `npx remcodex` seem to hang on Linux?
206
+ ## 📦 Install FAQ
191
207
 
192
- The package includes native dependencies such as `better-sqlite3` and `node-pty`.
208
+ ### Why does `npx remcodex` hang on Linux?
193
209
 
194
- On some Linux machines, the first install may need to download or compile native binaries before RemCodex itself starts. That can look like a long spinner before you see any RemCodex output.
210
+ First install may compile native deps:
195
211
 
196
- ### What usually fixes Linux install failures?
212
+ - `better-sqlite3`
213
+ - `node-pty`
197
214
 
198
- Install the native build tools first:
215
+ Make sure you have:
199
216
 
200
217
  - `python3`
201
218
  - `make`
202
219
  - `g++`
203
220
 
204
- If you see `node-gyp`, `g++`, or build-related errors, the machine is usually missing part of that toolchain.
221
+ ---
205
222
 
206
- ### How can I get clearer logs than `npx remcodex`?
207
-
208
- If the first `npx` run is unclear, install it globally instead:
223
+ ### Debug install issues
209
224
 
210
225
  ```bash
211
226
  npm install -g remcodex
@@ -213,194 +228,88 @@ remcodex doctor
213
228
  remcodex start
214
229
  ```
215
230
 
216
- That usually makes native install errors much easier to read.
217
-
218
- ### What if I am starting RemCodex on a headless server?
231
+ ---
219
232
 
220
- Use:
233
+ ### Headless mode
221
234
 
222
235
  ```bash
223
236
  npx remcodex --no-open
224
237
  ```
225
238
 
226
- or:
227
-
228
- ```bash
229
- remcodex start --no-open
230
- ```
231
-
232
- RemCodex will still print the local and LAN URLs even when it does not try to open a browser.
233
-
234
- ### Do I need Codex CLI installed first?
235
-
236
- Yes.
237
-
238
- RemCodex is a control surface for your local Codex runtime. If `codex` is not already installed and working in `PATH`, run:
239
+ ---
239
240
 
240
- ```bash
241
- remcodex doctor
242
- ```
241
+ ## 🔧 How it works
243
242
 
244
- and fix the reported Codex CLI issue first.
243
+ 1. Codex emits events
244
+ 2. Backend stores them (SQLite)
245
+ 3. Frontend loads timeline snapshot
246
+ 4. Live updates stream via WebSocket
245
247
 
246
- ## Local CLI
248
+ Result:
247
249
 
248
- RemCodex also works well from source if you want to develop locally or inspect the runtime setup.
250
+ - recoverable sessions
251
+ - real-time UI
252
+ - consistent execution flow
249
253
 
250
- Local development path:
254
+ ---
251
255
 
252
- ```bash
253
- npm install
254
- npm run build
255
- npm link
256
- remcodex start
257
- ```
256
+ ## 📊 Status
258
257
 
259
- Useful commands:
258
+ - Beta / developer preview
259
+ - Local-first architecture
260
+ - No cloud dependency
260
261
 
261
- ```bash
262
- node dist/server/src/cli.js doctor
263
- node dist/server/src/cli.js start --no-open
264
- node dist/server/src/cli.js version
265
- ```
262
+ ---
266
263
 
267
- Use a specific database:
264
+ ## 🗺 Roadmap
268
265
 
269
- ```bash
270
- node dist/server/src/cli.js start --db ~/.remcodex/remcodex-alt.db --no-open
271
- node dist/server/src/cli.js doctor --db ~/.remcodex/remcodex-alt.db
272
- ```
266
+ **Visibility**
273
267
 
274
- ## Development
268
+ - fully observable execution
269
+ - clear action timeline
275
270
 
276
- ```bash
277
- npm install
278
- npm run dev
279
- ```
271
+ **Control**
280
272
 
281
- ## How It Works
273
+ - fine-grained approvals
274
+ - safer execution
282
275
 
283
- The app uses `codex app-server` as the primary runtime path.
276
+ **Continuity**
284
277
 
285
- At a high level:
278
+ - survive refresh / sleep
279
+ - stable long runs
286
280
 
287
- 1. Codex emits semantic events
288
- 2. The backend stores them in SQLite
289
- 3. The frontend reads an aggregated timeline view for initial load
290
- 4. Live updates continue over WebSocket with catch-up after refresh
281
+ **Access**
291
282
 
292
- This gives the UI:
283
+ - control from any device
293
284
 
294
- - smooth streaming
295
- - recoverable sessions
296
- - imported rollout support
297
- - a consistent execution timeline instead of raw terminal logs
285
+ **Integration**
298
286
 
299
- ## Key Behaviors
287
+ - IDE integrations
288
+ - optional sharing
300
289
 
301
- ### Approvals
290
+ ---
302
291
 
303
- - Writes inside the working area usually pass directly
304
- - Writes outside the working area trigger approval
305
- - `Allow once` approves only the current request
306
- - `Allow for this turn` expands writable roots for the active turn
307
- - Historical approval records stay visible in the timeline
308
- - Only live approvals stay actionable in the bottom approval bar
309
-
310
- ### Imported Codex Sessions
311
-
312
- - Existing Codex rollouts can be imported from local session history
313
- - Imported sessions keep their own source metadata
314
- - Imported sessions can continue syncing after you open them
315
- - Native sessions are excluded from the import picker
316
-
317
- ### Timeline and Execution Flow
318
-
319
- - The UI renders semantic timeline items, not raw logs
320
- - Commands and patches can be grouped into lighter activity summaries
321
- - Running and failed commands remain visually important
322
- - The final thinking placeholder appears only at the end of the active flow
323
-
324
- ## Configuration
325
-
326
- Supported environment variables:
327
-
328
- - `PORT`
329
- - `DATABASE_PATH`
330
- - `PROJECT_ROOTS`
331
- - `CODEX_COMMAND`
332
- - `CODEX_MODE`
333
- - `REMOTE_HOSTS`
334
- - `ACTIVE_REMOTE_HOST`
335
-
336
- Notes:
337
-
338
- - The default runtime mode is `app-server`
339
- - `exec-json` is kept only as a fallback compatibility path
340
- - If `PROJECT_ROOTS` is not set, the app falls back to a broad local browsing root
341
-
342
- ## Project Structure
343
-
344
- ```text
345
- server/
346
- src/
347
- app.ts
348
- controllers/
349
- db/
350
- gateways/
351
- services/
352
- types/
353
- utils/
354
- web/
355
- index.html
356
- styles.css
357
- api.js
358
- session-ws.js
359
- app.js
360
- scripts/
361
- fix-node-pty-helper.js
362
- ```
363
-
364
- ## Main Endpoints
292
+ ## 👥 Who it’s for
365
293
 
366
- - `GET /health`
367
- - `GET /api/codex/mode`
368
- - `GET /api/codex/status`
369
- - `GET /api/codex/quota`
370
- - `GET /api/sessions`
371
- - `GET /api/sessions/:sessionId`
372
- - `GET /api/sessions/:sessionId/timeline`
373
- - `GET /api/sessions/:sessionId/events`
374
- - `POST /api/sessions`
375
- - `POST /api/sessions/:sessionId/messages`
376
- - `POST /api/sessions/:sessionId/stop`
377
- - `POST /api/sessions/:sessionId/approvals/:requestId`
378
- - `WS /ws/sessions/:sessionId`
294
+ - developers already using Codex
295
+ - people tired of terminal-only workflows
296
+ - anyone who wants **control, not just output**
297
+ - multi-device workflows
379
298
 
380
- ## What Is Not Finished Yet
299
+ ---
381
300
 
382
- This is the honest list:
301
+ ## ⚠️ What’s not finished yet
383
302
 
384
303
  - no polished installer yet
385
- - no desktop packaging yet
386
- - no full automated test suite yet
387
- - no production-grade auth / multi-user hardening yet
388
- - no release pipeline yet
389
-
390
- If you are comfortable running a local Node app or a small CLI tool, you can use it today.
391
-
392
- ## Roadmap
304
+ - no desktop packaging
305
+ - no production-grade auth
306
+ - no release pipeline
393
307
 
394
- Near-term:
308
+ If you're comfortable running a local Node app —
309
+ you can use it today.
395
310
 
396
- - improve onboarding and installation
397
- - ship a cleaner public README and screenshots
398
- - add stronger regression coverage
399
- - harden long-running session recovery
400
- - continue refining the execution timeline UI
311
+ ---
401
312
 
402
- Later:
313
+ ## 📄 License
403
314
 
404
- - improve the first-run install and update experience
405
- - optional sync / multi-device helpers
406
- - stronger sharing, auditing, and team workflows
315
+ MIT License
@@ -242,8 +242,9 @@ async function main() {
242
242
  usage();
243
243
  return;
244
244
  }
245
- const command = argv[0] && !argv[0].startsWith("-") ? argv[0] : "start";
246
- const flagArgs = command === "start" ? argv.slice(1) : argv;
245
+ const hasExplicitCommand = Boolean(argv[0] && !argv[0].startsWith("-"));
246
+ const command = hasExplicitCommand ? argv[0] : "start";
247
+ const flagArgs = hasExplicitCommand ? argv.slice(1) : argv;
247
248
  const flags = parseFlags(flagArgs);
248
249
  switch (command) {
249
250
  case "start":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remcodex",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "Control Codex from anywhere. Even on your phone.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -64,9 +64,9 @@ export default {
64
64
  "projects.registryEyebrow": "Project registry",
65
65
  "projects.addTitle": "Add project",
66
66
  "projects.name": "Project name",
67
- "projects.namePlaceholder": "e.g. easygo-service",
67
+ "projects.namePlaceholder": "e.g. my-service",
68
68
  "projects.path": "Local path",
69
- "projects.pathPlaceholder": "/workspace/easygo-service",
69
+ "projects.pathPlaceholder": "/workspace/my-service",
70
70
  "projects.register": "Register project",
71
71
  "projects.listTitle": "Projects",
72
72
  "projects.count": ({ count }) => (count === 1 ? "1 project" : `${count} projects`),
@@ -64,9 +64,9 @@ export default {
64
64
  "projects.registryEyebrow": "项目登记",
65
65
  "projects.addTitle": "新增项目",
66
66
  "projects.name": "项目名",
67
- "projects.namePlaceholder": "例如 easygo-service",
67
+ "projects.namePlaceholder": "例如 my-service",
68
68
  "projects.path": "本地路径",
69
- "projects.pathPlaceholder": "/workspace/easygo-service",
69
+ "projects.pathPlaceholder": "/workspace/my-service",
70
70
  "projects.register": "登记项目",
71
71
  "projects.listTitle": "项目列表",
72
72
  "projects.count": ({ count }) => `${count} 个项目`,