@meltstudio/meltctl 4.4.1 → 4.5.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/README.md CHANGED
@@ -34,8 +34,8 @@ meltctl version --check
34
34
 
35
35
  - `AGENTS.md` — AI agent instructions and project standards
36
36
  - `.claude/settings.json` — Claude Code permissions
37
- - `.claude/skills/melt-{plan,review,pr,debug}/SKILL.md` — Claude Code workflow skills
38
- - `.cursor/commands/melt-{plan,review,pr,debug}.md` — Cursor workflow commands
37
+ - `.claude/skills/melt-{setup,plan,review,pr,debug}/SKILL.md` — Claude Code workflow skills
38
+ - `.cursor/commands/melt-{setup,plan,review,pr,debug}.md` — Cursor workflow commands
39
39
  - `.mcp.json` — MCP server configuration (Chrome DevTools)
40
40
 
41
41
  ## Requirements
@@ -4,6 +4,12 @@ import fs from 'fs-extra';
4
4
  import path from 'path';
5
5
  import { authenticatedFetch, isAuthenticated } from '../utils/auth.js';
6
6
  const SKILL_FRONTMATTER = {
7
+ setup: `---
8
+ user-invocable: true
9
+ description: Analyze the project and customize AGENTS.md for this codebase
10
+ ---
11
+
12
+ `,
7
13
  plan: `---
8
14
  user-invocable: true
9
15
  description: Design an implementation approach before writing code
@@ -135,7 +141,7 @@ export async function initCommand(options) {
135
141
  console.log(chalk.bold('Initializing Melt development tools...'));
136
142
  console.log();
137
143
  const createdFiles = [];
138
- const workflows = ['plan', 'review', 'pr', 'debug'];
144
+ const workflows = ['setup', 'plan', 'review', 'pr', 'debug'];
139
145
  // Shared files (skip on re-init)
140
146
  if (!isReInit) {
141
147
  const agentsMd = templates['agents-md.md'];
@@ -145,7 +151,7 @@ export async function initCommand(options) {
145
151
  }
146
152
  const mcpConfig = templates['mcp-configs/base.json'];
147
153
  if (mcpConfig) {
148
- await fs.writeFile(path.join(cwd, '.mcp.json'), mcpConfig, 'utf-8');
154
+ await mergeMcpConfig(cwd, mcpConfig);
149
155
  createdFiles.push('.mcp.json');
150
156
  }
151
157
  await updateGitignore(cwd);
@@ -167,7 +173,7 @@ export async function initCommand(options) {
167
173
  await fs.writeFile(path.join(skillDir, 'SKILL.md'), skillContent, 'utf-8');
168
174
  }
169
175
  }
170
- createdFiles.push('.claude/skills/melt-{plan,review,pr,debug}/SKILL.md');
176
+ createdFiles.push('.claude/skills/melt-{setup,plan,review,pr,debug}/SKILL.md');
171
177
  }
172
178
  // Cursor files
173
179
  if (tools.cursor) {
@@ -178,7 +184,7 @@ export async function initCommand(options) {
178
184
  await fs.writeFile(path.join(cwd, `.cursor/commands/melt-${name}.md`), workflowContent, 'utf-8');
179
185
  }
180
186
  }
181
- createdFiles.push('.cursor/commands/melt-{plan,review,pr,debug}.md');
187
+ createdFiles.push('.cursor/commands/melt-{setup,plan,review,pr,debug}.md');
182
188
  }
183
189
  // Print summary
184
190
  console.log(chalk.green('Created files:'));
@@ -190,30 +196,50 @@ export async function initCommand(options) {
190
196
  console.log(chalk.cyan('Want support for your tool? Let us know in #dev on Slack'));
191
197
  console.log();
192
198
  }
193
- if (!isReInit) {
194
- console.log(chalk.yellow('Next steps:'));
195
- console.log(chalk.dim(' 1. Run your AI agent — it will automatically fill in project details in AGENTS.md'));
196
- console.log(chalk.dim(' 2. Commit the generated files'));
197
- console.log();
198
- }
199
199
  if (tools.claude) {
200
- console.log(chalk.yellow('Available skills (type / in Claude Code to use):'));
201
- console.log(chalk.dim(' /plan — Design an implementation approach before writing code'));
202
- console.log(chalk.dim(' /review — Review changes against project standards'));
203
- console.log(chalk.dim(' /pr — Create a well-structured pull request'));
204
- console.log(chalk.dim(' /debug — Systematically investigate and fix bugs'));
205
- console.log();
200
+ const skills = '/melt-setup, /melt-plan, /melt-review, /melt-pr, /melt-debug';
201
+ console.log(chalk.dim(`Available skills: ${skills}`));
206
202
  }
207
203
  if (tools.cursor) {
208
- console.log(chalk.yellow('Available commands (use Cmd+Shift+P in Cursor):'));
209
- console.log(chalk.dim(' melt-plan — Design an implementation approach before writing code'));
210
- console.log(chalk.dim(' melt-review — Review changes against project standards'));
211
- console.log(chalk.dim(' melt-pr — Create a well-structured pull request'));
212
- console.log(chalk.dim(' melt-debug — Systematically investigate and fix bugs'));
204
+ console.log(chalk.dim('Available commands: melt-setup, melt-plan, melt-review, melt-pr, melt-debug'));
205
+ }
206
+ if (tools.claude || tools.cursor) {
207
+ console.log();
208
+ }
209
+ if (!isReInit) {
210
+ const setupCmd = tools.claude ? '/melt-setup' : 'melt-setup';
211
+ const msg = `Next: run ${setupCmd} to customize AGENTS.md for your project`;
212
+ const pad = 3;
213
+ const inner = msg.length + pad * 2;
214
+ const line = '─'.repeat(inner);
215
+ const space = ' '.repeat(pad);
216
+ const empty = ' '.repeat(inner);
217
+ console.log(chalk.bold.cyan(` ┌${line}┐`));
218
+ console.log(chalk.bold.cyan(` │${empty}│`));
219
+ console.log(chalk.bold.cyan(` │${space}${msg}${space}│`));
220
+ console.log(chalk.bold.cyan(` │${empty}│`));
221
+ console.log(chalk.bold.cyan(` └${line}┘`));
213
222
  console.log();
214
223
  }
215
224
  console.log(chalk.green('Done!'));
216
225
  }
226
+ async function mergeMcpConfig(cwd, templateContent) {
227
+ const mcpPath = path.join(cwd, '.mcp.json');
228
+ const templateConfig = JSON.parse(templateContent);
229
+ if (await fs.pathExists(mcpPath)) {
230
+ const existingContent = await fs.readFile(mcpPath, 'utf-8');
231
+ const existingConfig = JSON.parse(existingContent);
232
+ // Merge: add our servers without overwriting existing ones
233
+ existingConfig.mcpServers = {
234
+ ...existingConfig.mcpServers,
235
+ ...templateConfig.mcpServers,
236
+ };
237
+ await fs.writeFile(mcpPath, JSON.stringify(existingConfig, null, 2) + '\n', 'utf-8');
238
+ }
239
+ else {
240
+ await fs.writeFile(mcpPath, templateContent, 'utf-8');
241
+ }
242
+ }
217
243
  async function updateGitignore(cwd) {
218
244
  const gitignorePath = path.join(cwd, '.gitignore');
219
245
  let content = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.4.1",
3
+ "version": "4.5.1",
4
4
  "description": "AI-first development tools for teams - set up AGENTS.md, Claude Code, Cursor, and Copilot standards",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",