@meltstudio/meltctl 4.69.0 → 4.69.2
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/index.js +29 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var CLI_VERSION;
|
|
|
14
14
|
var init_version = __esm({
|
|
15
15
|
"src/utils/version.ts"() {
|
|
16
16
|
"use strict";
|
|
17
|
-
CLI_VERSION = "4.69.
|
|
17
|
+
CLI_VERSION = "4.69.2";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -14763,9 +14763,9 @@ description: Connect and verify required integrations (ticket tracker, browser t
|
|
|
14763
14763
|
var GITIGNORE_ENTRIES = [".env.local", ".claude/settings.local.json"];
|
|
14764
14764
|
function detectExistingTools(cwd) {
|
|
14765
14765
|
return {
|
|
14766
|
-
claude: fs2.pathExistsSync(path2.join(cwd, ".claude/
|
|
14767
|
-
cursor: fs2.pathExistsSync(path2.join(cwd, ".cursor/commands")),
|
|
14768
|
-
opencode: fs2.pathExistsSync(path2.join(cwd, ".opencode/commands"))
|
|
14766
|
+
claude: fs2.pathExistsSync(path2.join(cwd, ".claude/skills/melt-setup/SKILL.md")),
|
|
14767
|
+
cursor: fs2.pathExistsSync(path2.join(cwd, ".cursor/commands/melt-setup.md")),
|
|
14768
|
+
opencode: fs2.pathExistsSync(path2.join(cwd, ".opencode/commands/melt-setup.md"))
|
|
14769
14769
|
};
|
|
14770
14770
|
}
|
|
14771
14771
|
async function promptToolSelection(existingTools) {
|
|
@@ -14815,11 +14815,10 @@ async function initCommand(options) {
|
|
|
14815
14815
|
}
|
|
14816
14816
|
console.log();
|
|
14817
14817
|
}
|
|
14818
|
-
const
|
|
14819
|
-
|
|
14818
|
+
const existing = detectExistingTools(cwd);
|
|
14819
|
+
const alreadyInitialized = existing.claude || existing.cursor || existing.opencode;
|
|
14820
14820
|
let tools;
|
|
14821
14821
|
if (alreadyInitialized && !options.force) {
|
|
14822
|
-
const existing = detectExistingTools(cwd);
|
|
14823
14822
|
const existingNames = [
|
|
14824
14823
|
existing.claude ? "Claude Code" : "",
|
|
14825
14824
|
existing.cursor ? "Cursor" : "",
|
|
@@ -14834,7 +14833,6 @@ async function initCommand(options) {
|
|
|
14834
14833
|
console.log(
|
|
14835
14834
|
chalk2.dim(`Project already initialized${existingNames ? ` with ${existingNames}` : ""}.`)
|
|
14836
14835
|
);
|
|
14837
|
-
isReInit = true;
|
|
14838
14836
|
if (options.claude || options.cursor || options.opencode) {
|
|
14839
14837
|
tools = {
|
|
14840
14838
|
claude: !!options.claude,
|
|
@@ -14904,19 +14902,25 @@ async function initCommand(options) {
|
|
|
14904
14902
|
"help",
|
|
14905
14903
|
"link"
|
|
14906
14904
|
];
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14905
|
+
const agentsMdPath = path2.join(cwd, "AGENTS.md");
|
|
14906
|
+
const agentsMdExists = await fs2.pathExists(agentsMdPath);
|
|
14907
|
+
const agentsMd = templates["agents-md.md"];
|
|
14908
|
+
if (agentsMd) {
|
|
14909
|
+
if (!agentsMdExists) {
|
|
14910
|
+
await fs2.writeFile(agentsMdPath, agentsMd, "utf-8");
|
|
14911
14911
|
createdFiles.push("AGENTS.md");
|
|
14912
|
+
} else if (options.resetAgents) {
|
|
14913
|
+
await fs2.writeFile(agentsMdPath, agentsMd, "utf-8");
|
|
14914
|
+
createdFiles.push("AGENTS.md (reset)");
|
|
14912
14915
|
}
|
|
14913
|
-
const mcpConfig = templates["mcp-configs/base.json"];
|
|
14914
|
-
if (mcpConfig) {
|
|
14915
|
-
await mergeMcpConfig(cwd, mcpConfig);
|
|
14916
|
-
createdFiles.push(".mcp.json");
|
|
14917
|
-
}
|
|
14918
|
-
await updateGitignore(cwd);
|
|
14919
14916
|
}
|
|
14917
|
+
const mcpConfig = templates["mcp-configs/base.json"];
|
|
14918
|
+
if (mcpConfig) {
|
|
14919
|
+
const wroteNew = !await fs2.pathExists(path2.join(cwd, ".mcp.json"));
|
|
14920
|
+
await mergeMcpConfig(cwd, mcpConfig);
|
|
14921
|
+
if (wroteNew) createdFiles.push(".mcp.json");
|
|
14922
|
+
}
|
|
14923
|
+
await updateGitignore(cwd);
|
|
14920
14924
|
if (tools.claude) {
|
|
14921
14925
|
const claudeSettings = templates["claude-settings.json"];
|
|
14922
14926
|
if (claudeSettings) {
|
|
@@ -14992,7 +14996,8 @@ async function initCommand(options) {
|
|
|
14992
14996
|
if (tools.claude || tools.cursor || tools.opencode) {
|
|
14993
14997
|
console.log();
|
|
14994
14998
|
}
|
|
14995
|
-
|
|
14999
|
+
const wroteFreshAgentsMd = !agentsMdExists || options.resetAgents;
|
|
15000
|
+
if (wroteFreshAgentsMd) {
|
|
14996
15001
|
console.log(
|
|
14997
15002
|
chalk2.bold.cyan(" Next step: run /melt-setup to customize AGENTS.md for your project")
|
|
14998
15003
|
);
|
|
@@ -16113,9 +16118,13 @@ ${chalk16.dim(" /melt-update Update Melt skills to the latest version")}
|
|
|
16113
16118
|
);
|
|
16114
16119
|
project.command("init").description(
|
|
16115
16120
|
"scaffold Melt development tools into the current directory (AGENTS.md, .claude/, .cursor/, .opencode/, .mcp.json)"
|
|
16116
|
-
).option("--force",
|
|
16121
|
+
).option("--force", 'rewrite Melt tool files and bypass the "already initialized" prompt').option(
|
|
16122
|
+
"--reset-agents",
|
|
16123
|
+
"also overwrite AGENTS.md with the template (destructive \u2014 wipes any customizations)"
|
|
16124
|
+
).option("--claude", "generate Claude Code configuration").option("--cursor", "generate Cursor configuration").option("--opencode", "generate OpenCode configuration").action((options) => {
|
|
16117
16125
|
return initCommand({
|
|
16118
16126
|
force: options.force,
|
|
16127
|
+
resetAgents: options.resetAgents,
|
|
16119
16128
|
claude: options.claude,
|
|
16120
16129
|
cursor: options.cursor,
|
|
16121
16130
|
opencode: options.opencode
|
package/package.json
CHANGED