komodo-cli 0.2.0 → 0.3.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/index.js +1 -59
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42995,14 +42995,10 @@ async function handleUI(projectPath) {
|
|
|
42995
42995
|
}
|
|
42996
42996
|
}
|
|
42997
42997
|
program.argument("[intent]", "What you want to build").option("-p, --path <path>", "Project folder", process.cwd()).option("--preview", "See what will be set up without making changes").option("-i, --interactive", "Enter interactive mode").action(async (intent, options) => {
|
|
42998
|
-
if (options.interactive || !intent
|
|
42998
|
+
if (options.interactive || !intent) {
|
|
42999
42999
|
await startInteractiveMode(options.path);
|
|
43000
43000
|
return;
|
|
43001
43001
|
}
|
|
43002
|
-
if (!intent) {
|
|
43003
|
-
await showStatus(options.path);
|
|
43004
|
-
return;
|
|
43005
|
-
}
|
|
43006
43002
|
const spinner = (0, import_ora.default)();
|
|
43007
43003
|
const hardware = komodo3.getHardware();
|
|
43008
43004
|
console.log();
|
|
@@ -43085,60 +43081,6 @@ program.argument("[intent]", "What you want to build").option("-p, --path <path>
|
|
|
43085
43081
|
process.exit(1);
|
|
43086
43082
|
}
|
|
43087
43083
|
});
|
|
43088
|
-
async function showStatus(path3) {
|
|
43089
|
-
const hardware = komodo3.getHardware();
|
|
43090
|
-
const state = await loadState(path3);
|
|
43091
|
-
console.log();
|
|
43092
|
-
console.log(import_chalk.default.bold("\u{1F98E} Komodo"));
|
|
43093
|
-
console.log();
|
|
43094
|
-
console.log(import_chalk.default.dim(" Your computer:"));
|
|
43095
|
-
console.log(` ${formatOs(hardware.os)} \xB7 ${formatGpu(hardware)} \xB7 ${hardware.totalMemoryGb}GB memory`);
|
|
43096
|
-
console.log();
|
|
43097
|
-
if (state.activeEnvironmentId) {
|
|
43098
|
-
const activeEnv = state.environments.find((e) => e.id === state.activeEnvironmentId);
|
|
43099
|
-
if (activeEnv) {
|
|
43100
|
-
const installed = await getInstalledPackages(path3, activeEnv.runtime);
|
|
43101
|
-
const conflicts = detectConflicts(installed);
|
|
43102
|
-
const health = analyzeHealth(installed, conflicts);
|
|
43103
|
-
console.log(import_chalk.default.dim(" Installed:"));
|
|
43104
|
-
if (installed.length === 0) {
|
|
43105
|
-
console.log(import_chalk.default.dim(" Nothing yet"));
|
|
43106
|
-
} else {
|
|
43107
|
-
const displayCount = Math.min(installed.length, 8);
|
|
43108
|
-
installed.slice(0, displayCount).forEach((pkg) => {
|
|
43109
|
-
console.log(` ${friendlyPackageName(pkg.name)} ${import_chalk.default.dim(pkg.version)}`);
|
|
43110
|
-
});
|
|
43111
|
-
if (installed.length > displayCount) {
|
|
43112
|
-
console.log(import_chalk.default.dim(` ...and ${installed.length - displayCount} more`));
|
|
43113
|
-
}
|
|
43114
|
-
}
|
|
43115
|
-
console.log();
|
|
43116
|
-
if (health.healthy) {
|
|
43117
|
-
console.log(import_chalk.default.green(" \u2713 Everything looks good"));
|
|
43118
|
-
} else {
|
|
43119
|
-
console.log(import_chalk.default.yellow(` \u26A0 ${health.issues.length} thing${health.issues.length > 1 ? "s" : ""} to check`));
|
|
43120
|
-
health.issues.slice(0, 3).forEach((issue) => {
|
|
43121
|
-
console.log(import_chalk.default.dim(` \u2022 ${issue.title}`));
|
|
43122
|
-
});
|
|
43123
|
-
}
|
|
43124
|
-
console.log();
|
|
43125
|
-
}
|
|
43126
|
-
} else {
|
|
43127
|
-
console.log(import_chalk.default.dim(" Nothing installed yet."));
|
|
43128
|
-
console.log();
|
|
43129
|
-
console.log(import_chalk.default.dim(" Try:"));
|
|
43130
|
-
console.log(` komodo "build a website"`);
|
|
43131
|
-
console.log(` komodo "analyze some data"`);
|
|
43132
|
-
console.log(` komodo "create a chatbot"`);
|
|
43133
|
-
console.log();
|
|
43134
|
-
}
|
|
43135
|
-
console.log(import_chalk.default.dim(" Commands:"));
|
|
43136
|
-
console.log(` komodo ${import_chalk.default.dim("Enter interactive mode")}`);
|
|
43137
|
-
console.log(` komodo "what you want to build" ${import_chalk.default.dim("Set things up")}`);
|
|
43138
|
-
console.log(` komodo undo ${import_chalk.default.dim("Undo last change")}`);
|
|
43139
|
-
console.log(` komodo ui ${import_chalk.default.dim("Open visual dashboard")}`);
|
|
43140
|
-
console.log();
|
|
43141
|
-
}
|
|
43142
43084
|
program.command("undo").description("Undo your last change").option("-p, --path <path>", "Project folder", process.cwd()).action(async (options) => {
|
|
43143
43085
|
const spinner = (0, import_ora.default)("Undoing...").start();
|
|
43144
43086
|
const result = await komodo3.rollback(options.path);
|