workon 1.3.0 → 2.0.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/.history/package_20250807114243.json +43 -0
- package/.history/package_20250807114257.json +43 -0
- package/.history/package_20250807114404.json +43 -0
- package/.history/package_20250807114409.json +43 -0
- package/.history/package_20250807114510.json +43 -0
- package/.history/package_20250807114637.json +43 -0
- package/CHANGELOG.md +25 -1
- package/cli/manage.js +29 -77
- package/cli/open.js +152 -74
- package/commands/base.js +105 -0
- package/commands/core/cwd/index.js +86 -0
- package/commands/core/ide/index.js +84 -0
- package/commands/core/web/index.js +109 -0
- package/commands/extensions/claude/index.js +211 -0
- package/commands/extensions/docker/index.js +167 -0
- package/commands/extensions/npm/index.js +208 -0
- package/commands/registry.js +196 -0
- package/docs/adr/001-command-centric-architecture.md +304 -0
- package/docs/adr/002-positional-command-arguments.md +396 -0
- package/docs/ideas.md +71 -65
- package/lib/tmux.js +81 -0
- package/lib/validation.js +14 -35
- package/package.json +2 -2
- package/test-architecture.js +145 -0
- package/test-registry.js +57 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workon",
|
|
3
|
+
"version": null,
|
|
4
|
+
"description": "Work on something great!",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"release": "standard-version"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/israelroldan/workon.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"productivity"
|
|
15
|
+
],
|
|
16
|
+
"author": "Israel Roldan (me@isro.me)",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"cz-conventional-changelog": "^2.0.0",
|
|
20
|
+
"standard-version": "^4.2.0"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"commitizen": {
|
|
24
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"conf": "^1.1.2",
|
|
29
|
+
"deep-assign": "^2.0.0",
|
|
30
|
+
"flat": "^2.0.1",
|
|
31
|
+
"inquirer": "^3.1.1",
|
|
32
|
+
"loog": "^1.4.0",
|
|
33
|
+
"omelette": "^0.4.4",
|
|
34
|
+
"openurl2": "^1.0.1",
|
|
35
|
+
"phylo": "^1.0.0-beta.7",
|
|
36
|
+
"simple-git": "^1.73.0",
|
|
37
|
+
"switchit": "^1.0.7"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"workon": "bin/workon",
|
|
41
|
+
"wo": "bin/workon"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workon",
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
|
+
"description": "Work on something great!",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"release": "standard-version"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/israelroldan/workon.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"productivity"
|
|
15
|
+
],
|
|
16
|
+
"author": "Israel Roldan (me@isro.me)",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"cz-conventional-changelog": "^2.0.0",
|
|
20
|
+
"standard-version": "^4.2.0"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"commitizen": {
|
|
24
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"conf": "^1.1.2",
|
|
29
|
+
"deep-assign": "^2.0.0",
|
|
30
|
+
"flat": "^2.0.1",
|
|
31
|
+
"inquirer": "^3.1.1",
|
|
32
|
+
"loog": "^1.4.0",
|
|
33
|
+
"omelette": "^0.4.4",
|
|
34
|
+
"openurl2": "^1.0.1",
|
|
35
|
+
"phylo": "^1.0.0-beta.7",
|
|
36
|
+
"simple-git": "^1.73.0",
|
|
37
|
+
"switchit": "^1.0.7"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"workon": "bin/workon",
|
|
41
|
+
"wo": "bin/workon"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workon",
|
|
3
|
+
"version": "",
|
|
4
|
+
"description": "Work on something great!",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"release": "standard-version"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/israelroldan/workon.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"productivity"
|
|
15
|
+
],
|
|
16
|
+
"author": "Israel Roldan (me@isro.me)",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"cz-conventional-changelog": "^2.0.0",
|
|
20
|
+
"standard-version": "^4.2.0"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"commitizen": {
|
|
24
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"conf": "^1.1.2",
|
|
29
|
+
"deep-assign": "^2.0.0",
|
|
30
|
+
"flat": "^2.0.1",
|
|
31
|
+
"inquirer": "^3.1.1",
|
|
32
|
+
"loog": "^1.4.0",
|
|
33
|
+
"omelette": "^0.4.4",
|
|
34
|
+
"openurl2": "^1.0.1",
|
|
35
|
+
"phylo": "^1.0.0-beta.7",
|
|
36
|
+
"simple-git": "^1.73.0",
|
|
37
|
+
"switchit": "^1.0.7"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"workon": "bin/workon",
|
|
41
|
+
"wo": "bin/workon"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workon",
|
|
3
|
+
"version": "",
|
|
4
|
+
"description": "Work on something great!",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"release": "standard-version"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/israelroldan/workon.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"productivity"
|
|
15
|
+
],
|
|
16
|
+
"author": "Israel Roldan (me@isro.me)",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"cz-conventional-changelog": "^2.0.0",
|
|
20
|
+
"standard-version": "^4.2.0"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"commitizen": {
|
|
24
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"conf": "^1.1.2",
|
|
29
|
+
"deep-assign": "^2.0.0",
|
|
30
|
+
"flat": "^2.0.1",
|
|
31
|
+
"inquirer": "^3.1.1",
|
|
32
|
+
"loog": "^1.4.0",
|
|
33
|
+
"omelette": "^0.4.4",
|
|
34
|
+
"openurl2": "^1.0.1",
|
|
35
|
+
"phylo": "^1.0.0-beta.7",
|
|
36
|
+
"simple-git": "^1.73.0",
|
|
37
|
+
"switchit": "^1.0.7"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"workon": "bin/workon",
|
|
41
|
+
"wo": "bin/workon"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workon",
|
|
3
|
+
"version": "1.4.1",
|
|
4
|
+
"description": "Work on something great!",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"release": "standard-version"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/israelroldan/workon.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"productivity"
|
|
15
|
+
],
|
|
16
|
+
"author": "Israel Roldan (me@isro.me)",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"cz-conventional-changelog": "^2.0.0",
|
|
20
|
+
"standard-version": "^4.2.0"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"commitizen": {
|
|
24
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"conf": "^1.1.2",
|
|
29
|
+
"deep-assign": "^2.0.0",
|
|
30
|
+
"flat": "^2.0.1",
|
|
31
|
+
"inquirer": "^3.1.1",
|
|
32
|
+
"loog": "^1.4.0",
|
|
33
|
+
"omelette": "^0.4.4",
|
|
34
|
+
"openurl2": "^1.0.1",
|
|
35
|
+
"phylo": "^1.0.0-beta.7",
|
|
36
|
+
"simple-git": "^1.73.0",
|
|
37
|
+
"switchit": "^1.0.7"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"workon": "bin/workon",
|
|
41
|
+
"wo": "bin/workon"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workon",
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
|
+
"description": "Work on something great!",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"release": "standard-version"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@github.com/israelroldan/workon.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"productivity"
|
|
15
|
+
],
|
|
16
|
+
"author": "Israel Roldan (me@isro.me)",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"cz-conventional-changelog": "^2.0.0",
|
|
20
|
+
"standard-version": "^9.5.0"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"commitizen": {
|
|
24
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"conf": "^1.1.2",
|
|
29
|
+
"deep-assign": "^2.0.0",
|
|
30
|
+
"flat": "^2.0.1",
|
|
31
|
+
"inquirer": "^3.1.1",
|
|
32
|
+
"loog": "^1.4.0",
|
|
33
|
+
"omelette": "^0.4.4",
|
|
34
|
+
"openurl2": "^1.0.1",
|
|
35
|
+
"phylo": "^1.0.0-beta.7",
|
|
36
|
+
"simple-git": "^1.73.0",
|
|
37
|
+
"switchit": "^1.0.7"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"workon": "bin/workon",
|
|
41
|
+
"wo": "bin/workon"
|
|
42
|
+
}
|
|
43
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.0.0](https://github.com/israelroldan/workon/compare/v2.0.0-alpha.1...v2.0.0) (2025-08-07)
|
|
6
|
+
|
|
7
|
+
## [2.0.0-alpha.1](https://github.com/israelroldan/workon/compare/v1.4.1...v2.0.0-alpha.1) (2025-08-07)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Refactor to Command-Centric Architecture and enhance command management ([b7f8478](https://github.com/israelroldan/workon/commit/b7f84789e677222af34ae2018b7eb452dd054e34))
|
|
13
|
+
|
|
14
|
+
<a name="1.4.1"></a>
|
|
15
|
+
## [1.4.1](https://github.com/israelroldan/workon/compare/v1.4.0...v1.4.1) (2025-08-07)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<a name="1.4.0"></a>
|
|
20
|
+
# [1.4.0](https://github.com/israelroldan/workon/compare/v1.3.0...v1.4.0) (2025-08-06)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* Integrate NPM command support and enhance terminal layouts ([f877ec4](https://github.com/israelroldan/workon/commit/f877ec4))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
5
29
|
<a name="1.3.0"></a>
|
|
6
30
|
# [1.3.0](https://github.com/israelroldan/workon/compare/v1.2.1...v1.3.0) (2025-08-06)
|
|
7
31
|
|
package/cli/manage.js
CHANGED
|
@@ -3,11 +3,16 @@ const inquirer = require('inquirer');
|
|
|
3
3
|
const File = require('phylo');
|
|
4
4
|
const ProjectValidator = require('../lib/validation');
|
|
5
5
|
const path = require('path');
|
|
6
|
+
const registry = require('../commands/registry');
|
|
6
7
|
|
|
7
8
|
class manage extends command {
|
|
8
|
-
execute(params) {
|
|
9
|
+
async execute(params) {
|
|
9
10
|
let me = this;
|
|
10
11
|
me.validator = new ProjectValidator(me.config);
|
|
12
|
+
|
|
13
|
+
// Initialize command registry
|
|
14
|
+
await registry.initialize();
|
|
15
|
+
|
|
11
16
|
me.showLogo();
|
|
12
17
|
return me.startManagement();
|
|
13
18
|
}
|
|
@@ -123,12 +128,11 @@ class manage extends command {
|
|
|
123
128
|
type: 'checkbox',
|
|
124
129
|
name: 'events',
|
|
125
130
|
message: 'Select events to enable:',
|
|
126
|
-
choices:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
]
|
|
131
|
+
choices: registry.getCommandsForManageUI().map(cmd => ({
|
|
132
|
+
name: cmd.name,
|
|
133
|
+
value: cmd.value,
|
|
134
|
+
checked: ['cwd', 'ide'].includes(cmd.value) // Default enable cwd and ide
|
|
135
|
+
}))
|
|
132
136
|
}
|
|
133
137
|
];
|
|
134
138
|
|
|
@@ -137,10 +141,10 @@ class manage extends command {
|
|
|
137
141
|
// Convert events array to object and configure advanced options
|
|
138
142
|
const events = {};
|
|
139
143
|
for (const event of answers.events) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
events[event] =
|
|
144
|
+
const command = registry.getCommandByName(event);
|
|
145
|
+
if (command && command.configuration) {
|
|
146
|
+
const config = await command.configuration.configureInteractive();
|
|
147
|
+
events[event] = config;
|
|
144
148
|
} else {
|
|
145
149
|
events[event] = 'true';
|
|
146
150
|
}
|
|
@@ -243,12 +247,11 @@ class manage extends command {
|
|
|
243
247
|
type: 'checkbox',
|
|
244
248
|
name: 'events',
|
|
245
249
|
message: 'Select events to enable:',
|
|
246
|
-
choices:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
]
|
|
250
|
+
choices: registry.getCommandsForManageUI().map(cmd => ({
|
|
251
|
+
name: cmd.name,
|
|
252
|
+
value: cmd.value,
|
|
253
|
+
checked: currentEvents.includes(cmd.value)
|
|
254
|
+
}))
|
|
252
255
|
}
|
|
253
256
|
];
|
|
254
257
|
|
|
@@ -257,24 +260,25 @@ class manage extends command {
|
|
|
257
260
|
// Convert events array to object and configure advanced options
|
|
258
261
|
const events = {};
|
|
259
262
|
for (const event of answers.events) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
const command = registry.getCommandByName(event);
|
|
264
|
+
if (command && command.configuration) {
|
|
265
|
+
// Check if there's existing configuration to preserve
|
|
266
|
+
const existingConfig = project.events && project.events[event];
|
|
267
|
+
if (existingConfig && typeof existingConfig === 'object') {
|
|
264
268
|
const keepConfig = await inquirer.prompt([{
|
|
265
269
|
type: 'confirm',
|
|
266
270
|
name: 'keep',
|
|
267
|
-
message:
|
|
271
|
+
message: `Keep existing ${command.metadata.displayName} configuration?`,
|
|
268
272
|
default: true
|
|
269
273
|
}]);
|
|
270
274
|
|
|
271
275
|
if (keepConfig.keep) {
|
|
272
|
-
events[event] =
|
|
276
|
+
events[event] = existingConfig;
|
|
273
277
|
} else {
|
|
274
|
-
events[event] = await
|
|
278
|
+
events[event] = await command.configuration.configureInteractive();
|
|
275
279
|
}
|
|
276
280
|
} else {
|
|
277
|
-
events[event] = await
|
|
281
|
+
events[event] = await command.configuration.configureInteractive();
|
|
278
282
|
}
|
|
279
283
|
} else {
|
|
280
284
|
events[event] = 'true';
|
|
@@ -399,58 +403,6 @@ class manage extends command {
|
|
|
399
403
|
}
|
|
400
404
|
}
|
|
401
405
|
|
|
402
|
-
async configureClaudeEvent() {
|
|
403
|
-
let me = this;
|
|
404
|
-
|
|
405
|
-
me.log.log('\n⚙️ Configure Claude Event\n');
|
|
406
|
-
|
|
407
|
-
const claudeQuestions = [
|
|
408
|
-
{
|
|
409
|
-
type: 'confirm',
|
|
410
|
-
name: 'useAdvanced',
|
|
411
|
-
message: 'Configure advanced Claude options?',
|
|
412
|
-
default: false
|
|
413
|
-
}
|
|
414
|
-
];
|
|
415
|
-
|
|
416
|
-
const claudeAnswer = await inquirer.prompt(claudeQuestions);
|
|
417
|
-
|
|
418
|
-
if (!claudeAnswer.useAdvanced) {
|
|
419
|
-
return 'true';
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
const advancedQuestions = [
|
|
423
|
-
{
|
|
424
|
-
type: 'input',
|
|
425
|
-
name: 'flags',
|
|
426
|
-
message: 'Claude flags (comma-separated, e.g. --resume,--debug):',
|
|
427
|
-
filter: (input) => {
|
|
428
|
-
if (!input.trim()) return [];
|
|
429
|
-
return input.split(',').map(flag => flag.trim()).filter(flag => flag);
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
type: 'confirm',
|
|
434
|
-
name: 'split_terminal',
|
|
435
|
-
message: 'Enable split terminal (Claude + shell side-by-side with tmux)?',
|
|
436
|
-
default: false
|
|
437
|
-
}
|
|
438
|
-
];
|
|
439
|
-
|
|
440
|
-
const advancedAnswers = await inquirer.prompt(advancedQuestions);
|
|
441
|
-
|
|
442
|
-
const config = {};
|
|
443
|
-
|
|
444
|
-
if (advancedAnswers.flags && advancedAnswers.flags.length > 0) {
|
|
445
|
-
config.flags = advancedAnswers.flags;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
if (advancedAnswers.split_terminal) {
|
|
449
|
-
config.split_terminal = true;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
return config;
|
|
453
|
-
}
|
|
454
406
|
}
|
|
455
407
|
|
|
456
408
|
manage.define({
|