@seflless/ghosttown 1.4.1 ā 1.6.0
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 +47 -1
- package/package.json +2 -1
- package/scripts/cli-publish.js +11 -2
- package/src/cli.js +2416 -182
- package/src/cli.test.sh +605 -0
package/README.md
CHANGED
|
@@ -4,9 +4,22 @@ Ghost town let's you continue terminal sessions from other devices using a brows
|
|
|
4
4
|
|
|
5
5
|
We're building this to make it easy to build web apps using coding agents, while on the go.
|
|
6
6
|
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# npm
|
|
11
|
+
npm install -g @seflless/ghosttown
|
|
12
|
+
|
|
13
|
+
# One-liner
|
|
14
|
+
curl -fsSL https://raw.githubusercontent.com/seflless/homebrew-ghosttown/main/install.sh | bash
|
|
15
|
+
|
|
16
|
+
# Homebrew
|
|
17
|
+
brew install seflless/ghosttown/ghosttown
|
|
18
|
+
```
|
|
19
|
+
|
|
7
20
|
## CLI Commands
|
|
8
21
|
|
|
9
|
-
After installing
|
|
22
|
+
After installing, you can use any of these commands:
|
|
10
23
|
|
|
11
24
|
| Command | Description |
|
|
12
25
|
| ----------- | --------------------------- |
|
|
@@ -29,10 +42,43 @@ ghosttown -p 3000
|
|
|
29
42
|
ghosttown vim
|
|
30
43
|
ghosttown "npm run dev"
|
|
31
44
|
|
|
45
|
+
# Run a command with a custom session name
|
|
46
|
+
ghosttown -n my-project vim
|
|
47
|
+
|
|
48
|
+
# List all sessions
|
|
49
|
+
ghosttown list
|
|
50
|
+
|
|
51
|
+
# Attach to a session by name
|
|
52
|
+
ghosttown attach my-project
|
|
53
|
+
|
|
54
|
+
# Rename the current session (when inside one)
|
|
55
|
+
ghosttown rename new-name
|
|
56
|
+
|
|
57
|
+
# Kill a specific session
|
|
58
|
+
ghosttown -k my-project
|
|
59
|
+
|
|
60
|
+
# Kill all ghosttown sessions
|
|
61
|
+
ghosttown -ka
|
|
62
|
+
|
|
32
63
|
# Show help
|
|
33
64
|
ghosttown --help
|
|
34
65
|
```
|
|
35
66
|
|
|
67
|
+
### Session Management
|
|
68
|
+
|
|
69
|
+
Ghosttown uses tmux to manage terminal sessions. Each session gets a stable ID that persists across renames, so URLs continue to work even after renaming a session.
|
|
70
|
+
|
|
71
|
+
| Command | Description |
|
|
72
|
+
| ----------------------- | --------------------------- |
|
|
73
|
+
| `gt list` | List all ghosttown sessions |
|
|
74
|
+
| `gt attach <name>` | Attach to a session |
|
|
75
|
+
| `gt detach` | Detach from current session |
|
|
76
|
+
| `gt rename <new>` | Rename current session |
|
|
77
|
+
| `gt rename <old> <new>` | Rename a specific session |
|
|
78
|
+
| `gt -k <name>` | Kill a specific session |
|
|
79
|
+
| `gt -ka` | Kill all sessions |
|
|
80
|
+
| `gt update` | Update to latest version |
|
|
81
|
+
|
|
36
82
|
# Credits
|
|
37
83
|
|
|
38
84
|
- [Ghostty](https://ghostty.org/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seflless/ghosttown",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Web-based terminal emulator using Ghostty's VT100 parser via WebAssembly",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/ghostty-web.umd.cjs",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
+
"gt": "node ./bin/ghosttown.js",
|
|
54
55
|
"postinstall": "node ./scripts/postinstall.js",
|
|
55
56
|
"dev": "vite --port 8000",
|
|
56
57
|
"demo": "node demo/bin/demo.js",
|
package/scripts/cli-publish.js
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* 6. Tag with v<version>
|
|
13
13
|
* 7. Push branch and tags
|
|
14
14
|
* 8. Create GitHub release (latest)
|
|
15
|
-
* 9.
|
|
15
|
+
* 9. Trigger Homebrew tap update
|
|
16
|
+
* 10. Create Draft PR
|
|
16
17
|
*
|
|
17
18
|
* Usage: bun cli:publish [patch|minor|major]
|
|
18
19
|
*/
|
|
@@ -180,7 +181,14 @@ Opens http://localhost:8080 with a web-based terminal.
|
|
|
180
181
|
// Clean up temp file
|
|
181
182
|
fs.unlinkSync(tempFile);
|
|
182
183
|
|
|
183
|
-
// Step 9:
|
|
184
|
+
// Step 9: Trigger Homebrew tap update
|
|
185
|
+
console.log('\nšŗ Triggering Homebrew tap update...');
|
|
186
|
+
run(
|
|
187
|
+
`gh api repos/seflless/homebrew-ghosttown/dispatches -X POST -f event_type=release -f 'client_payload={"version":"${newVersion}"}'`,
|
|
188
|
+
{ ignoreError: true }
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// Step 10: Create Draft PR
|
|
184
192
|
console.log('\nš Creating Draft PR...');
|
|
185
193
|
const prBody = `## Summary
|
|
186
194
|
- Bumps version from ${currentVersion} to ${newVersion}
|
|
@@ -190,6 +198,7 @@ Opens http://localhost:8080 with a web-based terminal.
|
|
|
190
198
|
- [x] Published to npm
|
|
191
199
|
- [x] Tagged ${tagName}
|
|
192
200
|
- [x] GitHub release created
|
|
201
|
+
- [x] Homebrew tap update triggered
|
|
193
202
|
|
|
194
203
|
## npm
|
|
195
204
|
https://www.npmjs.com/package/${pkg.name}
|