@mmmbuto/nexuscrew 0.1.0-beta.1 → 0.2.1
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 +67 -120
- package/bin/nexuscrew.js +468 -264
- package/frontend/dist/apple-touch-icon.png +0 -0
- package/frontend/dist/assets/{index-C7bAndew.js → index-BG1N7bSL.js} +1710 -1702
- package/frontend/dist/assets/index-CiAtinNP.css +1 -0
- package/frontend/dist/favicon.svg +20 -0
- package/frontend/dist/icon-192.png +0 -0
- package/frontend/dist/icon-512.png +0 -0
- package/frontend/dist/index.html +11 -3
- package/frontend/dist/site.webmanifest +29 -0
- package/lib/config/hosts.js +67 -0
- package/lib/config/manager.js +379 -0
- package/lib/config/models.js +408 -0
- package/lib/server/db/adapter.js +274 -0
- package/lib/server/db/drivers/sql-js.js +75 -0
- package/lib/server/db/migrate.js +174 -0
- package/lib/server/db/migrations/001_base_schema.sql +70 -0
- package/lib/server/middleware/auth.js +134 -0
- package/lib/server/middleware/rate-limit.js +63 -0
- package/lib/server/models/User.js +128 -0
- package/lib/server/routes/auth.js +168 -0
- package/lib/server/routes/hosts.js +11 -20
- package/lib/server/routes/keys.js +28 -0
- package/lib/server/routes/models.js +59 -4
- package/lib/server/routes/runtimes.js +34 -0
- package/lib/server/routes/send.js +76 -12
- package/lib/server/routes/sessions.js +39 -10
- package/lib/server/routes/speech.js +46 -0
- package/lib/server/routes/status.js +8 -6
- package/lib/server/routes/upload.js +135 -0
- package/lib/server/routes/wake-lock.js +95 -0
- package/lib/server/routes/workspaces.js +101 -0
- package/lib/server/server.js +66 -33
- package/lib/server/services/attachment-manager.js +57 -0
- package/lib/server/services/context-bridge.js +425 -0
- package/lib/server/services/runtime-manager.js +462 -0
- package/lib/server/services/speech-manager.js +76 -0
- package/lib/server/services/summary-generator.js +309 -0
- package/lib/server/services/workspace-manager.js +79 -0
- package/lib/services/engine-discovery.js +198 -13
- package/lib/services/log-watcher.js +40 -22
- package/lib/services/remote-pane-watcher.js +155 -0
- package/lib/services/session-store.js +60 -64
- package/lib/services/tmux-manager.js +127 -116
- package/lib/setup/postinstall.js +38 -0
- package/lib/utils/paths.js +124 -0
- package/lib/utils/termux.js +182 -0
- package/package.json +8 -4
- package/frontend/dist/assets/index-OENqI1_9.css +0 -1
package/README.md
CHANGED
|
@@ -1,175 +1,122 @@
|
|
|
1
|
-
|
|
1
|
+
# NexusCrew
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Mobile-first `tmux` cockpit for local and remote AI CLI sessions.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
NexusCrew is built for `Termux` and smartphone-first workflows, but also runs on Linux and macOS. It keeps CLI sessions alive inside `tmux`, exposes them through a web UI, and lets you switch between local and SSH hosts without reopening everything by hand.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Highlights
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
| Remote machines | Not supported | SSH to any host |
|
|
18
|
-
| Native deps | node-pty required | Zero native deps |
|
|
19
|
-
| Session recovery | Manual | Automatic |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
- **Persistent sessions** — tmux windows survive server restarts
|
|
26
|
-
- **Multi-engine** — Claude Code, Codex CLI, Gemini CLI, Qwen Code
|
|
27
|
-
- **Auto-discovery** — detects installed CLIs + parses shell aliases/functions from `providers.zsh`
|
|
28
|
-
- **Remote hosts** — manage tmux sessions on any machine via SSH
|
|
29
|
-
- **Unified web UI** — same interface across all engines and hosts
|
|
30
|
-
- **SSE streaming** — real-time output from tmux sessions
|
|
31
|
-
- **Zero native deps** — no node-pty, no compilation required
|
|
32
|
-
- **Cross-platform** — Linux, macOS, Termux (Android)
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Engine Discovery
|
|
37
|
-
|
|
38
|
-
NexusCrew automatically detects:
|
|
39
|
-
|
|
40
|
-
1. **Standard CLIs** — `claude`, `codex`, `gemini`, `qwen` via PATH and common install paths
|
|
41
|
-
2. **Shell aliases** — parses `~/Dev/providers.zsh` (or configured path) for wrapper functions like:
|
|
42
|
-
- `claude-glm-a`, `codex-alibaba-qwen35`, `claude-minimax27`, etc.
|
|
43
|
-
- Each alias becomes available as a custom lane in the model selector
|
|
44
|
-
|
|
45
|
-
---
|
|
9
|
+
- Persistent `tmux` sessions for Claude, Codex, Gemini and Qwen
|
|
10
|
+
- Local + SSH host switching from one mobile-first UI
|
|
11
|
+
- Remote streaming via `tmux capture-pane`
|
|
12
|
+
- File and image attachments, including remote SSH staging
|
|
13
|
+
- Local STT with `whisper.cpp`, browser fallback, system TTS
|
|
14
|
+
- Dark/light theme
|
|
15
|
+
- Installable web app shell with mobile icon/manifest
|
|
16
|
+
- Termux-oriented CLI with setup, start, status and host management
|
|
46
17
|
|
|
47
18
|
## Install
|
|
48
19
|
|
|
49
20
|
```bash
|
|
50
21
|
npm install -g @mmmbuto/nexuscrew
|
|
22
|
+
nexuscrew setup
|
|
23
|
+
nexuscrew start
|
|
51
24
|
```
|
|
52
25
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
nexuscrew init
|
|
57
|
-
```
|
|
26
|
+
`nexuscrew start` runs the server in background, waits for health, and can open the browser for you.
|
|
58
27
|
|
|
59
|
-
|
|
28
|
+
Default URL:
|
|
60
29
|
|
|
61
|
-
```
|
|
62
|
-
|
|
30
|
+
```text
|
|
31
|
+
http://localhost:41820
|
|
63
32
|
```
|
|
64
33
|
|
|
65
|
-
|
|
34
|
+
## Termux
|
|
66
35
|
|
|
67
|
-
|
|
36
|
+
Recommended base packages:
|
|
68
37
|
|
|
69
38
|
```bash
|
|
70
|
-
pkg install tmux
|
|
39
|
+
pkg install nodejs tmux openssh termux-services
|
|
71
40
|
npm install -g @mmmbuto/nexuscrew
|
|
72
|
-
nexuscrew
|
|
73
|
-
nexuscrew start
|
|
41
|
+
nexuscrew setup
|
|
74
42
|
```
|
|
75
43
|
|
|
76
|
-
|
|
44
|
+
The setup wizard can also:
|
|
77
45
|
|
|
78
|
-
|
|
46
|
+
- prepare `Termux:Boot`
|
|
47
|
+
- create and enable the native `runit` service via `termux-services`
|
|
48
|
+
- configure SSH hosts
|
|
49
|
+
- prepare local STT checks for `whisper.cpp`
|
|
79
50
|
|
|
80
|
-
|
|
51
|
+
## Core Commands
|
|
81
52
|
|
|
82
53
|
```bash
|
|
83
|
-
nexuscrew
|
|
84
|
-
nexuscrew
|
|
54
|
+
nexuscrew setup
|
|
55
|
+
nexuscrew start
|
|
56
|
+
nexuscrew stop
|
|
57
|
+
nexuscrew status
|
|
58
|
+
nexuscrew attach
|
|
59
|
+
nexuscrew sessions
|
|
60
|
+
nexuscrew hosts list
|
|
61
|
+
nexuscrew hosts add --name mybox --host example.com --user dag
|
|
62
|
+
nexuscrew stt doctor
|
|
85
63
|
```
|
|
86
64
|
|
|
87
|
-
|
|
65
|
+
## How It Works
|
|
88
66
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
| `nexuscrew init` | First-time setup (config, hosts, tmux check) |
|
|
96
|
-
| `nexuscrew start` | Start server + tmux session |
|
|
97
|
-
| `nexuscrew stop` | Stop server |
|
|
98
|
-
| `nexuscrew status` | Server + tmux + hosts status |
|
|
99
|
-
| `nexuscrew engines` | Discover available AI CLIs and aliases |
|
|
100
|
-
| `nexuscrew sessions` | List tmux windows |
|
|
101
|
-
| `nexuscrew attach` | Attach to tmux session directly |
|
|
102
|
-
| `nexuscrew config` | View/edit configuration |
|
|
103
|
-
| `nexuscrew hosts list` | List configured hosts |
|
|
104
|
-
| `nexuscrew hosts add` | Add remote SSH host |
|
|
105
|
-
| `nexuscrew hosts remove` | Remove a host |
|
|
67
|
+
```text
|
|
68
|
+
Browser/WebView <-> Express API <-> tmux session/windows <-> AI CLI processes
|
|
69
|
+
|
|
|
70
|
+
+-> local machine
|
|
71
|
+
+-> SSH hosts
|
|
72
|
+
```
|
|
106
73
|
|
|
107
|
-
|
|
74
|
+
Each conversation runs in its own `tmux` window. Local sessions stream from log watchers; remote sessions stream from incremental pane capture.
|
|
108
75
|
|
|
109
76
|
## Configuration
|
|
110
77
|
|
|
111
|
-
|
|
78
|
+
Main config:
|
|
112
79
|
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
"port": 41820,
|
|
116
|
-
"tmuxSession": "nexuscrew",
|
|
117
|
-
"logDir": "~/.nexuscrew/logs",
|
|
118
|
-
"autoDiscovery": true,
|
|
119
|
-
"providersPath": "~/Dev/providers.zsh"
|
|
120
|
-
}
|
|
80
|
+
```text
|
|
81
|
+
~/.nexuscrew/config.json
|
|
121
82
|
```
|
|
122
83
|
|
|
123
|
-
|
|
84
|
+
Host registry:
|
|
124
85
|
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
{ "name": "local", "type": "local", "default": true },
|
|
128
|
-
{ "name": "vps1", "type": "ssh", "host": "example.com", "user": "user", "port": "22" }
|
|
129
|
-
]
|
|
86
|
+
```text
|
|
87
|
+
~/.nexuscrew/hosts.json
|
|
130
88
|
```
|
|
131
89
|
|
|
132
|
-
|
|
90
|
+
Important defaults include:
|
|
133
91
|
|
|
134
|
-
|
|
92
|
+
- `server.port`
|
|
93
|
+
- `tmuxSession`
|
|
94
|
+
- `hosts.default`
|
|
95
|
+
- `workspaces.default`
|
|
96
|
+
- `stt.provider`
|
|
97
|
+
- `termux.boot_start`
|
|
98
|
+
- `termux.service_enabled`
|
|
135
99
|
|
|
136
|
-
|
|
137
|
-
|----------|--------------|----------|
|
|
138
|
-
| HTTP | `41820` | Local access |
|
|
100
|
+
## Authentication
|
|
139
101
|
|
|
140
|
-
|
|
102
|
+
Localhost use is optimized for local device workflows.
|
|
141
103
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
Browser ←SSE→ Express Server ←tmux→ tmux session "nexuscrew"
|
|
146
|
-
├─ window: nc-abc12345 (claude)
|
|
147
|
-
├─ window: nc-def67890 (codex)
|
|
148
|
-
└─ window: nc-ghi11111 (gemini)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Each AI session = one tmux window. Output captured via `tee` to log files, parsed by engine-specific parsers, and streamed to the UI via SSE.
|
|
152
|
-
|
|
153
|
-
---
|
|
104
|
+
For remote or network exposure, review and configure authentication before relying on the instance outside localhost. Do not expose an unreviewed dev setup directly to the public internet.
|
|
154
105
|
|
|
155
106
|
## Development
|
|
156
107
|
|
|
157
108
|
```bash
|
|
158
|
-
git clone https://github.com/
|
|
109
|
+
git clone https://github.com/DioNanos/nexuscrew
|
|
159
110
|
cd nexuscrew
|
|
160
111
|
npm install
|
|
161
|
-
|
|
112
|
+
npm run build
|
|
162
113
|
npm run dev
|
|
163
114
|
```
|
|
164
115
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
## Relation to NexusCLI
|
|
168
|
-
|
|
169
|
-
NexusCrew is a **study branch** inspired by [NexusCLI](https://www.npmjs.com/package/@mmmbuto/nexuscli). It shares the same web UI but replaces the PTY-based process management with tmux-based persistent sessions. The goal is to explore whether tmux provides a simpler, more robust foundation for AI CLI orchestration — especially for remote hosts and crash recovery.
|
|
116
|
+
## Related
|
|
170
117
|
|
|
171
|
-
|
|
118
|
+
- [NexusCLI](https://www.npmjs.com/package/@mmmbuto/nexuscli) - PTY-based sibling project
|
|
172
119
|
|
|
173
120
|
## License
|
|
174
121
|
|
|
175
|
-
MIT
|
|
122
|
+
MIT
|