@ts47andres/exeggutor 1.1.3 → 1.1.5

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/bin/exeggutor.js CHANGED
@@ -1,217 +1,217 @@
1
- #!/usr/bin/env node
2
-
3
- // Exeggutor CLI entry point.
4
- // Parses command-line arguments and dispatches to the appropriate handler.
5
-
6
- const { resolve } = require('path');
7
- const { existsSync, readFileSync } = require('fs');
8
- const cli = require('../src/cli');
9
-
10
- // Resolve the package root to locate workspaces and config.
11
- const ROOT = resolve(__dirname, '..');
12
-
13
- // Determine the active config from home directory.
14
- const CONFIG_PATH = resolve(require('os').homedir(), '.exeggutor.json');
15
-
16
- const args = process.argv.slice(2);
17
- const first = args[0] || '';
18
-
19
- // --version
20
- if (first === '--version' || first === '-v') {
21
- cli.showVersion(ROOT);
22
- process.exit(0);
23
- }
24
-
25
- // --help
26
- if (first === '--help' || first === '-h') {
27
- cli.showHelp();
28
- process.exit(0);
29
- }
30
-
31
- // --tailscale (start with Tailscale mode)
32
- if (first === '--tailscale') {
33
- const extraArgs = args.slice(1);
34
- extraArgs.push('--tailscale');
35
- cli.startServers(ROOT, CONFIG_PATH, extraArgs).catch(err => {
36
- console.error('Fatal error starting servers:', err.message);
37
- process.exit(1);
38
- });
39
- return;
40
- }
41
-
42
- // --start (default if no recognized flag or no args)
43
- if (first === '--start' || !first || (first && !first.startsWith('--'))) {
44
- const passive = first === '--start';
45
- const extraArgs = passive ? args.slice(1) : args;
46
- cli.startServers(ROOT, CONFIG_PATH, extraArgs).catch(err => {
47
- console.error('Fatal error starting servers:', err.message);
48
- process.exit(1);
49
- });
50
- return;
51
- }
52
-
53
- // --stop / --kill
54
- if (first === '--stop' || first === '--kill') {
55
- cli.stopServers(CONFIG_PATH);
56
- process.exit(0);
57
- }
58
-
59
- // --restart
60
- if (first === '--restart') {
61
- cli.restartServers(ROOT, CONFIG_PATH).catch(err => {
62
- console.error('Fatal error restarting servers:', err.message);
63
- process.exit(1);
64
- });
65
- return;
66
- }
67
-
68
- // --status
69
- if (first === '--status' || first === '-s') {
70
- cli.showStatus(CONFIG_PATH).catch(err => {
71
- console.error('Failed to get status:', err.message);
72
- process.exit(1);
73
- });
74
- return;
75
- }
76
-
77
- // --open
78
- if (first === '--open') {
79
- cli.openDashboard(CONFIG_PATH).catch(err => {
80
- console.error('Failed to open dashboard:', err.message);
81
- process.exit(1);
82
- });
83
- return;
84
- }
85
-
86
- // --log
87
- if (first === '--log') {
88
- cli.showLogs(CONFIG_PATH);
89
- process.exit(0);
90
- }
91
-
92
- // --workspaces
93
- if (first === '--workspaces' || first === '-w') {
94
- cli.listWorkspaces(CONFIG_PATH).catch(err => {
95
- console.error('Failed to list workspaces:', err.message);
96
- process.exit(1);
97
- });
98
- return;
99
- }
100
-
101
- // --terminals <workspace-hash>
102
- if (first === '--terminals') {
103
- const wsHash = args[1];
104
- if (!wsHash) {
105
- console.error('Usage: exeggutor --terminals <workspace-hash>');
106
- process.exit(1);
107
- }
108
- cli.listTerminals(CONFIG_PATH, wsHash).catch(err => {
109
- console.error('Failed to list terminals:', err.message);
110
- process.exit(1);
111
- });
112
- return;
113
- }
114
-
115
- // --create-workspace <name> <path>
116
- if (first === '--create-workspace') {
117
- const name = args[1];
118
- const wsPath = args[2];
119
- if (!name || !wsPath) {
120
- console.error('Usage: exeggutor --create-workspace <name> <absolute-path>');
121
- process.exit(1);
122
- }
123
- cli.createWorkspace(CONFIG_PATH, name, wsPath).catch(err => {
124
- console.error('Failed to create workspace:', err.message);
125
- process.exit(1);
126
- });
127
- return;
128
- }
129
-
130
- // --add-terminal <workspace-hash> <name>
131
- if (first === '--add-terminal') {
132
- const wsHash = args[1];
133
- const termName = args[2] || `Terminal`;
134
- if (!wsHash) {
135
- console.error('Usage: exeggutor --add-terminal <workspace-hash> [name]');
136
- process.exit(1);
137
- }
138
- cli.addTerminal(CONFIG_PATH, wsHash, termName).catch(err => {
139
- console.error('Failed to add terminal:', err.message);
140
- process.exit(1);
141
- });
142
- return;
143
- }
144
-
145
- // --rename <workspace-hash> <terminal-hash> <new-name>
146
- if (first === '--rename') {
147
- const wsHash = args[1];
148
- const termHash = args[2];
149
- const newName = args[3];
150
- if (!wsHash || !termHash || !newName) {
151
- console.error('Usage: exeggutor --rename <workspace-hash> <terminal-hash> <new-name>');
152
- process.exit(1);
153
- }
154
- cli.renameTerminal(CONFIG_PATH, wsHash, termHash, newName).catch(err => {
155
- console.error('Failed to rename terminal:', err.message);
156
- process.exit(1);
157
- });
158
- return;
159
- }
160
-
161
- // --close <workspace-hash> <terminal-name-or-hash>
162
- if (first === '--close') {
163
- const wsHash = args[1];
164
- const termId = args[2];
165
- if (!wsHash || !termId) {
166
- console.error('Usage: exeggutor --close <workspace-hash> <terminal-name-or-hash>');
167
- process.exit(1);
168
- }
169
- cli.closeTerminal(CONFIG_PATH, wsHash, termId).catch(err => {
170
- console.error('Failed to close terminal:', err.message);
171
- process.exit(1);
172
- });
173
- return;
174
- }
175
-
176
- // --delete-workspace <workspace-hash>
177
- if (first === '--delete-workspace') {
178
- const wsHash = args[1];
179
- if (!wsHash) {
180
- console.error('Usage: exeggutor --delete-workspace <workspace-hash>');
181
- process.exit(1);
182
- }
183
- cli.deleteWorkspace(CONFIG_PATH, wsHash).catch(err => {
184
- console.error('Failed to delete workspace:', err.message);
185
- process.exit(1);
186
- });
187
- return;
188
- }
189
-
190
- // --install-service
191
- if (first === '--install-service') {
192
- cli.installAutostart(ROOT).catch(err => {
193
- console.error('Failed to install autostart service:', err.message);
194
- process.exit(1);
195
- });
196
- return;
197
- }
198
-
199
- // --remove-service
200
- if (first === '--remove-service') {
201
- cli.removeAutostart().catch(err => {
202
- console.error('Failed to remove autostart service:', err.message);
203
- process.exit(1);
204
- });
205
- return;
206
- }
207
-
208
- // --show-token
209
- if (first === '--show-token') {
210
- cli.showToken(CONFIG_PATH);
211
- process.exit(0);
212
- }
213
-
214
- // Unknown command
215
- console.error(`Unknown command: ${first}`);
216
- console.error('Run "exeggutor --help" for usage information.');
217
- process.exit(1);
1
+ #!/usr/bin/env node
2
+
3
+ // Exeggutor CLI entry point.
4
+ // Parses command-line arguments and dispatches to the appropriate handler.
5
+
6
+ const { resolve } = require('path');
7
+ const { existsSync, readFileSync } = require('fs');
8
+ const cli = require('../src/cli');
9
+
10
+ // Resolve the package root to locate workspaces and config.
11
+ const ROOT = resolve(__dirname, '..');
12
+
13
+ // Determine the active config from home directory.
14
+ const CONFIG_PATH = resolve(require('os').homedir(), '.exeggutor.json');
15
+
16
+ const args = process.argv.slice(2);
17
+ const first = args[0] || '';
18
+
19
+ // --version
20
+ if (first === '--version' || first === '-v') {
21
+ cli.showVersion(ROOT);
22
+ process.exit(0);
23
+ }
24
+
25
+ // --help
26
+ if (first === '--help' || first === '-h') {
27
+ cli.showHelp();
28
+ process.exit(0);
29
+ }
30
+
31
+ // --tailscale (start with Tailscale mode)
32
+ if (first === '--tailscale') {
33
+ const extraArgs = args.slice(1);
34
+ extraArgs.push('--tailscale');
35
+ cli.startServers(ROOT, CONFIG_PATH, extraArgs).catch(err => {
36
+ console.error('Fatal error starting servers:', err.message);
37
+ process.exit(1);
38
+ });
39
+ return;
40
+ }
41
+
42
+ // --start (default if no recognized flag or no args)
43
+ if (first === '--start' || !first || (first && !first.startsWith('--'))) {
44
+ const passive = first === '--start';
45
+ const extraArgs = passive ? args.slice(1) : args;
46
+ cli.startServers(ROOT, CONFIG_PATH, extraArgs).catch(err => {
47
+ console.error('Fatal error starting servers:', err.message);
48
+ process.exit(1);
49
+ });
50
+ return;
51
+ }
52
+
53
+ // --stop / --kill
54
+ if (first === '--stop' || first === '--kill') {
55
+ cli.stopServers(CONFIG_PATH);
56
+ process.exit(0);
57
+ }
58
+
59
+ // --restart
60
+ if (first === '--restart') {
61
+ cli.restartServers(ROOT, CONFIG_PATH).catch(err => {
62
+ console.error('Fatal error restarting servers:', err.message);
63
+ process.exit(1);
64
+ });
65
+ return;
66
+ }
67
+
68
+ // --status
69
+ if (first === '--status' || first === '-s') {
70
+ cli.showStatus(CONFIG_PATH).catch(err => {
71
+ console.error('Failed to get status:', err.message);
72
+ process.exit(1);
73
+ });
74
+ return;
75
+ }
76
+
77
+ // --open
78
+ if (first === '--open') {
79
+ cli.openDashboard(CONFIG_PATH).catch(err => {
80
+ console.error('Failed to open dashboard:', err.message);
81
+ process.exit(1);
82
+ });
83
+ return;
84
+ }
85
+
86
+ // --log
87
+ if (first === '--log') {
88
+ cli.showLogs(CONFIG_PATH);
89
+ process.exit(0);
90
+ }
91
+
92
+ // --workspaces
93
+ if (first === '--workspaces' || first === '-w') {
94
+ cli.listWorkspaces(CONFIG_PATH).catch(err => {
95
+ console.error('Failed to list workspaces:', err.message);
96
+ process.exit(1);
97
+ });
98
+ return;
99
+ }
100
+
101
+ // --terminals <workspace-hash>
102
+ if (first === '--terminals') {
103
+ const wsHash = args[1];
104
+ if (!wsHash) {
105
+ console.error('Usage: exeggutor --terminals <workspace-hash>');
106
+ process.exit(1);
107
+ }
108
+ cli.listTerminals(CONFIG_PATH, wsHash).catch(err => {
109
+ console.error('Failed to list terminals:', err.message);
110
+ process.exit(1);
111
+ });
112
+ return;
113
+ }
114
+
115
+ // --create-workspace <name> <path>
116
+ if (first === '--create-workspace') {
117
+ const name = args[1];
118
+ const wsPath = args[2];
119
+ if (!name || !wsPath) {
120
+ console.error('Usage: exeggutor --create-workspace <name> <absolute-path>');
121
+ process.exit(1);
122
+ }
123
+ cli.createWorkspace(CONFIG_PATH, name, wsPath).catch(err => {
124
+ console.error('Failed to create workspace:', err.message);
125
+ process.exit(1);
126
+ });
127
+ return;
128
+ }
129
+
130
+ // --add-terminal <workspace-hash> <name>
131
+ if (first === '--add-terminal') {
132
+ const wsHash = args[1];
133
+ const termName = args[2] || `Terminal`;
134
+ if (!wsHash) {
135
+ console.error('Usage: exeggutor --add-terminal <workspace-hash> [name]');
136
+ process.exit(1);
137
+ }
138
+ cli.addTerminal(CONFIG_PATH, wsHash, termName).catch(err => {
139
+ console.error('Failed to add terminal:', err.message);
140
+ process.exit(1);
141
+ });
142
+ return;
143
+ }
144
+
145
+ // --rename <workspace-hash> <terminal-hash> <new-name>
146
+ if (first === '--rename') {
147
+ const wsHash = args[1];
148
+ const termHash = args[2];
149
+ const newName = args[3];
150
+ if (!wsHash || !termHash || !newName) {
151
+ console.error('Usage: exeggutor --rename <workspace-hash> <terminal-hash> <new-name>');
152
+ process.exit(1);
153
+ }
154
+ cli.renameTerminal(CONFIG_PATH, wsHash, termHash, newName).catch(err => {
155
+ console.error('Failed to rename terminal:', err.message);
156
+ process.exit(1);
157
+ });
158
+ return;
159
+ }
160
+
161
+ // --close <workspace-hash> <terminal-name-or-hash>
162
+ if (first === '--close') {
163
+ const wsHash = args[1];
164
+ const termId = args[2];
165
+ if (!wsHash || !termId) {
166
+ console.error('Usage: exeggutor --close <workspace-hash> <terminal-name-or-hash>');
167
+ process.exit(1);
168
+ }
169
+ cli.closeTerminal(CONFIG_PATH, wsHash, termId).catch(err => {
170
+ console.error('Failed to close terminal:', err.message);
171
+ process.exit(1);
172
+ });
173
+ return;
174
+ }
175
+
176
+ // --delete-workspace <workspace-hash>
177
+ if (first === '--delete-workspace') {
178
+ const wsHash = args[1];
179
+ if (!wsHash) {
180
+ console.error('Usage: exeggutor --delete-workspace <workspace-hash>');
181
+ process.exit(1);
182
+ }
183
+ cli.deleteWorkspace(CONFIG_PATH, wsHash).catch(err => {
184
+ console.error('Failed to delete workspace:', err.message);
185
+ process.exit(1);
186
+ });
187
+ return;
188
+ }
189
+
190
+ // --install-service
191
+ if (first === '--install-service') {
192
+ cli.installAutostart(ROOT).catch(err => {
193
+ console.error('Failed to install autostart service:', err.message);
194
+ process.exit(1);
195
+ });
196
+ return;
197
+ }
198
+
199
+ // --remove-service
200
+ if (first === '--remove-service') {
201
+ cli.removeAutostart().catch(err => {
202
+ console.error('Failed to remove autostart service:', err.message);
203
+ process.exit(1);
204
+ });
205
+ return;
206
+ }
207
+
208
+ // --show-token
209
+ if (first === '--show-token') {
210
+ cli.showToken(CONFIG_PATH);
211
+ process.exit(0);
212
+ }
213
+
214
+ // Unknown command
215
+ console.error(`Unknown command: ${first}`);
216
+ console.error('Run "exeggutor --help" for usage information.');
217
+ process.exit(1);
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "@ts47andres/exeggutor",
3
- "version": "1.1.3",
4
- "description": "Terminal Multiplexer & Git Worktree Manager - local-first workspace coordinator",
5
- "private": false,
6
- "license": "Apache-2.0",
7
- "bin": {
8
- "exeggutor": "./bin/exeggutor.js"
9
- },
10
- "scripts": {
11
- "dev": "node bin/exeggutor.js",
12
- "dev:backend": "cd packages/backend && npm run dev",
13
- "dev:frontend": "cd packages/frontend && npm run dev",
14
- "build": "cd packages/backend && npm run build && cd ../.. && cd packages/frontend && npm run build",
15
- "postinstall": "node packages/backend/scripts/compile-picker.js",
16
- "prepublishOnly": "npm run build",
17
- "status": "node bin/exeggutor.js --status",
18
- "stop": "node bin/exeggutor.js --stop",
19
- "start": "node bin/exeggutor.js"
20
- },
21
- "engines": {
22
- "node": ">=18.0.0"
23
- },
24
- "dependencies": {
25
- "@fastify/cors": "^9.0.1",
26
- "@fastify/static": "^7.0.4",
27
- "@fastify/websocket": "^10.0.1",
28
- "fastify": "^4.28.1",
29
- "node-pty": "^1.1.0-beta21"
30
- },
31
- "keywords": [
32
- "terminal",
33
- "multiplexer",
34
- "git",
35
- "worktree",
36
- "workspace",
37
- "tui",
38
- "dev-tools",
39
- "productivity"
40
- ],
41
- "repository": {
42
- "type": "git",
43
- "url": "git+https://github.com/TS47Andres/Exeggutor.git"
44
- },
45
- "bugs": {
46
- "url": "https://github.com/TS47Andres/Exeggutor/issues"
47
- },
48
- "homepage": "https://github.com/TS47Andres/Exeggutor#readme",
49
- "files": [
50
- "bin/",
51
- "src/",
52
- "packages/backend/package.json",
53
- "packages/backend/bin/",
54
- "packages/backend/dist/",
55
- "packages/backend/scripts/",
56
- "packages/backend/git-wrapper/",
57
- "packages/backend/native/",
58
- "packages/backend/src/",
59
- "packages/frontend/package.json",
60
- "packages/frontend/dist/",
61
- "LICENSE"
62
- ]
63
- }
1
+ {
2
+ "name": "@ts47andres/exeggutor",
3
+ "version": "1.1.5",
4
+ "description": "Terminal Multiplexer & Git Worktree Manager - local-first workspace coordinator",
5
+ "private": false,
6
+ "license": "Apache-2.0",
7
+ "bin": {
8
+ "exeggutor": "bin/exeggutor.js"
9
+ },
10
+ "scripts": {
11
+ "dev": "node bin/exeggutor.js",
12
+ "dev:backend": "cd packages/backend && npm run dev",
13
+ "dev:frontend": "cd packages/frontend && npm run dev",
14
+ "build": "cd packages/backend && npm run build && cd ../.. && cd packages/frontend && npm run build",
15
+ "postinstall": "node packages/backend/scripts/compile-picker.js",
16
+ "prepublishOnly": "npm run build",
17
+ "status": "node bin/exeggutor.js --status",
18
+ "stop": "node bin/exeggutor.js --stop",
19
+ "start": "node bin/exeggutor.js"
20
+ },
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "dependencies": {
25
+ "@fastify/cors": "^9.0.1",
26
+ "@fastify/static": "^7.0.4",
27
+ "@fastify/websocket": "^10.0.1",
28
+ "fastify": "^4.28.1",
29
+ "node-pty": "^1.1.0-beta21"
30
+ },
31
+ "keywords": [
32
+ "terminal",
33
+ "multiplexer",
34
+ "git",
35
+ "worktree",
36
+ "workspace",
37
+ "tui",
38
+ "dev-tools",
39
+ "productivity"
40
+ ],
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/TS47Andres/Exeggutor.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/TS47Andres/Exeggutor/issues"
47
+ },
48
+ "homepage": "https://github.com/TS47Andres/Exeggutor#readme",
49
+ "files": [
50
+ "bin/",
51
+ "src/",
52
+ "packages/backend/package.json",
53
+ "packages/backend/bin/",
54
+ "packages/backend/dist/",
55
+ "packages/backend/scripts/",
56
+ "packages/backend/git-wrapper/",
57
+ "packages/backend/native/",
58
+ "packages/backend/src/",
59
+ "packages/frontend/package.json",
60
+ "packages/frontend/dist/",
61
+ "LICENSE"
62
+ ]
63
+ }