@slope-dev/cli 0.4.0 → 0.4.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/dist/commands/init.js +25 -1
- package/dist/index.js +1 -0
- package/package.json +8 -8
- package/LICENSE +0 -21
package/dist/commands/init.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { writeFileSync, mkdirSync, existsSync, cpSync, readdirSync } from 'node:fs';
|
|
1
|
+
import { writeFileSync, mkdirSync, existsSync, cpSync, readdirSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { createConfig } from '../config.js';
|
|
@@ -132,6 +132,29 @@ function installGenericTemplates(cwd) {
|
|
|
132
132
|
}
|
|
133
133
|
console.log('\n Generic SLOPE checklist installed.');
|
|
134
134
|
}
|
|
135
|
+
const SLOPE_MCP_ENTRY = {
|
|
136
|
+
command: 'npx',
|
|
137
|
+
args: ['@slope-dev/mcp-tools'],
|
|
138
|
+
};
|
|
139
|
+
function installCursorMcpConfig(cwd) {
|
|
140
|
+
const mcpPath = join(cwd, '.cursor', 'mcp.json');
|
|
141
|
+
let config = {};
|
|
142
|
+
if (existsSync(mcpPath)) {
|
|
143
|
+
try {
|
|
144
|
+
const raw = readFileSync(mcpPath, 'utf8');
|
|
145
|
+
config = JSON.parse(raw);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
config = {};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (!config.mcpServers)
|
|
152
|
+
config.mcpServers = {};
|
|
153
|
+
config.mcpServers.slope = SLOPE_MCP_ENTRY;
|
|
154
|
+
mkdirSync(join(cwd, '.cursor'), { recursive: true });
|
|
155
|
+
writeFileSync(mcpPath, JSON.stringify(config, null, 2) + '\n');
|
|
156
|
+
console.log(` Created/updated ${mcpPath} (slope MCP server)`);
|
|
157
|
+
}
|
|
135
158
|
export function initCommand(args) {
|
|
136
159
|
const cwd = process.cwd();
|
|
137
160
|
const provider = detectProvider(args);
|
|
@@ -168,6 +191,7 @@ export function initCommand(args) {
|
|
|
168
191
|
break;
|
|
169
192
|
case 'cursor':
|
|
170
193
|
installCursorTemplates(cwd);
|
|
194
|
+
installCursorMcpConfig(cwd);
|
|
171
195
|
break;
|
|
172
196
|
case 'generic':
|
|
173
197
|
installGenericTemplates(cwd);
|
package/dist/index.js
CHANGED
|
@@ -107,6 +107,7 @@ Usage:
|
|
|
107
107
|
Examples:
|
|
108
108
|
slope init Create .slope/ with config + example scorecard
|
|
109
109
|
slope init --cursor Also install Cursor IDE rules
|
|
110
|
+
slope init --cursor Also add SLOPE MCP server to .cursor/mcp.json
|
|
110
111
|
slope init --claude-code Also install Claude Code rules + hooks
|
|
111
112
|
slope card Show handicap across all scorecards
|
|
112
113
|
slope validate docs/retros/sprint-1.json Validate a specific scorecard
|
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slope-dev/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "SLOPE CLI — Sprint Lifecycle & Operational Performance Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"slope": "./dist/index.js"
|
|
8
8
|
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"test": "vitest run",
|
|
12
|
+
"typecheck": "tsc --noEmit"
|
|
13
|
+
},
|
|
9
14
|
"dependencies": {
|
|
10
|
-
"@slope-dev/core": "0.3.3"
|
|
15
|
+
"@slope-dev/core": "^0.3.3"
|
|
11
16
|
},
|
|
12
17
|
"devDependencies": {
|
|
13
18
|
"@types/node": "^25.3.0",
|
|
@@ -35,10 +40,5 @@
|
|
|
35
40
|
],
|
|
36
41
|
"engines": {
|
|
37
42
|
"node": ">=18"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsc",
|
|
41
|
-
"test": "vitest run",
|
|
42
|
-
"typecheck": "tsc --noEmit"
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Sam Bryers
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|