@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 +2 -2
- package/dist/commands/init.js +47 -21
- package/package.json +1 -1
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
|
package/dist/commands/init.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
201
|
-
console.log(chalk.dim(
|
|
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.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
console.log(
|
|
212
|
-
|
|
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