remcodex 0.1.0-beta.7 β†’ 0.1.0-beta.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/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,249 +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.
118
+
119
+ ---
59
120
 
60
- ## Who It Is For
121
+ ## 🧠 What it actually is
61
122
 
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
123
+ RemCodex is a **browser-based workspace for Codex sessions**.
66
124
 
67
- ## Screens It Aims To Replace
125
+ It is built for real workflows:
68
126
 
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
127
+ - long-running sessions
128
+ - mobile check-ins
129
+ - approval prompts
130
+ - imported rollout history
131
+ - timeline-style execution flow
73
132
 
74
- ## Current Product Shape
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 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
- Then open:
176
+ - Import from `~/.codex/sessions/...`
177
+ - Keep syncing if still active
178
+ - Unified view with native sessions
179
+
180
+ ---
119
181
 
120
- ```text
121
- http://127.0.0.1:3000
182
+ ## 🧠 Architecture
183
+
184
+ ```
185
+ Codex CLI β†’ Event stream β†’ Semantic layer β†’ Timeline β†’ Web UI
122
186
  ```
123
187
 
124
- 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
+ ---
125
189
 
126
- ## Local CLI
190
+ ## βš™οΈ Requirements
127
191
 
128
- 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)
129
194
 
130
- If you do not want to run `npm link`, you can call the built CLI directly:
195
+ ---
131
196
 
132
- ```bash
133
- node dist/server/src/cli.js start --no-open
134
- ```
197
+ ## βš™οΈ Configuration
135
198
 
136
- Useful commands:
199
+ Default port: **18840**
137
200
 
138
201
  ```bash
139
- node dist/server/src/cli.js doctor
140
- node dist/server/src/cli.js start --no-open
141
- node dist/server/src/cli.js version
202
+ PORT=18841 npx remcodex
142
203
  ```
143
204
 
144
- Use a specific database:
205
+ ---
145
206
 
146
- ```bash
147
- node dist/server/src/cli.js start --db ~/.remcodex/remcodex-demo.db --no-open
148
- node dist/server/src/cli.js doctor --db ~/.remcodex/remcodex-demo.db
149
- ```
207
+ ## πŸ“¦ Install FAQ
208
+
209
+ ### Why does `npx remcodex` hang on Linux?
210
+
211
+ First install may compile native deps:
150
212
 
151
- Planned install target after the npm package is published:
213
+ - `better-sqlite3`
214
+ - `node-pty`
215
+
216
+ Make sure you have:
217
+
218
+ - `python3`
219
+ - `make`
220
+ - `g++`
221
+
222
+ ---
223
+
224
+ ### Debug install issues
152
225
 
153
226
  ```bash
154
- npx remcodex
227
+ npm install -g remcodex
228
+ remcodex doctor
229
+ remcodex start
155
230
  ```
156
231
 
157
- ## Development
232
+ ---
233
+
234
+ ### Headless mode
158
235
 
159
236
  ```bash
