remcodex 0.1.0-beta.2 β†’ 0.1.0-beta.4

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.
40
47
 
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
48
+ > Everything else can disconnect β€” your session won’t.
44
49
 
45
- ## Status
50
+ ---
46
51
 
47
- This project is currently a **beta / developer preview**.
52
+ ## πŸ”₯ Why RemCodex exists
48
53
 
49
- MIT licensed β€” free for personal and commercial use.
54
+ AI coding agents are powerful.
55
+ But today, they run like a black box.
50
56
 
51
- Cloud version coming soon.
57
+ You either:
52
58
 
53
- It is already usable for local and internal workflows, but it is not yet packaged as a one-click desktop app.
59
+ - trust everything blindly
60
+ - or sit in front of your terminal watching it
54
61
 
55
- ## Why People Use It
62
+ RemCodex fixes that.
56
63
 
57
- Codex is powerful in the terminal, but many real workflows need a better control surface:
64
+ > AI is no longer a black box.
58
65
 
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
66
+ ---
64
67
 
65
- RemCodex turns Codex's event stream into a browser-based workspace that is easier to follow, easier to resume, and easier to operate.
68
+ ## ⚑ What it does
66
69
 
67
- ## What It Does
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
68
76
 
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
77
+ > No extra client install. Just open a browser.
78
+ > Your code never leaves your machine.
77
79
 
78
- ## Screenshots
80
+ ---
81
+
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,232 +113,203 @@ 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
+ ---
95
119
 
96
- ## Who It Is For
120
+ ## 🧠 What it actually is
97
121
 
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
122
+ RemCodex is a **browser-based workspace for Codex sessions**.
102
123
 
103
- ## Screens It Aims To Replace
124
+ It is built for real workflows:
104
125
 
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
126
+ - long-running sessions
127
+ - mobile check-ins
128
+ - approval prompts
129
+ - imported rollout history
130
+ - timeline-style execution flow
109
131
 
110
- ## Current Product Shape
132
+ Instead of raw terminal logs, you get a structured, visual timeline you can follow and control.
133
+
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
- This project is currently developed primarily around a local macOS workflow.
164
+ ### Timeline
142
165
 
143
- ## Quick Start
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
144
170
 
145
- For the current beta, the fastest way to try RemCodex is:
171
+ ---
172
+
173
+ ### Imported sessions
174
+
175
+ - Import from `~/.codex/sessions/...`
176
+ - Keep syncing if still active
177
+ - Unified view with native sessions
178
+
179
+ ---
180
+
181
+ ## 🧠 Architecture
146
182
 
147
- ```bash
148
- npx remcodex
149
183
  ```
184
+ Codex CLI β†’ Event stream β†’ Semantic layer β†’ Timeline β†’ Web UI
185
+ ```
186
+
187
+ ---
188
+
189
+ ## βš™οΈ Requirements
190
+
191
+ - Node.js
192
+ - Codex CLI (already working locally)
150
193
 
151
- You can also install it globally:
194
+ ---
195
+
196
+ ## βš™οΈ Configuration
197
+
198
+ Default port: **18840**
152
199
 
153
200
  ```bash
154
- npm install -g remcodex
155
- remcodex
201
+ PORT=18841 npx remcodex
156
202
  ```
157
203
 
158
- RemCodex starts a local server and opens the browser for you.
204
+ ---
205
+
206
+ ## πŸ“¦ Install FAQ
159
207
 
160
- 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.
208
+ ### Why does `npx remcodex` hang on Linux?
161
209
 
162
- ## Local CLI
210
+ First install may compile native deps:
163
211
 
164
- RemCodex also works well from source if you want to develop locally or inspect the runtime setup.
212
+ - `better-sqlite3`
213
+ - `node-pty`
165
214
 
166
- Local development path:
215
+ Make sure you have:
216
+
217
+ - `python3`
218
+ - `make`
219
+ - `g++`
220
+
221
+ ---
222
+
223
+ ### Debug install issues
167
224
 
168
225
  ```bash
169
- npm install
170
- npm run build
171
- npm link
226
+ npm install -g remcodex
227
+ remcodex doctor
172
228
  remcodex start
173
229
  ```
174
230
 
175
- Useful commands:
231
+ ---
232
+
233
+ ### Headless mode
176
234
 
177
235
  ```bash
