claude-remote-cli 1.7.1 → 1.7.2

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
@@ -17,14 +17,14 @@ claude-remote-cli
17
17
  git clone https://github.com/donovan-yohan/claude-remote-cli.git
18
18
  cd claude-remote-cli
19
19
  npm install
20
- node server/index.js
20
+ npm start
21
21
  ```
22
22
 
23
23
  On first launch you'll be prompted to set a PIN. Then open `http://localhost:3456` in your browser.
24
24
 
25
25
  ## Prerequisites
26
26
 
27
- - **Node.js 20+**
27
+ - **Node.js 24+**
28
28
  - **Claude Code CLI** installed and available in your PATH (or configure `claudeCommand` in config)
29
29
 
30
30
  ## Platform Support
@@ -38,6 +38,7 @@ Usage: claude-remote-cli [options]
38
38
  claude-remote-cli <command>
39
39
 
40
40
  Commands:
41
+ update Update to the latest version from npm
41
42
  install Install as a background service (survives reboot)
42
43
  uninstall Stop and remove the background service
43
44
  status Show whether the service is running
@@ -106,32 +107,45 @@ The PIN hash is stored in config under `pinHash`. To reset:
106
107
 
107
108
  - **PIN-protected access** with rate limiting
108
109
  - **Worktree isolation** — each session runs in its own Claude Code `--worktree`
109
- - **Resume sessions** — click inactive worktrees to reconnect
110
+ - **Resume sessions** — click inactive worktrees to reconnect with `--continue`
111
+ - **Persistent session names** — display names and timestamps survive server restarts
112
+ - **Clipboard image paste** — paste screenshots directly into remote terminal sessions (macOS clipboard + xclip on Linux)
113
+ - **Yolo mode** — skip permission prompts with `--dangerously-skip-permissions` (per-session checkbox or context menu)
114
+ - **Worktree cleanup** — delete inactive worktrees from the context menu (removes worktree, prunes refs, deletes branch)
110
115
  - **Sidebar filters** — filter by root directory, repo, or text search
111
- - **Inline rename** — rename sessions with the pencil icon (syncs with Claude Code's `/rename`)
116
+ - **Inline rename** — rename sessions with the pencil icon
112
117
  - **Scrollback buffer** — reconnect to a session and see prior output
113
- - **Touch toolbar** — mobile-friendly buttons for special keys (arrows, Enter, Escape, Ctrl+C, Tab, y/n)
118
+ - **Touch toolbar** — mobile-friendly buttons for special keys (hidden on desktop)
114
119
  - **Responsive layout** — works on desktop and mobile with slide-out sidebar
115
120
  - **Real-time updates** — worktree changes on disk are pushed to the browser instantly via WebSocket
121
+ - **Update notifications** — toast notification when a new version is available, with one-click update
122
+ - **CLI self-update** — `claude-remote-cli update` to update from npm
116
123
 
117
124
  ## Architecture
118
125
 
126
+ TypeScript + ESM backend compiled to `dist/`. Vanilla JS frontend (no build step).
127
+
119
128
  ```
120
129
  claude-remote-cli/
121
130
  ├── bin/
122
- │ └── claude-remote-cli.js # CLI entry point
131
+ │ └── claude-remote-cli.ts # CLI entry point
123
132
  ├── server/
124
- │ ├── index.js # Express server, REST API routes
125
- │ ├── sessions.js # PTY session manager (node-pty)
126
- │ ├── ws.js # WebSocket relay (PTY ↔ browser)
127
- │ ├── watcher.js # File watcher for .claude/worktrees/ changes
128
- │ ├── auth.js # PIN hashing, verification, rate limiting
129
- └── config.js # Config loading/saving
133
+ │ ├── index.ts # Express server, REST API routes
134
+ │ ├── sessions.ts # PTY session manager (node-pty)
135
+ │ ├── ws.ts # WebSocket relay (PTY ↔ browser)
136
+ │ ├── watcher.ts # File watcher for .claude/worktrees/ changes
137
+ │ ├── auth.ts # PIN hashing, verification, rate limiting
138
+ ├── config.ts # Config loading/saving, worktree metadata
139
+ │ ├── clipboard.ts # System clipboard operations (image paste)
140
+ │ ├── service.ts # Background service management (launchd/systemd)
141
+ │ └── types.ts # Shared TypeScript interfaces
130
142
  ├── public/
131
- │ ├── index.html # Single-page app
132
- │ ├── app.js # Frontend logic
133
- │ ├── style.css # Styles (dark theme)
134
- │ └── vendor/ # Self-hosted xterm.js + addon-fit
143
+ │ ├── index.html # Single-page app
144
+ │ ├── app.js # Frontend logic (ES5, no build step)
145
+ │ ├── style.css # Styles (dark theme)
146
+ │ └── vendor/ # Self-hosted xterm.js + addon-fit
147
+ ├── test/ # Unit tests (node:test)
148
+ ├── dist/ # Compiled output (gitignored)
135
149
  ├── config.example.json
136
150
  └── package.json
137
151
  ```
@@ -332,21 +332,26 @@ async function main() {
332
332
  let args;
333
333
  let cwd;
334
334
  let worktreeName;
335
+ let sessionRepoPath;
335
336
  if (worktreePath) {
336
337
  // Resume existing worktree — run claude --continue inside the worktree directory
337
338
  args = ['--continue', ...baseArgs];
338
339
  cwd = worktreePath;
340
+ sessionRepoPath = worktreePath;
339
341
  worktreeName = worktreePath.split('/').pop() || '';
340
342
  }
341
343
  else {
342
- // New worktree
344
+ // New worktree — PTY spawns in the repo root (so `claude --worktree X` works),
345
+ // but repoPath points to the expected worktree dir for identity/metadata matching
343
346
  worktreeName = 'mobile-' + name + '-' + Date.now().toString(36);
344
347
  args = ['--worktree', worktreeName, ...baseArgs];
345
348
  cwd = repoPath;
349
+ sessionRepoPath = path.join(repoPath, '.claude', 'worktrees', worktreeName);
346
350
  }
347
351
  const session = sessions.create({
348
352
  repoName: name,
349
- repoPath: cwd,
353
+ repoPath: sessionRepoPath,
354
+ cwd,
350
355
  root,
351
356
  worktreeName,
352
357
  displayName: worktreeName,
@@ -6,7 +6,7 @@ import path from 'node:path';
6
6
  import { readMeta, writeMeta } from './config.js';
7
7
  // In-memory registry: id -> Session
8
8
  const sessions = new Map();
9
- function create({ repoName, repoPath, root, worktreeName, displayName, command, args = [], cols = 80, rows = 24, configPath }) {
9
+ function create({ repoName, repoPath, cwd, root, worktreeName, displayName, command, args = [], cols = 80, rows = 24, configPath }) {
10
10
  const id = crypto.randomBytes(8).toString('hex');
11
11
  const createdAt = new Date().toISOString();
12
12
  // Strip CLAUDECODE env var to allow spawning claude inside a claude-managed server
@@ -16,7 +16,7 @@ function create({ repoName, repoPath, root, worktreeName, displayName, command,
16
16
  name: 'xterm-256color',
17
17
  cols,
18
18
  rows,
19
- cwd: repoPath,
19
+ cwd: cwd || repoPath,
20
20
  env,
21
21
  });
22
22
  // Scrollback buffer: stores all PTY output so we can replay on WebSocket (re)connect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-remote-cli",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Remote web interface for Claude Code CLI sessions",
5
5
  "type": "module",
6
6
  "main": "dist/server/index.js",