160
- npm install
161
- npm run dev
237
+ npx remcodex --no-open
162
238
  ```
163
239
 
164
- ## How It Works
165
-
166
- The app uses `codex app-server` as the primary runtime path.
240
+ ---
167
241
 
168
- At a high level:
242
+ ## πŸ”§ How it works
169
243
 
170
- 1. Codex emits semantic events
171
- 2. The backend stores them in SQLite
172
- 3. The frontend reads an aggregated timeline view for initial load
173
- 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
174
248
 
175
- This gives the UI:
249
+ Result:
176
250
 
177
- - smooth streaming
178
251
  - recoverable sessions
179
- - imported rollout support
180
- - a consistent execution timeline instead of raw terminal logs
252
+ - real-time UI
253
+ - consistent execution flow
181
254
 
182
- ## Key Behaviors
255
+ ---
183
256
 
184
- ### Approvals
257
+ ## πŸ“Š Status
185
258
 
186
- - Writes inside the working area usually pass directly
187
- - Writes outside the working area trigger approval
188
- - `Allow once` approves only the current request
189
- - `Allow for this turn` expands writable roots for the active turn
190
- - Historical approval records stay visible in the timeline
191
- - Only live approvals stay actionable in the bottom approval bar
259
+ - Beta / developer preview
260
+ - Local-first architecture
261
+ - No cloud dependency
192
262
 
193
- ### Imported Codex Sessions
263
+ ---
194
264
 
195
- - Existing Codex rollouts can be imported from local session history
196
- - Imported sessions keep their own source metadata
197
- - Imported sessions can continue syncing after you open them
198
- - Native sessions are excluded from the import picker
265
+ ## πŸ—Ί Roadmap
199
266
 
200
- ### Timeline and Execution Flow
267
+ **Visibility**
201
268
 
202
- - The UI renders semantic timeline items, not raw logs
203
- - Commands and patches can be grouped into lighter activity summaries
204
- - Running and failed commands remain visually important
205
- - The final thinking placeholder appears only at the end of the active flow
269
+ - fully observable execution
270
+ - clear action timeline
206
271
 
207
- ## Configuration
272
+ **Control**
208
273
 
209
- Supported environment variables:
274
+ - fine-grained approvals
275
+ - safer execution
210
276
 
211
- - `PORT`
212
- - `DATABASE_PATH`
213
- - `PROJECT_ROOTS`
214
- - `CODEX_COMMAND`
215
- - `CODEX_MODE`
277
+ **Continuity**
216
278
 
217
- For launch screenshots or demo data, you can rebuild a clean demo database with:
279
+ - survive refresh / sleep
280
+ - stable long runs
218
281
 
219
- ```bash
220
- DATABASE_PATH="$HOME/.remcodex/remcodex-demo.db" ~/.nvm/versions/node/v20.19.5/bin/node scripts/seed-launch-demo-data.js --clean
221
- ```
222
- - `REMOTE_HOSTS`
223
- - `ACTIVE_REMOTE_HOST`
224
-
225
- Notes:
226
-
227
- - The default runtime mode is `app-server`
228
- - `exec-json` is kept only as a fallback compatibility path
229
- - If `PROJECT_ROOTS` is not set, the app falls back to a broad local browsing root
230
-
231
- ## Project Structure
232
-
233
- ```text
234
- server/
235
- src/
236
- app.ts
237
- controllers/
238
- db/
239
- gateways/
240
- services/
241
- types/
242
- utils/
243
- web/
244
- index.html
245
- styles.css
246
- api.js
247
- session-ws.js
248
- app.js
249
- scripts/
250
- fix-node-pty-helper.js
251
- import-codex-rollout.js
252
- reset-semantic-demo-data.js
253
- ```
282
+ **Access**
254
283
 
255
- ## Main Endpoints
284
+ - control from any device
256
285
 
257
- - `GET /health`
258
- - `GET /api/codex/mode`
259
- - `GET /api/codex/status`
260
- - `GET /api/codex/quota`
261
- - `GET /api/sessions`
262
- - `GET /api/sessions/:sessionId`
263
- - `GET /api/sessions/:sessionId/timeline`
264
- - `GET /api/sessions/:sessionId/events`
265
- - `POST /api/sessions`
266
- - `POST /api/sessions/:sessionId/messages`
267
- - `POST /api/sessions/:sessionId/stop`
268
- - `POST /api/sessions/:sessionId/approvals/:requestId`
269
- - `WS /ws/sessions/:sessionId`
286
+ **Integration**
270
287
 
271
- ## What Is Not Finished Yet
288
+ - IDE integrations
289
+ - optional sharing
272
290
 
273
- This is the honest list:
291
+ ---
274
292
 
275
- - no polished installer yet
276
- - no desktop packaging yet
277
- - no full automated test suite yet
278
- - no production-grade auth / multi-user hardening yet
279
- - no release pipeline yet
280
-
281
- If you are comfortable cloning a repo and running a local Node app, you can use it today.
293
+ ## πŸ‘₯ Who it’s for
282
294
 
283
- ## 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
284
299
 
285
- Near-term:
300
+ ---
286
301
 
287
- - improve onboarding and installation
288
- - ship a cleaner public README and screenshots
289
- - add stronger regression coverage
290
- - harden long-running session recovery
291
- - continue refining the execution timeline UI
302
+ ## ⚠️ What’s not finished yet
292
303
 
293
- Later:
304
+ - no polished installer yet
305
+ - no desktop packaging
306
+ - no production-grade auth
307
+ - no release pipeline
294
308
 
295
- - package for easier local install
296
- - optional sync / multi-device helpers
297
- - stronger sharing, auditing, and team workflows
309
+ If you're comfortable running a local Node app β€”
310
+ you can use it today.
298
311
 
299
- ## License
312
+ ---
300
313
 
301
- No license has been added yet.
314
+ ## πŸ“„ License
302
315
 
303
- Until a license is added, assume this repository is **source-available for review only**, not open source for reuse.
316
+ 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;
@@ -277,6 +277,17 @@ class SessionManager {
277
277
  seq: event.seq,
278
278
  };
279
279
  }
280
+ stopSession(sessionId) {
281
+ const runtime = this.runners.get(sessionId);
282
+ if (!runtime || !runtime.runner.isAlive()) {
283
+ this.setStatus(sessionId, "idle");
284
+ return { accepted: true };
285
+ }
286
+ runtime.stopRequested = true;
287
+ this.setStatus(sessionId, "stopping");
288
+ runtime.runner.stop();
289
+ return { accepted: true };
290
+ }
280
291
  retryApprovalRequest(sessionId, requestId, codexLaunch) {
281
292
  const session = this.getSessionOrThrow(sessionId);
282
293
  const project = this.options.projectManager.getProject(session.project_id);
@@ -301,17 +312,6 @@ class SessionManager {
301
312
  turnId,
302
313
  };
303
314
  }
304
- stopSession(sessionId) {
305
- const runtime = this.runners.get(sessionId);
306
- if (!runtime || !runtime.runner.isAlive()) {
307
- this.setStatus(sessionId, "idle");
308
- return { accepted: true };
309
- }
310
- runtime.stopRequested = true;
311
- this.setStatus(sessionId, "stopping");
312
- runtime.runner.stop();
313
- return { accepted: true };
314
- }
315
315
  resolveApproval(sessionId, requestId, decision) {
316
316
  const runtime = this.runners.get(sessionId);
317
317
  if (!runtime?.runner.isAlive()) {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "remcodex",
3
- "version": "0.1.0-beta.7",
3
+ "version": "0.1.0-beta.8",
4
4
  "description": "Control Codex from anywhere. Even on your phone.",
5
- "license": "UNLICENSED",
5
+ "license": "MIT",
6
6
  "bin": {
7
7
  "remcodex": "dist/server/src/cli.js"
8
8
  },
@@ -10,8 +10,7 @@
10
10
  "dist",
11
11
  "web",
12
12
  "scripts/fix-node-pty-helper.js",
13
- "README.md",
14
- "docs/assets"
13
+ "README.md"
15
14
  ],
16
15
  "scripts": {
17
16
  "postinstall": "node scripts/fix-node-pty-helper.js",
Binary file
Binary file
Binary file
Binary file