ghostterm 1.0.2 → 1.0.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 +27 -25
- package/bin/ghostterm.js +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,31 +6,32 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## Screenshots
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="https://ghostterm.pages.dev/img/claude-code.jpg" width="250" alt="Claude Code running on phone">
|
|
13
|
+
<img src="https://ghostterm.pages.dev/img/terminal.jpg" width="250" alt="Terminal with dangerous mode">
|
|
14
|
+
<img src="https://ghostterm.pages.dev/img/pixel-office.jpg" width="250" alt="4 terminal sessions">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<em>Left: Claude Code with <code>--dangerously-skip-permissions</code> running on your phone</em><br>
|
|
19
|
+
<em>Center: Full terminal + custom shortcut keys (y/n, Tab, Ctrl+C, arrows...)</em><br>
|
|
20
|
+
<em>Right: 4 ghost terminals in pixel office view</em>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
9
25
|
## Why GhostTerm?
|
|
10
26
|
|
|
11
27
|
You're running Claude Code on your PC. You walk away. Now what?
|
|
12
28
|
|
|
13
|
-
- **Monitor from your phone** — watch Claude Code work in real-time
|
|
14
|
-
- **Approve permissions** — tap Yes/No from your couch
|
|
15
29
|
- **Run `--dangerously-skip-permissions`** — let Claude go full auto, monitor from your phone while it codes for you
|
|
16
30
|
- **4 terminal sessions at once** — more than Anthropic's official app
|
|
17
|
-
- **Real xterm.js terminal** —
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
╔═══════════════════════════════════╗
|
|
23
|
-
║ GhostTerm Companion ║
|
|
24
|
-
║ Mobile terminal for Claude Code ║
|
|
25
|
-
╚═══════════════════════════════════╝
|
|
26
|
-
|
|
27
|
-
Using cached Google login
|
|
28
|
-
Connected to relay
|
|
29
|
-
Authenticated as: you@gmail.com
|
|
30
|
-
Phone will auto-connect with same Google account
|
|
31
|
-
Mobile connected!
|
|
32
|
-
Terminal 1 spawned (PID: 12345)
|
|
33
|
-
```
|
|
31
|
+
- **Real xterm.js terminal** — full ANSI colors, scrollback, not a dumbed-down GUI
|
|
32
|
+
- **Built-in shortcut keys** — `y` / `n` for approvals, `Tab`, `Ctrl+C`, arrow keys, all one-tap
|
|
33
|
+
- **`claude` quick-launch button** — start new sessions, resume, or continue with one tap
|
|
34
|
+
- **Pixel office mode** — see all 4 terminals as cute ghost desks
|
|
34
35
|
|
|
35
36
|
## Quick Start
|
|
36
37
|
|
|
@@ -64,7 +65,7 @@ Let Claude Code run fully autonomous on your PC. Monitor everything from your ph
|
|
|
64
65
|
|
|
65
66
|
### 📱 On-the-Go Approval
|
|
66
67
|
|
|
67
|
-
Claude Code asking "May I edit server.js?" —
|
|
68
|
+
Claude Code asking "May I edit server.js?" — tap `y` from the bus. No need to rush back to your desk.
|
|
68
69
|
|
|
69
70
|
### 📸 Screenshot & Upload
|
|
70
71
|
|
|
@@ -76,16 +77,17 @@ Take a screenshot of your phone screen and send it to your PC terminal. Upload f
|
|
|
76
77
|
|---|---|---|
|
|
77
78
|
| Real CLI terminal | ✅ | ❌ |
|
|
78
79
|
| Simultaneous sessions | 4 | 1 |
|
|
79
|
-
|
|
|
80
|
-
|
|
|
80
|
+
| `--dangerously-skip-permissions` | ✅ monitor from phone | ❌ |
|
|
81
|
+
| Custom shortcut keys | ✅ y/n/Tab/Ctrl+C | ❌ |
|
|
82
|
+
| Pixel office view | ✅ | ❌ |
|
|
81
83
|
| File upload to PC | ✅ | ❌ |
|
|
82
|
-
|
|
|
83
|
-
| Google
|
|
84
|
+
| No VPN needed | ✅ | N/A |
|
|
85
|
+
| Google auto-pairing | ✅ | - |
|
|
84
86
|
|
|
85
87
|
## Pricing
|
|
86
88
|
|
|
87
89
|
- **Free**: 1 hour/day, full features
|
|
88
|
-
- **Pro**:
|
|
90
|
+
- **Pro**: $5/month or $12/quarter — unlimited access
|
|
89
91
|
|
|
90
92
|
## How It Works
|
|
91
93
|
|
package/bin/ghostterm.js
CHANGED
|
@@ -171,7 +171,7 @@ function createSession() {
|
|
|
171
171
|
env: (() => { const e = { ...process.env, TERM: 'xterm-256color' }; delete e.CLAUDECODE; delete e.CLAUDE_CODE; return e; })(),
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
const session = { id, term, outputBuffer: '', bufferSeq: 0, exited: false };
|
|
174
|
+
const session = { id, term, outputBuffer: '', bufferSeq: 0, exited: false, pendingData: '', flushTimer: null };
|
|
175
175
|
|
|
176
176
|
console.log(` Terminal ${id} spawned (PID: ${term.pid})`);
|
|
177
177
|
|
|
@@ -181,7 +181,15 @@ function createSession() {
|
|
|
181
181
|
if (session.outputBuffer.length > OUTPUT_BUFFER_MAX) {
|
|
182
182
|
session.outputBuffer = session.outputBuffer.slice(-OUTPUT_BUFFER_MAX);
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
// Batch output: accumulate for 12ms then flush once
|
|
185
|
+
session.pendingData += data;
|
|
186
|
+
if (!session.flushTimer) {
|
|
187
|
+
session.flushTimer = setTimeout(() => {
|
|
188
|
+
sendToRelay({ type: 'output', data: session.pendingData, seq: session.bufferSeq, id });
|
|
189
|
+
session.pendingData = '';
|
|
190
|
+
session.flushTimer = null;
|
|
191
|
+
}, 12);
|
|
192
|
+
}
|
|
185
193
|
});
|
|
186
194
|
|
|
187
195
|
term.onExit(({ exitCode }) => {
|