@meltstudio/meltctl 4.14.2 → 4.16.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/init.js +32 -14
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -134,6 +134,22 @@ export async function initCommand(options) {
|
|
|
134
134
|
process.exit(1);
|
|
135
135
|
}
|
|
136
136
|
const cwd = process.cwd();
|
|
137
|
+
// Warn if not in a git repository — likely the wrong directory
|
|
138
|
+
const isGitRepo = await fs.pathExists(path.join(cwd, '.git'));
|
|
139
|
+
if (!isGitRepo) {
|
|
140
|
+
console.log(chalk.yellow(`Warning: ${cwd} is not a git repository.`));
|
|
141
|
+
console.log(chalk.dim('meltctl init should be run from the root of your project.'));
|
|
142
|
+
console.log();
|
|
143
|
+
const proceed = await confirm({
|
|
144
|
+
message: 'Continue initializing here anyway?',
|
|
145
|
+
default: false,
|
|
146
|
+
});
|
|
147
|
+
if (!proceed) {
|
|
148
|
+
console.log(chalk.dim('Aborted. cd into your project root and try again.'));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
console.log();
|
|
152
|
+
}
|
|
137
153
|
const alreadyInitialized = await fs.pathExists(path.join(cwd, 'AGENTS.md'));
|
|
138
154
|
let isReInit = false;
|
|
139
155
|
let tools;
|
|
@@ -272,26 +288,28 @@ export async function initCommand(options) {
|
|
|
272
288
|
console.log();
|
|
273
289
|
}
|
|
274
290
|
if (!isReInit) {
|
|
275
|
-
|
|
291
|
+
console.log(chalk.bold.cyan(' Next step: run /melt-setup to customize AGENTS.md for your project'));
|
|
292
|
+
console.log();
|
|
276
293
|
if (tools.claude && tools.cursor) {
|
|
277
|
-
|
|
294
|
+
console.log(chalk.dim(' Claude Code:'));
|
|
295
|
+
console.log(chalk.dim(' - Type /melt-setup in the chat prompt, or'));
|
|
296
|
+
console.log(chalk.dim(' - Open the skills menu and select melt-setup'));
|
|
297
|
+
console.log();
|
|
298
|
+
console.log(chalk.dim(' Cursor:'));
|
|
299
|
+
console.log(chalk.dim(' - Open the command menu (Cmd+K) and search for melt-setup'));
|
|
278
300
|
}
|
|
279
301
|
else if (tools.claude) {
|
|
280
|
-
|
|
302
|
+
console.log(chalk.dim(' In Claude Code:'));
|
|
303
|
+
console.log(chalk.dim(' - Type /melt-setup in the chat prompt, or'));
|
|
304
|
+
console.log(chalk.dim(' - Open the skills menu and select melt-setup'));
|
|
281
305
|
}
|
|
282
306
|
else {
|
|
283
|
-
|
|
307
|
+
console.log(chalk.dim(' In Cursor:'));
|
|
308
|
+
console.log(chalk.dim(' - Open the command menu (Cmd+K) and search for melt-setup'));
|
|
284
309
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const space = ' '.repeat(pad);
|
|
289
|
-
const empty = ' '.repeat(inner);
|
|
290
|
-
console.log(chalk.bold.cyan(` ┌${line}┐`));
|
|
291
|
-
console.log(chalk.bold.cyan(` │${empty}│`));
|
|
292
|
-
console.log(chalk.bold.cyan(` │${space}${msg}${space}│`));
|
|
293
|
-
console.log(chalk.bold.cyan(` │${empty}│`));
|
|
294
|
-
console.log(chalk.bold.cyan(` └${line}┘`));
|
|
310
|
+
console.log();
|
|
311
|
+
console.log(chalk.dim(' The setup skill will analyze your project and fill in AGENTS.md.'));
|
|
312
|
+
console.log(chalk.dim(' Once it finishes, commit the changes to share with your team.'));
|
|
295
313
|
console.log();
|
|
296
314
|
}
|
|
297
315
|
console.log(chalk.green('Done!'));
|
package/package.json
CHANGED