@nikelyh/metamorph 2.0.8 → 2.0.9
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 +24 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2209,13 +2209,19 @@ program.command("run [path]").description("Run a migration on the specified dire
|
|
|
2209
2209
|
console.log(chalk.gray(`Target: ${targetPath} | ${from} -> ${to}
|
|
2210
2210
|
`));
|
|
2211
2211
|
if (!process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY) {
|
|
2212
|
-
console.log(chalk.
|
|
2213
|
-
\
|
|
2214
|
-
console.log(chalk.yellow(`
|
|
2215
|
-
console.log(chalk.yellow(`
|
|
2216
|
-
console.log(chalk.yellow(` Linux/macOS: export OPENAI_API_KEY="sk-..."`));
|
|
2217
|
-
console.log(chalk.yellow(` Windows (PowerShell): $env:OPENAI_API_KEY="sk-..."
|
|
2212
|
+
console.log(chalk.red(`
|
|
2213
|
+
\u274C ERROR: No LLM API key detected.`));
|
|
2214
|
+
console.log(chalk.yellow(`Metamorph requires an API key (OPENAI_API_KEY or ANTHROPIC_API_KEY) to power the AI Worker agents.`));
|
|
2215
|
+
console.log(chalk.yellow(`Execution has been blocked to prevent agents from crashing during the migration.
|
|
2218
2216
|
`));
|
|
2217
|
+
console.log(chalk.white(`To fix this, you can either:`));
|
|
2218
|
+
console.log(chalk.gray(` 1. Create a `) + chalk.cyan(`.env`) + chalk.gray(` file in your current directory with:`));
|
|
2219
|
+
console.log(chalk.green(` OPENAI_API_KEY=sk-...`));
|
|
2220
|
+
console.log(chalk.gray(` 2. Or set it directly in your terminal:`));
|
|
2221
|
+
console.log(chalk.gray(` Linux/macOS: `) + chalk.cyan(`export OPENAI_API_KEY="sk-..."`));
|
|
2222
|
+
console.log(chalk.gray(` Windows: `) + chalk.cyan(`$env:OPENAI_API_KEY="sk-..."
|
|
2223
|
+
`));
|
|
2224
|
+
process.exit(1);
|
|
2219
2225
|
}
|
|
2220
2226
|
const spinner = ora("Initializing...").start();
|
|
2221
2227
|
try {
|
|
@@ -2320,13 +2326,19 @@ program.command("ui").description("Start the Metamorph Dashboard API server").op
|
|
|
2320
2326
|
const open = (await import("open")).default;
|
|
2321
2327
|
const port = await getPort({ port: desiredPort });
|
|
2322
2328
|
if (!process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY) {
|
|
2323
|
-
console.log(chalk.
|
|
2324
|
-
\
|
|
2325
|
-
console.log(chalk.yellow(`
|
|
2326
|
-
console.log(chalk.yellow(`
|
|
2327
|
-
console.log(chalk.yellow(` Linux/macOS: export OPENAI_API_KEY="sk-..."`));
|
|
2328
|
-
console.log(chalk.yellow(` Windows (PowerShell): $env:OPENAI_API_KEY="sk-..."
|
|
2329
|
+
console.log(chalk.red(`
|
|
2330
|
+
\u274C ERROR: No LLM API key detected.`));
|
|
2331
|
+
console.log(chalk.yellow(`Metamorph requires an API key (OPENAI_API_KEY or ANTHROPIC_API_KEY) to power the AI Worker agents.`));
|
|
2332
|
+
console.log(chalk.yellow(`Execution has been blocked to prevent agents from crashing during the migration.
|
|
2329
2333
|
`));
|
|
2334
|
+
console.log(chalk.white(`To fix this, you can either:`));
|
|
2335
|
+
console.log(chalk.gray(` 1. Create a `) + chalk.cyan(`.env`) + chalk.gray(` file in your current directory with:`));
|
|
2336
|
+
console.log(chalk.green(` OPENAI_API_KEY=sk-...`));
|
|
2337
|
+
console.log(chalk.gray(` 2. Or set it directly in your terminal:`));
|
|
2338
|
+
console.log(chalk.gray(` Linux/macOS: `) + chalk.cyan(`export OPENAI_API_KEY="sk-..."`));
|
|
2339
|
+
console.log(chalk.gray(` Windows: `) + chalk.cyan(`$env:OPENAI_API_KEY="sk-..."
|
|
2340
|
+
`));
|
|
2341
|
+
process.exit(1);
|
|
2330
2342
|
}
|
|
2331
2343
|
const store = new SQLiteStateStore(".metamorph");
|
|
2332
2344
|
const tools = [
|