@kylewadegrove/cutline-mcp-cli 0.5.0 → 0.6.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/dist/commands/setup.js +20 -1
- package/dist/index.js +5 -0
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -128,6 +128,12 @@ export async function setupCommand(options) {
|
|
|
128
128
|
console.log(chalk.dim(' No credentials found — starting login flow.\n'));
|
|
129
129
|
await loginCommand({ staging: options.staging });
|
|
130
130
|
console.log();
|
|
131
|
+
const tokenAfterLogin = await getRefreshToken();
|
|
132
|
+
if (!tokenAfterLogin) {
|
|
133
|
+
console.log(chalk.yellow(' Login not completed — trying account creation instead.\n'));
|
|
134
|
+
await loginCommand({ staging: options.staging, signup: true });
|
|
135
|
+
console.log();
|
|
136
|
+
}
|
|
131
137
|
}
|
|
132
138
|
const spinner = ora('Detecting account tier...').start();
|
|
133
139
|
const { tier, email, idToken } = await detectTier({ staging: options.staging });
|
|
@@ -142,6 +148,7 @@ export async function setupCommand(options) {
|
|
|
142
148
|
const projectRoot = resolve(options.projectRoot ?? process.cwd());
|
|
143
149
|
const configPath = join(projectRoot, '.cutline', 'config.json');
|
|
144
150
|
const hasExistingConfig = existsSync(configPath);
|
|
151
|
+
let graphConnected = hasExistingConfig;
|
|
145
152
|
if (tier === 'premium' && idToken && !hasExistingConfig) {
|
|
146
153
|
const productSpinner = ora('Fetching your product graphs...').start();
|
|
147
154
|
const products = await fetchProducts(idToken, { staging: options.staging });
|
|
@@ -167,11 +174,18 @@ export async function setupCommand(options) {
|
|
|
167
174
|
}, null, 2) + '\n');
|
|
168
175
|
console.log(chalk.green(`\n ✓ Connected to "${selected.name}"`));
|
|
169
176
|
console.log(chalk.dim(` ${configPath}\n`));
|
|
177
|
+
graphConnected = true;
|
|
170
178
|
}
|
|
171
179
|
else {
|
|
172
180
|
console.log(chalk.dim('\n Skipped. Run `cutline-mcp setup` again to connect later.\n'));
|
|
173
181
|
}
|
|
174
182
|
}
|
|
183
|
+
else {
|
|
184
|
+
console.log(chalk.dim(' No completed product graphs found.'));
|
|
185
|
+
console.log(chalk.dim(' Ask your AI agent to "Run a deep dive on my product idea" first,'));
|
|
186
|
+
console.log(chalk.dim(' then re-run'), chalk.cyan('cutline-mcp setup'), chalk.dim('to connect it.'));
|
|
187
|
+
console.log();
|
|
188
|
+
}
|
|
175
189
|
}
|
|
176
190
|
else if (hasExistingConfig) {
|
|
177
191
|
try {
|
|
@@ -223,14 +237,19 @@ export async function setupCommand(options) {
|
|
|
223
237
|
}
|
|
224
238
|
console.log();
|
|
225
239
|
// ── 6. What you can do ───────────────────────────────────────────────────
|
|
226
|
-
console.log(chalk.bold('
|
|
240
|
+
console.log(chalk.bold(' Start a new terminal or restart your MCP servers, then ask your AI agent:\n'));
|
|
227
241
|
if (tier === 'premium') {
|
|
242
|
+
if (!graphConnected) {
|
|
243
|
+
console.log(` ${chalk.cyan('→')} ${chalk.white('cutline-mcp setup')} ${chalk.dim('(re-run to connect a product graph)')}`);
|
|
244
|
+
console.log(` ${chalk.dim('Link a pre-mortem to unlock constraint-aware code guidance')}`);
|
|
245
|
+
}
|
|
228
246
|
const items = [
|
|
229
247
|
{ cmd: 'Run a deep dive on my product idea', desc: 'Pre-mortem analysis — risks, assumptions, experiments' },
|
|
230
248
|
{ cmd: 'Run a code audit for my product', desc: 'Security scan + RGR remediation plan' },
|
|
231
249
|
{ cmd: 'Check constraints for src/api/upload.ts', desc: 'Get NFR boundaries for a specific file' },
|
|
232
250
|
{ cmd: 'Generate .cutline.md for my product', desc: 'Write the constraint routing engine' },
|
|
233
251
|
{ cmd: 'What does my persona think about X?', desc: 'AI persona feedback on features' },
|
|
252
|
+
...(!graphConnected ? [{ cmd: 'Connect my Cutline product graph', desc: 'Link a completed pre-mortem for constraint-aware code guidance' }] : []),
|
|
234
253
|
];
|
|
235
254
|
for (const item of items) {
|
|
236
255
|
console.log(` ${chalk.cyan('→')} ${chalk.white(`"${item.cmd}"`)}`);
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,11 @@ program
|
|
|
25
25
|
.option('--signup', 'Open sign-up page instead of sign-in')
|
|
26
26
|
.option('--email <address>', 'Request sign-in with specific email address')
|
|
27
27
|
.action(loginCommand);
|
|
28
|
+
program
|
|
29
|
+
.command('signup')
|
|
30
|
+
.description('Create a new Cutline account')
|
|
31
|
+
.option('--staging', 'Use staging environment')
|
|
32
|
+
.action((opts) => loginCommand({ signup: true, staging: opts.staging }));
|
|
28
33
|
program
|
|
29
34
|
.command('logout')
|
|
30
35
|
.description('Remove stored credentials')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kylewadegrove/cutline-mcp-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "CLI and MCP servers for Cutline — authenticate, then run constraint-aware MCP servers in Cursor or any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|