@nolrm/contextkit 0.13.4 → 0.13.7
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 +65 -46
- package/bin/contextkit.js +4 -2
- package/lib/commands/analyze.js +131 -91
- package/lib/commands/check.js +24 -18
- package/lib/commands/install.js +274 -71
- package/lib/commands/note.js +12 -20
- package/lib/commands/run.js +20 -22
- package/lib/commands/status.js +61 -32
- package/lib/commands/update.js +25 -26
- package/lib/index.js +1 -1
- package/lib/integrations/aider-integration.js +1 -1
- package/lib/integrations/base-integration.js +13 -6
- package/lib/integrations/claude-integration.js +103 -41
- package/lib/integrations/continue-integration.js +5 -5
- package/lib/integrations/copilot-integration.js +1 -1
- package/lib/integrations/cursor-integration.js +70 -28
- package/lib/integrations/gemini-integration.js +13 -11
- package/lib/integrations/index.js +11 -1
- package/lib/utils/banner.js +14 -11
- package/lib/utils/download.js +3 -4
- package/lib/utils/git-hooks.js +3 -4
- package/lib/utils/migrations.js +6 -4
- package/lib/utils/migrations.md +4 -3
- package/lib/utils/notifier.js +1 -1
- package/lib/utils/project-detector.js +11 -5
- package/lib/utils/status-manager.js +6 -7
- package/lib/utils/tool-detector.js +19 -21
- package/package.json +8 -2
package/lib/utils/migrations.md
CHANGED
|
@@ -20,12 +20,13 @@ No constructor arguments.
|
|
|
20
20
|
|
|
21
21
|
Runs all pending migrations from `currentVersion` up to `CURRENT_FORMAT_VERSION`.
|
|
22
22
|
|
|
23
|
-
| Param
|
|
24
|
-
|
|
23
|
+
| Param | Type | Description |
|
|
24
|
+
| ---------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
25
25
|
| `currentVersion` | `number \| undefined \| null` | Value of `format_version` from config.yml. `undefined`/`null` is treated as `0` (pre-1.0.0 install). |
|
|
26
|
-
| `configPath`
|
|
26
|
+
| `configPath` | `string` | Absolute or relative path to `.contextkit/config.yml`. |
|
|
27
27
|
|
|
28
28
|
**Behaviour:**
|
|
29
|
+
|
|
29
30
|
- If `currentVersion` is missing/null → treated as `0`, runs v0→v1
|
|
30
31
|
- If `currentVersion === CURRENT_FORMAT_VERSION` → no-op
|
|
31
32
|
- If `currentVersion > CURRENT_FORMAT_VERSION` → logs warning, returns without modifying config
|
package/lib/utils/notifier.js
CHANGED
|
@@ -9,11 +9,17 @@ class ProjectDetector {
|
|
|
9
9
|
detectProjectType() {
|
|
10
10
|
if (fs.existsSync('package.json')) {
|
|
11
11
|
const packageJson = this.readPackageJson();
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
// Detect framework
|
|
14
|
-
if (
|
|
14
|
+
if (
|
|
15
|
+
this.hasDependency(packageJson, 'react') ||
|
|
16
|
+
this.hasDependency(packageJson, '@types/react')
|
|
17
|
+
) {
|
|
15
18
|
return this.detectReactVariant(packageJson);
|
|
16
|
-
} else if (
|
|
19
|
+
} else if (
|
|
20
|
+
this.hasDependency(packageJson, 'vue') ||
|
|
21
|
+
this.hasDependency(packageJson, '@vue')
|
|
22
|
+
) {
|
|
17
23
|
return this.detectVueVariant(packageJson);
|
|
18
24
|
} else if (this.hasDependency(packageJson, '@angular/core')) {
|
|
19
25
|
return 'angular';
|
|
@@ -39,7 +45,7 @@ class ProjectDetector {
|
|
|
39
45
|
} else if (fs.existsSync('pom.xml') || fs.existsSync('build.gradle')) {
|
|
40
46
|
return 'java';
|
|
41
47
|
}
|
|
42
|
-
|
|
48
|
+
|
|
43
49
|
return 'generic';
|
|
44
50
|
}
|
|
45
51
|
|
|
@@ -89,7 +95,7 @@ class ProjectDetector {
|
|
|
89
95
|
readPackageJson() {
|
|
90
96
|
try {
|
|
91
97
|
return JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
92
|
-
} catch
|
|
98
|
+
} catch {
|
|
93
99
|
return {};
|
|
94
100
|
}
|
|
95
101
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const fs = require('fs-extra');
|
|
2
|
-
const path = require('path');
|
|
3
2
|
|
|
4
3
|
class StatusManager {
|
|
5
4
|
constructor() {
|
|
@@ -28,14 +27,14 @@ class StatusManager {
|
|
|
28
27
|
last_run: null,
|
|
29
28
|
customizations: [],
|
|
30
29
|
project_type: null,
|
|
31
|
-
package_manager: null
|
|
30
|
+
package_manager: null,
|
|
32
31
|
},
|
|
33
32
|
features: {
|
|
34
33
|
pre_push_hook: false,
|
|
35
34
|
commit_msg_hook: false,
|
|
36
35
|
standards: true,
|
|
37
|
-
templates: true
|
|
38
|
-
}
|
|
36
|
+
templates: true,
|
|
37
|
+
},
|
|
39
38
|
};
|
|
40
39
|
}
|
|
41
40
|
|
|
@@ -55,7 +54,7 @@ class StatusManager {
|
|
|
55
54
|
last_run: new Date().toISOString(),
|
|
56
55
|
customizations: analyzeData.customizations || [],
|
|
57
56
|
project_type: analyzeData.project_type,
|
|
58
|
-
package_manager: analyzeData.package_manager
|
|
57
|
+
package_manager: analyzeData.package_manager,
|
|
59
58
|
};
|
|
60
59
|
status.last_updated = new Date().toISOString();
|
|
61
60
|
await this.saveStatus(status);
|
|
@@ -80,7 +79,7 @@ class StatusManager {
|
|
|
80
79
|
lastRun: status.analyze.last_run,
|
|
81
80
|
projectType: status.analyze.project_type,
|
|
82
81
|
packageManager: status.analyze.package_manager,
|
|
83
|
-
customizations: status.analyze.customizations
|
|
82
|
+
customizations: status.analyze.customizations,
|
|
84
83
|
};
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -98,7 +97,7 @@ class StatusManager {
|
|
|
98
97
|
last_run: null,
|
|
99
98
|
customizations: [],
|
|
100
99
|
project_type: null,
|
|
101
|
-
package_manager: null
|
|
100
|
+
package_manager: null,
|
|
102
101
|
};
|
|
103
102
|
status.last_updated = new Date().toISOString();
|
|
104
103
|
await this.saveStatus(status);
|
|
@@ -45,24 +45,22 @@ class ToolDetector {
|
|
|
45
45
|
.filter(([_, isDetected]) => isDetected)
|
|
46
46
|
.map(([tool, _]) => tool);
|
|
47
47
|
|
|
48
|
-
const editors = detected.filter(t =>
|
|
49
|
-
|
|
48
|
+
const editors = detected.filter((t) =>
|
|
49
|
+
['cursor', 'continue', 'aider', 'vscode', 'jetbrains', 'windsurf'].includes(t)
|
|
50
|
+
);
|
|
51
|
+
const cli = detected.filter((t) => t.endsWith('_cli'));
|
|
50
52
|
|
|
51
53
|
return {
|
|
52
54
|
all: detected,
|
|
53
55
|
editors,
|
|
54
56
|
cli,
|
|
55
|
-
count: detected.length
|
|
57
|
+
count: detected.length,
|
|
56
58
|
};
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
async detectCursor() {
|
|
60
62
|
// Check for Cursor in multiple locations
|
|
61
|
-
const paths = [
|
|
62
|
-
'.cursor/rules',
|
|
63
|
-
'.cursor',
|
|
64
|
-
`${process.env.HOME}/.cursor`,
|
|
65
|
-
];
|
|
63
|
+
const paths = ['.cursor/rules', '.cursor', `${process.env.HOME}/.cursor`];
|
|
66
64
|
|
|
67
65
|
for (const path of paths) {
|
|
68
66
|
if (await fs.pathExists(path)) {
|
|
@@ -78,7 +76,7 @@ class ToolDetector {
|
|
|
78
76
|
|
|
79
77
|
async detectAider() {
|
|
80
78
|
// Check if .aider directory exists or if aider is in PATH
|
|
81
|
-
return await fs.pathExists('.aider') || await this.detectCLITool('aider');
|
|
79
|
+
return (await fs.pathExists('.aider')) || (await this.detectCLITool('aider'));
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
async detectVSCode() {
|
|
@@ -90,7 +88,7 @@ class ToolDetector {
|
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
async detectWindsurf() {
|
|
93
|
-
return await fs.pathExists('.windsurf') || await fs.pathExists('.windsurfrules');
|
|
91
|
+
return (await fs.pathExists('.windsurf')) || (await fs.pathExists('.windsurfrules'));
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
/**
|
|
@@ -111,20 +109,20 @@ class ToolDetector {
|
|
|
111
109
|
getRecommendedOrder(detected) {
|
|
112
110
|
// Prioritize: Editors with good integration, then CLI tools
|
|
113
111
|
const priority = [
|
|
114
|
-
'cursor',
|
|
115
|
-
'continue',
|
|
116
|
-
'aider',
|
|
117
|
-
'windsurf',
|
|
118
|
-
'vscode',
|
|
119
|
-
'jetbrains',
|
|
120
|
-
'aider_cli',
|
|
121
|
-
'claude_cli',
|
|
122
|
-
'gemini_cli',
|
|
123
|
-
'codex_cli',
|
|
112
|
+
'cursor', // Already fully supported
|
|
113
|
+
'continue', // Great integration, multi-editor
|
|
114
|
+
'aider', // Agentic, powerful
|
|
115
|
+
'windsurf', // New, promising
|
|
116
|
+
'vscode', // Widely used
|
|
117
|
+
'jetbrains', // Enterprise
|
|
118
|
+
'aider_cli', // CLI with auto-rules
|
|
119
|
+
'claude_cli', // Good CLI
|
|
120
|
+
'gemini_cli', // Alternative CLI
|
|
121
|
+
'codex_cli', // OpenAI Codex CLI
|
|
124
122
|
'opencode_cli', // OpenCode CLI
|
|
125
123
|
];
|
|
126
124
|
|
|
127
|
-
return priority.filter(tool => detected[tool]);
|
|
125
|
+
return priority.filter((tool) => detected[tool]);
|
|
128
126
|
}
|
|
129
127
|
|
|
130
128
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nolrm/contextkit",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7",
|
|
4
4
|
"description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"vk": "bin/vibe-kit.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
+
"format": "prettier --write \"lib/**/*.js\" \"bin/**/*.js\" \"__tests__/**/*.js\"",
|
|
14
|
+
"lint": "eslint lib/ bin/ __tests__/",
|
|
13
15
|
"test": "jest",
|
|
14
16
|
"test:watch": "jest --watch",
|
|
15
17
|
"test:coverage": "jest --coverage",
|
|
@@ -81,7 +83,11 @@
|
|
|
81
83
|
],
|
|
82
84
|
"preferGlobal": true,
|
|
83
85
|
"devDependencies": {
|
|
86
|
+
"@eslint/js": "^10.0.1",
|
|
84
87
|
"@types/jest": "^30.0.0",
|
|
85
|
-
"
|
|
88
|
+
"eslint": "^10.0.3",
|
|
89
|
+
"globals": "^17.4.0",
|
|
90
|
+
"jest": "^30.2.0",
|
|
91
|
+
"prettier": "^3.8.1"
|
|
86
92
|
}
|
|
87
93
|
}
|