178
- node dist/server/src/cli.js doctor
179
- node dist/server/src/cli.js start --no-open
180
- node dist/server/src/cli.js version
236
+ npx remcodex --no-open
181
237
  ```
182
238
 
183
- Use a specific database:
239
+ ---
184
240
 
185
- ```bash
186
- node dist/server/src/cli.js start --db ~/.remcodex/remcodex-alt.db --no-open
187
- node dist/server/src/cli.js doctor --db ~/.remcodex/remcodex-alt.db
188
- ```
241
+ ## πŸ”§ How it works
189
242
 
190
- ## Development
243
+ 1. Codex emits events
244
+ 2. Backend stores them (SQLite)
245
+ 3. Frontend loads timeline snapshot
246
+ 4. Live updates stream via WebSocket
191
247
 
192
- ```bash
193
- npm install
194
- npm run dev
195
- ```
248
+ Result:
196
249
 
197
- ## How It Works
250
+ - recoverable sessions
251
+ - real-time UI
252
+ - consistent execution flow
198
253
 
199
- The app uses `codex app-server` as the primary runtime path.
254
+ ---
200
255
 
201
- At a high level:
256
+ ## πŸ“Š Status
202
257
 
203
- 1. Codex emits semantic events
204
- 2. The backend stores them in SQLite
205
- 3. The frontend reads an aggregated timeline view for initial load
206
- 4. Live updates continue over WebSocket with catch-up after refresh
258
+ - Beta / developer preview
259
+ - Local-first architecture
260
+ - No cloud dependency
207
261
 
208
- This gives the UI:
262
+ ---
209
263
 
210
- - smooth streaming
211
- - recoverable sessions
212
- - imported rollout support
213
- - a consistent execution timeline instead of raw terminal logs
264
+ ## πŸ—Ί Roadmap
214
265
 
215
- ## Key Behaviors
266
+ **Visibility**
216
267
 
217
- ### Approvals
268
+ - fully observable execution
269
+ - clear action timeline
218
270
 
219
- - Writes inside the working area usually pass directly
220
- - Writes outside the working area trigger approval
221
- - `Allow once` approves only the current request
222
- - `Allow for this turn` expands writable roots for the active turn
223
- - Historical approval records stay visible in the timeline
224
- - Only live approvals stay actionable in the bottom approval bar
225
-
226
- ### Imported Codex Sessions
227
-
228
- - Existing Codex rollouts can be imported from local session history
229
- - Imported sessions keep their own source metadata
230
- - Imported sessions can continue syncing after you open them
231
- - Native sessions are excluded from the import picker
232
-
233
- ### Timeline and Execution Flow
234
-
235
- - The UI renders semantic timeline items, not raw logs
236
- - Commands and patches can be grouped into lighter activity summaries
237
- - Running and failed commands remain visually important
238
- - The final thinking placeholder appears only at the end of the active flow
239
-
240
- ## Configuration
241
-
242
- Supported environment variables:
243
-
244
- - `PORT`
245
- - `DATABASE_PATH`
246
- - `PROJECT_ROOTS`
247
- - `CODEX_COMMAND`
248
- - `CODEX_MODE`
249
- - `REMOTE_HOSTS`
250
- - `ACTIVE_REMOTE_HOST`
251
-
252
- Notes:
253
-
254
- - The default runtime mode is `app-server`
255
- - `exec-json` is kept only as a fallback compatibility path
256
- - If `PROJECT_ROOTS` is not set, the app falls back to a broad local browsing root
257
-
258
- ## Project Structure
259
-
260
- ```text
261
- server/
262
- src/
263
- app.ts
264
- controllers/
265
- db/
266
- gateways/
267
- services/
268
- types/
269
- utils/
270
- web/
271
- index.html
272
- styles.css
273
- api.js
274
- session-ws.js
275
- app.js
276
- scripts/
277
- fix-node-pty-helper.js
278
- ```
271
+ **Control**
279
272
 
280
- ## Main Endpoints
273
+ - fine-grained approvals
274
+ - safer execution
281
275
 
282
- - `GET /health`
283
- - `GET /api/codex/mode`
284
- - `GET /api/codex/status`
285
- - `GET /api/codex/quota`
286
- - `GET /api/sessions`
287
- - `GET /api/sessions/:sessionId`
288
- - `GET /api/sessions/:sessionId/timeline`
289
- - `GET /api/sessions/:sessionId/events`
290
- - `POST /api/sessions`
291
- - `POST /api/sessions/:sessionId/messages`
292
- - `POST /api/sessions/:sessionId/stop`
293
- - `POST /api/sessions/:sessionId/approvals/:requestId`
294
- - `WS /ws/sessions/:sessionId`
276
+ **Continuity**
295
277
 
296
- ## What Is Not Finished Yet
278
+ - survive refresh / sleep
279
+ - stable long runs
297
280
 
298
- This is the honest list:
281
+ **Access**
299
282
 
300
- - no polished installer yet
301
- - no desktop packaging yet
302
- - no full automated test suite yet
303
- - no production-grade auth / multi-user hardening yet
304
- - no release pipeline yet
283
+ - control from any device
284
+
285
+ **Integration**
286
+
287
+ - IDE integrations
288
+ - optional sharing
289
+
290
+ ---
305
291
 
306
- If you are comfortable running a local Node app or a small CLI tool, you can use it today.
292
+ ## πŸ‘₯ Who it’s for
307
293
 
308
- ## Roadmap
294
+ - developers already using Codex
295
+ - people tired of terminal-only workflows
296
+ - anyone who wants **control, not just output**
297
+ - multi-device workflows
298
+
299
+ ---
300
+
301
+ ## ⚠️ What’s not finished yet
302
+
303
+ - no polished installer yet
304
+ - no desktop packaging
305
+ - no production-grade auth
306
+ - no release pipeline
309
307
 
310
- Near-term:
308
+ If you're comfortable running a local Node app β€”
309
+ you can use it today.
311
310
 
312
- - improve onboarding and installation
313
- - ship a cleaner public README and screenshots
314
- - add stronger regression coverage
315
- - harden long-running session recovery
316
- - continue refining the execution timeline UI
311
+ ---
317
312
 
318
- Later:
313
+ ## πŸ“„ License
319
314
 
320
- - improve the first-run install and update experience
321
- - optional sync / multi-device helpers
322
- - stronger sharing, auditing, and team workflows
315
+ MIT License
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DEFAULT_PORT = void 0;
6
7
  exports.resolvePackageRoot = resolvePackageRoot;
7
8
  exports.resolveDefaultDatabasePath = resolveDefaultDatabasePath;
8
9
  exports.startRemCodexServer = startRemCodexServer;
@@ -46,9 +47,10 @@ function resolvePackageRoot(startDir = __dirname) {
46
47
  function resolveDefaultDatabasePath() {
47
48
  return node_path_1.default.join((0, node_os_1.homedir)(), ".remcodex", "remcodex.db");
48
49
  }
50
+ exports.DEFAULT_PORT = 18840;
49
51
  function buildRemCodexServer(options = {}) {
50
52
  const repoRoot = options.repoRoot ? node_path_1.default.resolve(options.repoRoot) : resolvePackageRoot();
51
- const port = options.port ?? Number.parseInt(process.env.PORT ?? "3000", 10);
53
+ const port = options.port ?? Number.parseInt(process.env.PORT ?? String(exports.DEFAULT_PORT), 10);
52
54
  const databasePath = options.databasePath ??
53
55
  process.env.DATABASE_PATH ??
54
56
  resolveDefaultDatabasePath();
@@ -169,7 +169,7 @@ async function runStart(flags) {
169
169
  printError("Install Codex first, or set CODEX_COMMAND to the correct executable.");
170
170
  return 1;
171
171
  }
172
- const preferredPort = flags.port ?? Number.parseInt(process.env.PORT ?? "3000", 10);
172
+ const preferredPort = flags.port ?? Number.parseInt(process.env.PORT ?? String(app_1.DEFAULT_PORT), 10);
173
173
  const codexMode = process.env.CODEX_MODE === "exec-json" ? "exec-json" : "app-server";
174
174
  let started = null;
175
175
  let activePort = preferredPort;
@@ -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.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "Control Codex from anywhere. Even on your phone.",
5
5
  "license": "MIT",
6
6
  "bin": {