mob-coordinator 0.2.2 → 0.3.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 CHANGED
@@ -33,19 +33,13 @@ mob
33
33
 
34
34
  Open `http://localhost:4040` in your browser.
35
35
 
36
- ### Install Claude Code Hooks
37
-
38
- To enable status reporting (state, branch, auto-naming) from Claude instances, clone the repo and run the hook installer:
36
+ Claude Code hooks are installed automatically on first launch. These enable status reporting (state, branch, auto-naming) from Claude instances. To manually manage hooks:
39
37
 
40
38
  ```bash
41
- git clone https://github.com/nickelbob/mob.git
42
- cd mob
43
- npm install
44
- npm run install-hooks
39
+ mob install-hooks # Re-install hooks
40
+ mob uninstall-hooks # Remove hooks
45
41
  ```
46
42
 
47
- This adds hook entries to `~/.claude/settings.json` that point to the hook scripts in the cloned repo. You only need to do this once — the hooks work regardless of whether you run mob via npm or from source.
48
-
49
43
  ### Development
50
44
 
51
45
  To contribute or run from source:
@@ -65,7 +59,7 @@ If you see errors about missing native modules, run `npm run setup` to auto-dete
65
59
 
66
60
  ### Launching Instances
67
61
 
68
- 1. Click **+ Launch Instance** (or press **Alt+N**)
62
+ 1. Click **+ Launch Instance** (or press **Alt/Option+N**)
69
63
  2. Type or paste a working directory path (autocomplete suggests as you type)
70
64
  3. Optionally set a name, model, and permission mode
71
65
  4. Click **Launch** (or press **Ctrl+Enter**)
@@ -78,11 +72,14 @@ All shortcuts are rebindable in **Settings > Shortcuts**.
78
72
 
79
73
  | Default Shortcut | Action |
80
74
  |---|---|
81
- | **Alt+N** | Open launch dialog |
82
- | **Alt+B** | Toggle sidebar |
83
- | **Alt+Up/Down** | Cycle through sessions |
84
- | **Alt+R** | Resume selected instance |
85
- | **Ctrl/Cmd+1-9** | Jump to session by position |
75
+ | **Alt/Option+N** | Open launch dialog |
76
+ | **Alt/Option+B** | Toggle sidebar |
77
+ | **Alt/Option+Up/Down** | Cycle through sessions |
78
+ | **Alt/Option+R** | Resume selected instance |
79
+ | **Alt/Option+W** | Kill selected instance |
80
+ | **Alt/Option+X** | Dismiss selected instance |
81
+ | **Alt/Option+,** | Open settings |
82
+ | **Alt/Option+1-9** | Jump to session by position |
86
83
  | **Ctrl+C** | Copy selected text (or send interrupt if no selection) |
87
84
  | **Ctrl+V** | Paste from clipboard into terminal |
88
85
  | **Ctrl+Enter** | Launch instance (in launch dialog) |
@@ -137,10 +134,8 @@ See `CLAUDE.md` for detailed architecture documentation.
137
134
 
138
135
  ## Uninstalling Hooks
139
136
 
140
- From the cloned repo:
141
-
142
137
  ```bash
143
- npm run uninstall-hooks
138
+ mob uninstall-hooks
144
139
  ```
145
140
 
146
141
  ## Troubleshooting
@@ -166,7 +161,7 @@ MOB_PORT=4050 npm run dev
166
161
 
167
162
  ### Hooks not reporting status
168
163
 
169
- 1. Make sure hooks are installed: `npm run install-hooks`
164
+ 1. Hooks are auto-installed on startup. To force re-install: `mob install-hooks`
170
165
  2. Check `~/.claude/settings.json` has entries for `PreToolUse`, `PostToolUse`, `Stop`, `UserPromptSubmit`, and `Notification`
171
166
  3. On Windows, ensure PowerShell can run the hook script (execution policy)
172
167
 
@@ -176,6 +171,13 @@ If hooks aren't firing (crash, subtask weirdness), the terminal state fallback s
176
171
 
177
172
  ## Changelog
178
173
 
174
+ ### 0.3.0
175
+
176
+ - Auto-install Claude Code hooks on server startup — no manual setup required
177
+ - Add `mob install-hooks` and `mob uninstall-hooks` CLI subcommands
178
+ - Include hook scripts in npm package
179
+ - Add landing page website for GitHub Pages
180
+
179
181
  ### 0.2.1
180
182
 
181
183
  - Fix false "Needs Input" showing when Claude finishes a task (completion notifications no longer trigger waiting state)
package/bin/mob.js CHANGED
@@ -6,15 +6,26 @@ import { dirname, join } from 'path';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
8
  const root = join(__dirname, '..');
9
- const serverEntry = join(root, 'dist', 'server', 'server', 'index.js');
10
9
 
11
- // Run the server, forwarding stdio and signals
12
- const child = spawn(process.execPath, [serverEntry], {
13
- cwd: root,
14
- stdio: 'inherit',
15
- env: { ...process.env },
16
- });
10
+ const subcommand = process.argv[2];
17
11
 
18
- child.on('exit', (code) => process.exit(code ?? 0));
19
- process.on('SIGINT', () => child.kill('SIGINT'));
20
- process.on('SIGTERM', () => child.kill('SIGTERM'));
12
+ if (subcommand === 'install-hooks') {
13
+ const { installHooks } = await import(join(root, 'dist', 'server', 'server', 'hooks.js'));
14
+ installHooks(root);
15
+ } else if (subcommand === 'uninstall-hooks') {
16
+ const { uninstallHooks } = await import(join(root, 'dist', 'server', 'server', 'hooks.js'));
17
+ uninstallHooks();
18
+ } else {
19
+ const serverEntry = join(root, 'dist', 'server', 'server', 'index.js');
20
+
21
+ // Run the server, forwarding stdio and signals
22
+ const child = spawn(process.execPath, [serverEntry], {
23
+ cwd: root,
24
+ stdio: 'inherit',
25
+ env: { ...process.env },
26
+ });
27
+
28
+ child.on('exit', (code) => process.exit(code ?? 0));
29
+ process.on('SIGINT', () => child.kill('SIGINT'));
30
+ process.on('SIGTERM', () => child.kill('SIGTERM'));
31
+ }