remcodex 0.1.0-beta.11 β†’ 0.1.0-beta.12

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RemCodex contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,104 @@
1
- # RemCodex
1
+ # πŸš€ RemCodex
2
2
 
3
- > Control Codex from anywhere. Even on your phone.
3
+ > Remote control for Codex.
4
+ > From your browser and phone.
4
5
 
5
- RemCodex is a local-first web UI for running, reviewing, approving, and resuming Codex sessions from your browser.
6
+ Run Codex on one machine.
7
+ Monitor, approve, and control the same session from another.
6
8
 
7
- It is built for the real workflow: long-running sessions, mobile check-ins, approval prompts, imported rollout history, and timeline-style execution flow.
9
+ 🌐 https://remcodex.com
8
10
 
9
- - Watch live Codex runs without staying in the terminal
10
- - Approve sensitive actions from a cleaner UI
11
- - Pick up the same session again after refresh, sleep, or reconnect
11
+ > Not a remote desktop. Not a proxy.
12
+ > A local-first way to control Codex away from the terminal.
12
13
 
13
- ## Status
14
+ ![RemCodex hero cover](docs/assets/hero-cover.png)
14
15
 
15
- This project is currently a **beta / developer preview**.
16
+ ---
16
17
 
17
- It is already usable for local and internal workflows, but it is not yet packaged as a one-click desktop app.
18
+ ## ✨ What is RemCodex?
18
19
 
19
- ## Why People Use It
20
+ RemCodex is **remote control for Codex**.
20
21
 
21
- Codex is powerful in the terminal, but many real workflows need a better control surface:
22
+ It lets you start Codex on one machine, then keep the same session visible,
23
+ interruptible, and controllable from another.
22
24
 
23
- - checking progress from your phone
24
- - watching a long run without babysitting a terminal window
25
- - approving writes from a cleaner interface
26
- - reopening a session after refresh, sleep, or reconnect
27
- - reviewing imported rollout history next to native sessions
25
+ - πŸ‘€ See what the AI is doing β€” in real time
26
+ - βœ… Approve or reject actions before execution
27
+ - ⏹ Interrupt or stop at any moment
28
+ - πŸ“± Access your session from any device
29
+ - πŸ”„ Sessions don’t break β€” they resume
28
30
 
29
- RemCodex turns Codex's event stream into a browser-based workspace that is easier to follow, easier to resume, and easier to operate.
31
+ > One session. Any device.
30
32
 
31
- ## What It Does
33
+ ---
32
34
 
33
- - Run Codex sessions from a browser
34
- - View sessions in a single-page workspace with a sidebar and execution timeline
35
- - Follow streaming assistant output, commands, patches, and approvals
36
- - Approve or reject file-system actions from the UI
37
- - Import existing Codex rollout sessions from `~/.codex/sessions/...`
38
- - Keep imported sessions in sync while they are still active
39
- - Resume stale sessions after the page comes back from background
40
- - Work well on desktop and on mobile
35
+ ## 🎬 A real workflow
41
36
 
42
- ## Screenshots
37
+ You start a long Codex session on your machine.
38
+
39
+ Then you leave your desk.
40
+
41
+ On your phone:
42
+
43
+ - you see progress in real time
44
+ - you receive an approval request
45
+ - you approve it
46
+
47
+ The session continues instantly.
48
+
49
+ > Everything else can disconnect β€” your session won’t.
50
+
51
+ ---
52
+
53
+ ## πŸ”₯ Why RemCodex exists
54
+
55
+ AI coding agents are powerful.
56
+ But today, they run like a black box.
57
+
58
+ You either:
59
+
60
+ - trust everything blindly
61
+ - or sit in front of your terminal watching it
62
+
63
+ RemCodex fixes that.
64
+
65
+ > AI is no longer a black box.
66
+
67
+ ---
68
+
69
+ ## ⚑ What it does
70
+
71
+ - Real-time execution timeline (messages, commands, approvals)
72
+ - Human-in-the-loop command approval
73
+ - Multi-device access to the same live session
74
+ - Resume after refresh, sleep, or reconnect
75
+ - Browser-based UI β€” **no extra client required**
76
+ - Works with Codex CLI
77
+
78
+ > No extra client install. Just open a browser.
79
+ > Your code never leaves your machine.
80
+
81
+ ---
82
+
83
+ ## πŸš€ Quick start
84
+
85
+ ```bash
86
+ npx remcodex
87
+ ```
88
+
89
+ Then open:
90
+
91
+ http://127.0.0.1:18840
92
+
93
+ Access from another device:
94
+
95
+ http://<your-ip>:18840
96
+
97
+ > Runs entirely on your local machine. No cloud, no data upload.
98
+
99
+ ---
100
+
101
+ ## πŸ–₯ Screenshots
43
102
 
