@vortex-ai/cli 0.1.41 → 0.1.50

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/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import { Command } from "commander";
4
4
  import * as path from "path";
5
5
  import * as dotenv from "dotenv";
6
6
  import * as os from "os";
7
+ process.env.DOTENV_CONFIG_QUIET = "true";
7
8
 
8
9
 
9
10
  const monorepoEnv = path.resolve(__dirname, "../../../.env");
@@ -33,24 +34,46 @@ import { searchCommand } from "./commands/search";
33
34
  import { reviewCommand } from "./commands/review";
34
35
  import { issueCommand } from "./commands/issue";
35
36
  import { graphCommand } from "./commands/graph";
36
- import { suggestCommand } from "./commands/suggest";
37
- import { fixNitbitsCommand } from "./commands/fix-nitbits";
38
- import { analyzeCommand } from "./commands/analyze";
37
+
39
38
  import { solveCommand } from "./commands/solve";
40
39
  import { solveIssueCommand } from "./commands/solve-issue";
41
40
  import { cacheCommand } from "./commands/cache";
42
41
 
43
42
  const program = new Command();
44
43
 
44
+ const { version } = require("../package.json");
45
+
45
46
  program
46
47
  .name("vortex")
47
48
  .description("Developer Intelligence & PR Review Engine")
48
- .version("0.1.0");
49
+ .version(version);
49
50
 
50
- program.hook("preAction", (thisCommand, actionCommand) => {
51
+ program.hook("preAction", async (thisCommand, actionCommand) => {
51
52
  if (actionCommand.opts().cache === false) {
52
53
  process.env.VORTEX_DISABLE_CACHE = "true";
53
54
  }
55
+
56
+ const cmdName = actionCommand.name();
57
+ if (['solve', 'solve-issue', 'review', 'suggest', 'analyze', 'search'].includes(cmdName)) {
58
+ const { default: ora } = await import("ora");
59
+ const { default: chalk } = await import("chalk");
60
+
61
+ console.log(`\n ${chalk.cyan('◆')} Vortex\n`);
62
+ const spinner = ora("Looking for model...").start();
63
+
64
+ if (process.env.GEMINI_API_KEY || process.env.OPENROUTER_API_KEY || process.env.GROQ_API_KEY) {
65
+ const priorityString = process.env.VORTEX_MODEL_PRIORITY;
66
+ const models = priorityString
67
+ ? priorityString.split(",").map(s => s.trim()).filter(Boolean)
68
+ : ["nvidia/nemotron-3-ultra-550b-a55b:free", "nex-agi/nex-n2-pro:free", "openrouter/owl-alpha", "gemini-2.5-flash"];
69
+ const topModel = models[0] || "gemini";
70
+ spinner.succeed(`Model router active · priority: ${topModel}\n`);
71
+ } else {
72
+ spinner.fail(chalk.red("No model configured"));
73
+ console.log(`\n Run: ${chalk.cyan('vortex config set gemini "your_key_here"')}\n`);
74
+ process.exit(1);
75
+ }
76
+ }
54
77
  });
55
78
 
56
79
  // ── Core Commands ──
@@ -110,31 +133,6 @@ program
110
133
 
111
134
  // ── AI-Powered Commands ──
112
135
 
113
- program
114
- .command("suggest")
115
- .description("Generate AI-powered code suggestions using repository patterns and historical intelligence")
116
- .requiredOption("--file <path>", "Target file path")
117
- .option("--apply", "Apply suggestions automatically")
118
- .option("--deep", "Enable advanced contextual suggestions")
119
- .option("--no-cache", "Disable LLM response caching")
120
- .action(suggestCommand);
121
-
122
- program
123
- .command("fix-nitbits")
124
- .description("Automatically fix formatting, comments, tests, CI issues, and repository-specific patterns")
125
- .option("--safe", "Apply only deterministic safe fixes")
126
- .option("--dry-run", "Preview fixes without modifying files")
127
- .option("--files <paths>", "Comma-separated list of target files")
128
- .action(fixNitbitsCommand);
129
-
130
- program
131
- .command("analyze")
132
- .description("Analyze other contributors' PRs using repository history and architectural intelligence")
133
- .requiredOption("--pr <number>", "Pull request number", Number)
134
- .option("--deep", "Enable advanced PR intelligence analysis")
135
- .option("--no-cache", "Disable LLM response caching")
136
- .action(analyzeCommand);
137
-
138
136
  program.addCommand(cacheCommand);
139
137
 
140
138
  program.parse();