@vortex-ai/cli 0.1.45 → 0.1.55
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/.turbo/turbo-build.log +5 -5
- package/README.md +7 -2
- package/dist/index.js +14193 -1484
- package/dist/index.mjs +14189 -1480
- package/package.json +1 -1
- package/src/commands/cache.ts +2 -2
- package/src/commands/config.ts +4 -2
- package/src/commands/init.ts +33 -18
- package/src/commands/review.ts +36 -51
- package/src/commands/search.ts +19 -7
- package/src/commands/solve-issue.ts +2 -1
- package/src/commands/solve.ts +152 -49
- package/src/index.ts +27 -51
- package/.vortex-bm25.json +0 -1
- package/.vortex.db +0 -0
- package/src/commands/analyze.ts +0 -74
- package/src/commands/fix-nitbits.ts +0 -63
- package/src/commands/suggest.ts +0 -54
package/src/index.ts
CHANGED
|
@@ -4,8 +4,6 @@ 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
|
-
|
|
8
|
-
// Suppress dotenv logging
|
|
9
7
|
process.env.DOTENV_CONFIG_QUIET = "true";
|
|
10
8
|
|
|
11
9
|
|
|
@@ -36,13 +34,10 @@ import { searchCommand } from "./commands/search";
|
|
|
36
34
|
import { reviewCommand } from "./commands/review";
|
|
37
35
|
import { issueCommand } from "./commands/issue";
|
|
38
36
|
import { graphCommand } from "./commands/graph";
|
|
39
|
-
|
|
40
|
-
import { fixNitbitsCommand } from "./commands/fix-nitbits";
|
|
41
|
-
import { analyzeCommand } from "./commands/analyze";
|
|
37
|
+
|
|
42
38
|
import { solveCommand } from "./commands/solve";
|
|
43
39
|
import { solveIssueCommand } from "./commands/solve-issue";
|
|
44
40
|
import { cacheCommand } from "./commands/cache";
|
|
45
|
-
import { configSet, configGet, configList } from "./commands/config";
|
|
46
41
|
|
|
47
42
|
const program = new Command();
|
|
48
43
|
|
|
@@ -53,10 +48,32 @@ program
|
|
|
53
48
|
.description("Developer Intelligence & PR Review Engine")
|
|
54
49
|
.version(version);
|
|
55
50
|
|
|
56
|
-
program.hook("preAction", (thisCommand, actionCommand) => {
|
|
51
|
+
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
57
52
|
if (actionCommand.opts().cache === false) {
|
|
58
53
|
process.env.VORTEX_DISABLE_CACHE = "true";
|
|
59
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
|
+
}
|
|
60
77
|
});
|
|
61
78
|
|
|
62
79
|
// ── Core Commands ──
|
|
@@ -72,6 +89,7 @@ program
|
|
|
72
89
|
.description("Search the indexed codebase semantically and get an AI explanation")
|
|
73
90
|
.requiredOption("-q, --query <text>", "Search query")
|
|
74
91
|
.option("-l, --limit <number>", "Number of results to consider", "5")
|
|
92
|
+
.option("--expand-query", "Expand the search query using the LLM for better recall")
|
|
75
93
|
.option("--no-cache", "Disable LLM response caching")
|
|
76
94
|
.action(searchCommand);
|
|
77
95
|
|
|
@@ -104,6 +122,7 @@ program
|
|
|
104
122
|
.option("--auto-approve", "Skip interactive prompts for file writes and shell commands")
|
|
105
123
|
.option("--max-steps <number>", "Maximum number of agent loop iterations", Number, 30)
|
|
106
124
|
.option("--new-project <folder>", "Create a new project folder and initialize git before solving")
|
|
125
|
+
.option("--verify [command]", "Run a verification command after completion (e.g., 'npm run check-types'). Agent will self-correct on failure.")
|
|
107
126
|
.action((prompt, options) => solveCommand(prompt, options));
|
|
108
127
|
|
|
109
128
|
program
|
|
@@ -112,54 +131,11 @@ program
|
|
|
112
131
|
.requiredOption("--id <number>", "Issue number", Number)
|
|
113
132
|
.option("--auto-approve", "Skip interactive prompts for file writes and shell commands")
|
|
114
133
|
.option("--max-steps <number>", "Maximum number of agent loop iterations", Number, 30)
|
|
134
|
+
.option("--verify [command]", "Run a verification command after completion. Agent will self-correct on failure.")
|
|
115
135
|
.action(solveIssueCommand);
|
|
116
136
|
|
|
117
137
|
// ── AI-Powered Commands ──
|
|
118
138
|
|
|
119
|
-
program
|
|
120
|
-
.command("suggest")
|
|
121
|
-
.description("Generate AI-powered code suggestions using repository patterns and historical intelligence")
|
|
122
|
-
.requiredOption("--file <path>", "Target file path")
|
|
123
|
-
.option("--apply", "Apply suggestions automatically")
|
|
124
|
-
.option("--deep", "Enable advanced contextual suggestions")
|
|
125
|
-
.option("--no-cache", "Disable LLM response caching")
|
|
126
|
-
.action(suggestCommand);
|
|
127
|
-
|
|
128
|
-
program
|
|
129
|
-
.command("fix-nitbits")
|
|
130
|
-
.description("Automatically fix formatting, comments, tests, CI issues, and repository-specific patterns")
|
|
131
|
-
.option("--safe", "Apply only deterministic safe fixes")
|
|
132
|
-
.option("--dry-run", "Preview fixes without modifying files")
|
|
133
|
-
.option("--files <paths>", "Comma-separated list of target files")
|
|
134
|
-
.action(fixNitbitsCommand);
|
|
135
|
-
|
|
136
|
-
program
|
|
137
|
-
.command("analyze")
|
|
138
|
-
.description("Analyze other contributors' PRs using repository history and architectural intelligence")
|
|
139
|
-
.requiredOption("--pr <number>", "Pull request number", Number)
|
|
140
|
-
.option("--deep", "Enable advanced PR intelligence analysis")
|
|
141
|
-
.option("--no-cache", "Disable LLM response caching")
|
|
142
|
-
.action(analyzeCommand);
|
|
143
|
-
|
|
144
|
-
const configCmd = program
|
|
145
|
-
.command("config")
|
|
146
|
-
.description("Manage global configuration and API keys");
|
|
147
|
-
|
|
148
|
-
configCmd
|
|
149
|
-
.command("set <provider> <key>")
|
|
150
|
-
.description("Set an API key for a specific provider (gemini or groq)")
|
|
151
|
-
.action(configSet);
|
|
152
|
-
|
|
153
|
-
configCmd
|
|
154
|
-
.command("get <key>")
|
|
155
|
-
.description("Get a global configuration value")
|
|
156
|
-
.action(configGet);
|
|
157
|
-
|
|
158
|
-
configCmd
|
|
159
|
-
.command("list")
|
|
160
|
-
.description("List all global configuration values")
|
|
161
|
-
.action(configList);
|
|
162
|
-
|
|
163
139
|
program.addCommand(cacheCommand);
|
|
164
140
|
|
|
165
141
|
program.parse();
|