44
103
  ![RemCodex desktop workspace](docs/assets/hero-desktop.png)
45
104
 
@@ -55,268 +114,203 @@ RemCodex turns Codex's event stream into a browser-based workspace that is easie
55
114
 
56
115
  ![RemCodex imported Codex session](docs/assets/imported-session.png)
57
116
 
58
- > Bring imported Codex rollouts into the same workspace and keep them easy to review.
117
+ > Bring imported Codex rollouts into the same workspace.
59
118
 
60
- ## Who It Is For
119
+ ---
61
120
 
62
- - developers who already use Codex locally
63
- - people who want a browser-based control surface instead of raw terminal watching
64
- - teams who want to review or monitor runs from another device on the same network
65
- - anyone who wants approvals, timeline view, and imported rollout history in one place
121
+ ## 🧠 What it actually is
66
122
 
67
- ## Screens It Aims To Replace
123
+ RemCodex is a **browser-based workspace for Codex sessions**.
68
124
 
69
- - terminal-only session watching
70
- - ad-hoc mobile remote desktop checks
71
- - raw log scrolling for approvals and command progress
72
- - fragmented session history between local and imported rollouts
125
+ It is built for real workflows:
73
126
 
74
- ## Current Product Shape
127
+ - long-running sessions
128
+ - mobile check-ins
129
+ - approval prompts
130
+ - imported rollout history
131
+ - timeline-style execution flow
132
+
133
+ Instead of raw terminal logs, you get a structured, visual timeline you can follow and control.
134
+
135
+ ---
136
+
137
+ ## 🧩 Current product shape
75
138
 
76
139
  - Single-page workspace UI
77
140
  - Left sidebar for session navigation
78
- - Right-side timeline / execution flow for the active session
79
- - Fixed composer at the bottom
141
+ - Right-side execution timeline
142
+ - Fixed input composer
80
143
  - Semantic timeline rendering for:
81
- - user messages
82
- - assistant commentary / final messages
83
- - thinking
84
- - commands
85
- - patches
86
- - approvals
87
- - system events
144
+ - user messages
145
+ - assistant output
146
+ - thinking
147
+ - commands
148
+ - patches
149
+ - approvals
150
+ - system events
88
151
 
89
- ## Tech Stack
152
+ ---
90
153
 
91
- - Backend: Node.js + TypeScript + Express + WebSocket
92
- - Database: SQLite via `better-sqlite3`
93
- - Terminal/runtime integration: `node-pty` + Codex app-server
94
- - Frontend: zero-build static web app (`web/`)
95
- - Markdown rendering: `markdown-it`
154
+ ## βš™οΈ Key behaviors
96
155
 
97
- ## Requirements
156
+ ### Approvals
98
157
 
99
- Before running this project, you should have:
158
+ - Writes inside working area β†’ auto allowed
159
+ - Writes outside β†’ require approval
160
+ - `Allow once` / `Allow for this turn` supported
161
+ - Approval history stays visible in timeline
100
162
 
101
- - Node.js 20.x installed
102
- - Codex CLI installed and already working locally
103
- - A machine where this app can access your local Codex data and working directories
163
+ ---
104
164
 
105
- This project is currently developed primarily around a local macOS workflow.
165
+ ### Timeline
106
166
 
107
- ## Quick Start
167
+ - Semantic rendering (not raw logs)
168
+ - Commands grouped into readable activity blocks
169
+ - Running / failed states clearly visible
170
+ - Smooth streaming + recovery after refresh
108
171
 
109
- For the current developer preview, the recommended local install path is:
172
+ ---
110
173
 
111
- ```bash
112
- npm install
113
- npm run build
114
- npm link
115
- remcodex start
116
- ```
174
+ ### Imported sessions
117
175
 
118
- If you switch Node.js versions later, reinstall dependencies and relink or reinstall `remcodex`.
176
+ - Import from `~/.codex/sessions/...`
177
+ - Keep syncing if still active
178
+ - Unified view with native sessions
119
179
 
120
- Then open:
180
+ ---
121
181
 
122
- ```text
123
- http://127.0.0.1:3000
182
+ ## 🧠 Architecture
183
+
184
+ ```
185
+ Codex CLI β†’ Event stream β†’ Semantic layer β†’ Timeline β†’ Web UI
124
186
  ```
125
187
 
126
- 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.
188
+ ---
127
189
 
128
- ## Local CLI
190
+ ## βš™οΈ Requirements
129
191
 
130
- RemCodex already ships with a local CLI entrypoint, even though the npm package is not published yet.
192
+ - Node.js
193
+ - Codex CLI (already working locally)
131
194
 
132
- If you do not want to run `npm link`, you can call the built CLI directly:
195
+ ---
133
196
 
134
- ```bash
135
- node dist/server/src/cli.js start --no-open
136
- ```
197
+ ## βš™οΈ Configuration
137
198
 
138
- Useful commands:
199
+ Default port: **18840**
139
200
 
140
201
  ```bash
141
- node dist/server/src/cli.js doctor
142
- node dist/server/src/cli.js start --no-open
143
- node dist/server/src/cli.js version
202
+ PORT=18841 npx remcodex
144
203
  ```
145
204
 
146
- Published package note:
205
+ ---
147
206
 
148
- - the npm package currently expects Node.js 20.x
149
- - if `better-sqlite3` or `node-pty` reports a native module / `NODE_MODULE_VERSION` error, reinstall `remcodex` under the same Node.js version you will use to run it
207
+ ## πŸ“¦ Install FAQ
150
208
 
151
- Use a specific database:
209
+ ### Why does `npx remcodex` hang on Linux?
152
210
 
153
- ```bash
154
- node dist/server/src/cli.js start --db ~/.remcodex/remcodex-demo.db --no-open
155
- node dist/server/src/cli.js doctor --db ~/.remcodex/remcodex-demo.db
156
- ```
211
+ First install may compile native deps:
157
212
 
158
- Planned install target after the npm package is published:
213
+ - `better-sqlite3`
214
+ - `node-pty`
159
215
 
160
- ```bash
161
- npx remcodex
162
- ```
216
+ Make sure you have:
163
217
 
164
- ## Development
218
+ - `python3`
219
+ - `make`
220
+ - `g++`
165
221
 
166
- ```bash
167
- npm install
168
- npm run dev
169
- ```
222
+ ---
170
223
 
171
- Smoke-test the published-package shape locally:
224
+ ### Debug install issues
172
225
 
173
226
  ```bash
174
- npm run smoke:tarball
227
+ npm install -g remcodex
228
+ remcodex doctor
229
+ remcodex start
175
230
  ```
176
231
 
177
- Smoke-test a real isolated startup and `/health` check:
232
+ ---
233
+
234
+ ### Headless mode
178
235
 
179
236
  ```bash
180
- npm run smoke:start
237
+ npx remcodex --no-open
181
238
  ```
182
239
 
183
- ## How It Works
184
-
185
- The app uses `codex app-server` as the primary runtime path.
240
+ ---
186
241
 
187
- At a high level:
242
+ ## πŸ”§ How it works
188
243
 
189
- 1. Codex emits semantic events
190
- 2. The backend stores them in SQLite
191
- 3. The frontend reads an aggregated timeline view for initial load
192
- 4. Live updates continue over WebSocket with catch-up after refresh
244
+ 1. Codex emits events
245
+ 2. Backend stores them (SQLite)
246
+ 3. Frontend loads timeline snapshot
247
+ 4. Live updates stream via WebSocket
193
248
 
194
- This gives the UI:
249
+ Result:
195
250
 
196
- - smooth streaming
197
251
  - recoverable sessions
198
- - imported rollout support
199
- - a consistent execution timeline instead of raw terminal logs
252
+ - real-time UI
253
+ - consistent execution flow
200
254
 
201
- ## Key Behaviors
255
+ ---
202
256
 
203
- ### Approvals
257
+ ## πŸ“Š Status
204
258
 
205
- - Writes inside the working area usually pass directly
206
- - Writes outside the working area trigger approval
207
- - `Allow once` approves only the current request
208
- - `Allow for this turn` expands writable roots for the active turn
209
- - Historical approval records stay visible in the timeline
210
- - Only live approvals stay actionable in the bottom approval bar
259
+ - Beta / developer preview
260
+ - Local-first architecture
261
+ - No cloud dependency
211
262
 
212
- ### Imported Codex Sessions
263
+ ---
213
264
 
214
- - Existing Codex rollouts can be imported from local session history
215
- - Imported sessions keep their own source metadata
216
- - Imported sessions can continue syncing after you open them
217
- - Native sessions are excluded from the import picker
265
+ ## πŸ—Ί Roadmap
218
266
 
219
- ### Timeline and Execution Flow
267
+ **Visibility**
220
268
 
221
- - The UI renders semantic timeline items, not raw logs
222
- - Commands and patches can be grouped into lighter activity summaries
223
- - Running and failed commands remain visually important
224
- - The final thinking placeholder appears only at the end of the active flow
269
+ - fully observable execution
270
+ - clear action timeline
225
271
 
226
- ## Configuration
272
+ **Control**
227
273
 
228
- Supported environment variables:
274
+ - fine-grained approvals
275
+ - safer execution
229
276
 
230
- - `PORT`
231
- - `DATABASE_PATH`
232
- - `PROJECT_ROOTS`
233
- - `CODEX_COMMAND`
234
- - `CODEX_MODE`
277
+ **Continuity**
235
278
 
236
- For launch screenshots or demo data, you can rebuild a clean demo database with:
279
+ - survive refresh / sleep
280
+ - stable long runs
237
281
 
238
- ```bash
239
- DATABASE_PATH="$HOME/.remcodex/remcodex-demo.db" ~/.nvm/versions/node/v20.19.5/bin/node scripts/seed-launch-demo-data.js --clean
240
- ```
241
- - `REMOTE_HOSTS`
242
- - `ACTIVE_REMOTE_HOST`
243
-
244
- Notes:
245
-
246
- - The default runtime mode is `app-server`
247
- - `exec-json` is kept only as a fallback compatibility path
248
- - If `PROJECT_ROOTS` is not set, the app falls back to a broad local browsing root
249
-
250
- ## Project Structure
251
-
252
- ```text
253
- server/
254
- src/
255
- app.ts
256
- controllers/
257
- db/
258
- gateways/
259
- services/
260
- types/
261
- utils/
262
- web/
263
- index.html
264
- styles.css
265
- api.js
266
- session-ws.js
267
- app.js
268
- scripts/
269
- fix-node-pty-helper.js
270
- import-codex-rollout.js
271
- reset-semantic-demo-data.js
272
- ```
282
+ **Access**
273
283
 
274
- ## Main Endpoints
284
+ - control from any device
275
285
 
276
- - `GET /health`
277
- - `GET /api/codex/mode`
278
- - `GET /api/codex/status`
279
- - `GET /api/codex/quota`
280
- - `GET /api/sessions`
281
- - `GET /api/sessions/:sessionId`
282
- - `GET /api/sessions/:sessionId/timeline`
283
- - `GET /api/sessions/:sessionId/events`
284
- - `POST /api/sessions`
285
- - `POST /api/sessions/:sessionId/messages`
286
- - `POST /api/sessions/:sessionId/stop`
287
- - `POST /api/sessions/:sessionId/approvals/:requestId`
288
- - `WS /ws/sessions/:sessionId`
286
+ **Integration**
289
287
 
290
- ## What Is Not Finished Yet
288
+ - IDE integrations
289
+ - optional sharing
291
290
 
292
- This is the honest list:
291
+ ---
293
292
 
294
- - no polished installer yet
295
- - no desktop packaging yet
296
- - no full automated test suite yet
297
- - no production-grade auth / multi-user hardening yet
298
- - no release pipeline yet
299
-
300
- If you are comfortable cloning a repo and running a local Node app, you can use it today.
293
+ ## πŸ‘₯ Who it’s for
301
294
 
302
- ## Roadmap
295
+ - developers already using Codex
296
+ - people tired of terminal-only workflows
297
+ - anyone who wants **control, not just output**
298
+ - multi-device workflows
303
299
 
304
- Near-term:
300
+ ---
305
301
 
306
- - improve onboarding and installation
307
- - ship a cleaner public README and screenshots
308
- - add stronger regression coverage
309
- - harden long-running session recovery
310
- - continue refining the execution timeline UI
302
+ ## ⚠️ What’s not finished yet
311
303
 
312
- Later:
304
+ - no polished installer yet
305
+ - no desktop packaging
306
+ - no production-grade auth
307
+ - no release pipeline
313
308
 
314
- - package for easier local install
315
- - optional sync / multi-device helpers
316
- - stronger sharing, auditing, and team workflows
309
+ If you're comfortable running a local Node app β€”
310
+ you can use it today.
317
311
 
318
- ## License
312
+ ---
319
313
 
320
- No license has been added yet.
314
+ ## πŸ“„ License
321
315
 
322
- Until a license is added, assume this repository is **source-available for review only**, not open source for reuse.
316
+ MIT License
@@ -25,7 +25,7 @@ const command_1 = require("./utils/command");
25
25
  const errors_1 = require("./utils/errors");
26
26
  function buildRemCodexServer(options = {}) {
27
27
  const repoRoot = options.repoRoot ? node_path_1.default.resolve(options.repoRoot) : (0, runtime_paths_1.resolvePackageRoot)();
28
- const port = options.port ?? Number.parseInt(process.env.PORT ?? "3000", 10);
28
+ const port = options.port ?? Number.parseInt(process.env.PORT ?? "18840", 10);
29
29
  const databasePath = options.databasePath ??
30
30
  process.env.DATABASE_PATH ??
31
31
  (0, runtime_paths_1.resolveDefaultDatabasePath)();
@@ -226,7 +226,7 @@ async function runStart(flags) {
226
226
  printError("Install Codex first, or set CODEX_COMMAND to the correct executable.");
227
227
  return 1;
228
228
  }
229
- const preferredPort = flags.port ?? Number.parseInt(process.env.PORT ?? "3000", 10);
229
+ const preferredPort = flags.port ?? Number.parseInt(process.env.PORT ?? "18840", 10);
230
230
  const codexMode = process.env.CODEX_MODE === "exec-json" ? "exec-json" : "app-server";
231
231
  let started = null;
232
232
  let activePort = preferredPort;
@@ -279,6 +279,17 @@ class SessionManager {
279
279
  seq: event.seq,
280
280
  };
281
281
  }
282
+ stopSession(sessionId) {
283
+ const runtime = this.runners.get(sessionId);
284
+ if (!runtime || !runtime.runner.isAlive()) {
285
+ this.setStatus(sessionId, "idle");
286
+ return { accepted: true };
287
+ }
288
+ runtime.stopRequested = true;
289
+ this.setStatus(sessionId, "stopping");
290
+ runtime.runner.stop();
291
+ return { accepted: true };
292
+ }
282
293
  retryApprovalRequest(sessionId, requestId, codexLaunch) {
283
294
  const session = this.getSessionOrThrow(sessionId);
284
295
  const project = this.options.projectManager.getProject(session.project_id);
@@ -303,17 +314,6 @@ class SessionManager {
303
314
  turnId,
304
315
  };
305
316
  }
306
- stopSession(sessionId) {
307
- const runtime = this.runners.get(sessionId);
308
- if (!runtime || !runtime.runner.isAlive()) {
309
- this.setStatus(sessionId, "idle");
310
- return { accepted: true };
311
- }
312
- runtime.stopRequested = true;
313
- this.setStatus(sessionId, "stopping");
314
- runtime.runner.stop();
315
- return { accepted: true };
316
- }
317
317
  resolveApproval(sessionId, requestId, decision) {
318
318
  const runtime = this.runners.get(sessionId);
319
319
  if (!runtime?.runner.isAlive()) {
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "remcodex",
3
- "version": "0.1.0-beta.11",
3
+ "version": "0.1.0-beta.12",
4
4
  "description": "Control Codex from anywhere. Even on your phone.",
5
- "license": "UNLICENSED",
6
- "engines": {
7
- "node": "20.x"
8
- },
5
+ "license": "MIT",
9
6
  "bin": {
10
7
  "remcodex": "dist/server/src/cli.js"
11
8
  },
@@ -14,16 +11,15 @@
14
11
  "web",
15
12
  "scripts/check-node-version.js",
16
13
  "scripts/fix-node-pty-helper.js",
17
- "README.md",
18
- "docs/assets"
14
+ "README.md"
19
15
  ],
20
16
  "scripts": {
21
- "preinstall": "node scripts/check-node-version.js",
22
17
  "postinstall": "node scripts/fix-node-pty-helper.js",
23
18
  "dev": "tsx watch server/src/app.ts",
24
19
  "start": "tsx server/src/cli.ts --no-open",
25
20
  "build": "tsc -p tsconfig.json && node scripts/copy-db-assets.js",
26
21
  "cli": "tsx server/src/cli.ts --no-open",
22
+ "preinstall": "node scripts/check-node-version.js",
27
23
  "smoke:tarball": "node scripts/smoke-test-tarball.js",
28
24
  "smoke:start": "node scripts/smoke-start-tarball.js"
29
25
  },
@@ -40,5 +36,8 @@
40
36
  "@types/ws": "^8.5.14",
41
37
  "tsx": "^4.19.3",
42
38
  "typescript": "^5.8.2"
39
+ },
40
+ "engines": {
41
+ "node": "20.x"
43
42
  }
44
43
  }
Binary file
Binary file
Binary file
Binary file