@vortex-ai/cli 0.1.2 → 0.1.3

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > vortex-ai-cli@0.1.0 build /home/divyanshu/OSS/Personal_Projects/vortex/packages/cli
3
+ > @vortex-ai/cli@0.1.2 build /home/divyanshu/OSS/Personal_Projects/vortex/packages/cli
4
4
  > tsup src/index.ts --format cjs,esm --external @xenova/transformers
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -9,7 +9,7 @@ CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 35.20 KB
13
- ESM ⚡️ Build success in 50ms
14
- CJS dist/index.js 36.43 KB
15
- CJS ⚡️ Build success in 51ms
12
+ ESM dist/index.mjs 33.55 KB
13
+ ESM ⚡️ Build success in 57ms
14
+ CJS dist/index.js 34.78 KB
15
+ CJS ⚡️ Build success in 58ms
package/README.md CHANGED
@@ -140,7 +140,7 @@ Vortex is engineered for speed and cost-efficiency, keeping the heavy lifting lo
140
140
 
141
141
  ## Contributing
142
142
 
143
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to set up the development environment, run tests, and submit pull requests.
143
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to set up the development environment and submit pull requests.
144
144
 
145
145
  ### Development Setup
146
146
  ```bash
package/dist/index.js CHANGED
@@ -553,65 +553,14 @@ Analyzing External PR #${options.pr}
553
553
  }
554
554
  }
555
555
 
556
- // src/commands/watch.ts
557
- var import_engine8 = require("@vortex/engine");
558
- var fs3 = __toESM(require("fs"));
559
- var chokidar = __toESM(require("chokidar"));
560
- async function watchCommand(options) {
561
- const { default: chalk2 } = await import("chalk");
562
- console.log(
563
- chalk2.blue.bold("\nVortex Live Watcher\n")
564
- );
565
- console.log(
566
- chalk2.gray(" Watching repository changes for live AI feedback...")
567
- );
568
- if (options.deep) {
569
- console.log(
570
- chalk2.yellow(
571
- " \u26A0\uFE0F Deep live analysis enabled (may consume more API tokens).\n"
572
- )
573
- );
574
- }
575
- const watcher = chokidar.watch(process.cwd(), {
576
- ignored: /(^|[\/\\])\\..|node_modules|dist/,
577
- persistent: true
578
- });
579
- const agent = new import_engine8.IntelligenceAgent();
580
- let isProcessing = false;
581
- watcher.on("change", async (filePath) => {
582
- if (isProcessing) return;
583
- console.log(
584
- chalk2.cyan(`
585
- Detected change in ${filePath}. Analyzing...`)
586
- );
587
- isProcessing = true;
588
- try {
589
- const content = fs3.readFileSync(filePath, "utf8");
590
- const feedback = await agent.generateSuggestions(content);
591
- console.log(
592
- chalk2.green(`
593
- --- LIVE AI FEEDBACK FOR ${filePath} ---
594
- `)
595
- );
596
- console.log(feedback);
597
- } catch (err) {
598
- console.error(chalk2.red("Analysis failed:"), err);
599
- } finally {
600
- isProcessing = false;
601
- console.log(chalk2.gray("\n Watching for more changes..."));
602
- }
603
- });
604
- console.log(chalk2.green(" Watcher started. Press Ctrl+C to exit.\n"));
605
- }
606
-
607
556
  // src/commands/solve.ts
608
557
  var import_ora = __toESM(require("ora"));
609
558
  var readline = __toESM(require("readline/promises"));
610
559
  var import_child_process = require("child_process");
611
560
  var import_chalk = __toESM(require("chalk"));
612
- var fs4 = __toESM(require("fs"));
561
+ var fs3 = __toESM(require("fs"));
613
562
  var path2 = __toESM(require("path"));
614
- var import_engine9 = require("@vortex/engine");
563
+ var import_engine8 = require("@vortex/engine");
615
564
  var import_db2 = require("@vortex/db");
616
565
  var import_git3 = require("@vortex/git");
617
566
  var import_retrieval2 = require("@vortex/retrieval");
@@ -619,14 +568,14 @@ async function solveCommand(prompt, options = {}) {
619
568
  let cwd = process.cwd();
620
569
  if (options.newProject) {
621
570
  const projectPath = path2.resolve(cwd, options.newProject);
622
- if (!fs4.existsSync(projectPath)) {
623
- fs4.mkdirSync(projectPath, { recursive: true });
571
+ if (!fs3.existsSync(projectPath)) {
572
+ fs3.mkdirSync(projectPath, { recursive: true });
624
573
  console.log(import_chalk.default.green(`
625
574
  Created new project folder: ${projectPath}`));
626
575
  }
627
576
  cwd = projectPath;
628
577
  process.chdir(cwd);
629
- if (!fs4.existsSync(path2.join(cwd, ".git"))) {
578
+ if (!fs3.existsSync(path2.join(cwd, ".git"))) {
630
579
  try {
631
580
  (0, import_child_process.execSync)("git init", { cwd, stdio: "ignore" });
632
581
  console.log(import_chalk.default.green(`Initialized empty Git repository in ${cwd}`));
@@ -650,7 +599,7 @@ Vortex Autonomous Agent activated`);
650
599
  const bm25Index = new import_retrieval2.BM25Index();
651
600
  const embedder = new import_retrieval2.LocalEmbedder();
652
601
  const hybridRetriever = new import_retrieval2.HybridRetriever(vectorStore, bm25Index, embedder);
653
- const agent = new import_engine9.AutonomousAgent();
602
+ const agent = new import_engine8.AutonomousAgent();
654
603
  if (options.maxSteps !== void 0) {
655
604
  agent.maxToolIterations = options.maxSteps;
656
605
  }
@@ -681,11 +630,11 @@ Allow? (y/N) `;
681
630
  return answer.toLowerCase() === "y" || answer.toLowerCase() === "yes";
682
631
  };
683
632
  agent.registerTools([
684
- new import_engine9.FileReadTool(rootPath),
685
- new import_engine9.FileWriteTool(rootPath, vectorStore, embedder, approvalCallback),
686
- new import_engine9.ShellExecuteTool(rootPath, approvalCallback),
687
- new import_engine9.GrepTool(rootPath),
688
- new import_engine9.RagSearchTool(hybridRetriever)
633
+ new import_engine8.FileReadTool(rootPath),
634
+ new import_engine8.FileWriteTool(rootPath, vectorStore, embedder, approvalCallback),
635
+ new import_engine8.ShellExecuteTool(rootPath, approvalCallback),
636
+ new import_engine8.GrepTool(rootPath),
637
+ new import_engine8.RagSearchTool(hybridRetriever)
689
638
  ]);
690
639
  const result = await agent.run(
691
640
  {
@@ -740,9 +689,9 @@ ${import_chalk.default.cyan("=== Final Output ===")}
740
689
  `);
741
690
  console.log(result.summary);
742
691
  const packageJsonPath = path2.join(cwd, "package.json");
743
- if (fs4.existsSync(packageJsonPath)) {
692
+ if (fs3.existsSync(packageJsonPath)) {
744
693
  try {
745
- const pkg = JSON.parse(fs4.readFileSync(packageJsonPath, "utf-8"));
694
+ const pkg = JSON.parse(fs3.readFileSync(packageJsonPath, "utf-8"));
746
695
  if (pkg.scripts && pkg.scripts.build) {
747
696
  console.log(`
748
697
  ${import_chalk.default.cyan("=== Verification ===")}`);
@@ -767,7 +716,7 @@ ${import_chalk.default.cyan("=== Verification ===")}`);
767
716
  }
768
717
 
769
718
  // src/commands/solve-issue.ts
770
- var import_engine10 = require("@vortex/engine");
719
+ var import_engine9 = require("@vortex/engine");
771
720
  var import_github4 = require("@vortex/github");
772
721
  var import_git4 = require("@vortex/git");
773
722
  async function solveIssueCommand(options) {
@@ -791,7 +740,7 @@ Autonomous Agent solving Issue #${options.id}`));
791
740
  const issue = await github.fetchIssue(owner, repo, options.id);
792
741
  const comments = await github.fetchIssueComments(owner, repo, options.id);
793
742
  spinner.text = `Issue fetched. Searching local vector database for relevant code...`;
794
- const indexer = new import_engine10.Indexer();
743
+ const indexer = new import_engine9.Indexer();
795
744
  const relevantContext = await indexer.hybridSearch(issue.title, 5);
796
745
  spinner.succeed("Issue and Context fetched successfully!\n");
797
746
  const prompt = `Solve the following GitHub issue:
@@ -822,11 +771,11 @@ Please fix this issue in the codebase.`;
822
771
 
823
772
  // src/commands/cache.ts
824
773
  var import_commander = require("commander");
825
- var import_engine11 = require("@vortex/engine");
774
+ var import_engine10 = require("@vortex/engine");
826
775
  var cacheCommand = new import_commander.Command("cache").description("Manage the LLM response cache");
827
776
  cacheCommand.command("stats").description("View LLM cache statistics").action(async () => {
828
777
  try {
829
- const stats = await import_engine11.LLMCacheManager.getStats();
778
+ const stats = await import_engine10.LLMCacheManager.getStats();
830
779
  console.log("\nLLM Cache Statistics\n");
831
780
  console.log(`Entries: ${stats.entries.toLocaleString()}`);
832
781
  console.log(`Hits: ${stats.hits.toLocaleString()}`);
@@ -839,7 +788,7 @@ cacheCommand.command("stats").description("View LLM cache statistics").action(as
839
788
  });
840
789
  cacheCommand.command("clear").description("Clear all entries from the LLM cache").action(async () => {
841
790
  try {
842
- await import_engine11.LLMCacheManager.clearCache();
791
+ await import_engine10.LLMCacheManager.clearCache();
843
792
  console.log("\u2705 LLM Cache cleared successfully.");
844
793
  } catch (err) {
845
794
  console.error("Failed to clear LLM cache:", err);
@@ -881,6 +830,5 @@ program.command("solve-issue").description("Autonomously solve a GitHub issue us
881
830
  program.command("suggest").description("Generate AI-powered code suggestions using repository patterns and historical intelligence").requiredOption("--file <path>", "Target file path").option("--apply", "Apply suggestions automatically").option("--deep", "Enable advanced contextual suggestions").option("--no-cache", "Disable LLM response caching").action(suggestCommand);
882
831
  program.command("fix-nitbits").description("Automatically fix formatting, comments, tests, CI issues, and repository-specific patterns").option("--safe", "Apply only deterministic safe fixes").option("--dry-run", "Preview fixes without modifying files").option("--files <paths>", "Comma-separated list of target files").action(fixNitbitsCommand);
883
832
  program.command("analyze").description("Analyze other contributors' PRs using repository history and architectural intelligence").requiredOption("--pr <number>", "Pull request number", Number).option("--deep", "Enable advanced PR intelligence analysis").option("--no-cache", "Disable LLM response caching").action(analyzeCommand);
884
- program.command("watch").description("Continuously monitor local changes and provide live review feedback").option("--deep", "Enable deep live analysis").action(watchCommand);
885
833
  program.addCommand(cacheCommand);
886
834
  program.parse();
package/dist/index.mjs CHANGED
@@ -540,63 +540,12 @@ Analyzing External PR #${options.pr}
540
540
  }
541
541
  }
542
542
 
543
- // src/commands/watch.ts
544
- import { IntelligenceAgent as IntelligenceAgent7 } from "@vortex/engine";
545
- import * as fs3 from "fs";
546
- import * as chokidar from "chokidar";
547
- async function watchCommand(options) {
548
- const { default: chalk2 } = await import("chalk");
549
- console.log(
550
- chalk2.blue.bold("\nVortex Live Watcher\n")
551
- );
552
- console.log(
553
- chalk2.gray(" Watching repository changes for live AI feedback...")
554
- );
555
- if (options.deep) {
556
- console.log(
557
- chalk2.yellow(
558
- " \u26A0\uFE0F Deep live analysis enabled (may consume more API tokens).\n"
559
- )
560
- );
561
- }
562
- const watcher = chokidar.watch(process.cwd(), {
563
- ignored: /(^|[\/\\])\\..|node_modules|dist/,
564
- persistent: true
565
- });
566
- const agent = new IntelligenceAgent7();
567
- let isProcessing = false;
568
- watcher.on("change", async (filePath) => {
569
- if (isProcessing) return;
570
- console.log(
571
- chalk2.cyan(`
572
- Detected change in ${filePath}. Analyzing...`)
573
- );
574
- isProcessing = true;
575
- try {
576
- const content = fs3.readFileSync(filePath, "utf8");
577
- const feedback = await agent.generateSuggestions(content);
578
- console.log(
579
- chalk2.green(`
580
- --- LIVE AI FEEDBACK FOR ${filePath} ---
581
- `)
582
- );
583
- console.log(feedback);
584
- } catch (err) {
585
- console.error(chalk2.red("Analysis failed:"), err);
586
- } finally {
587
- isProcessing = false;
588
- console.log(chalk2.gray("\n Watching for more changes..."));
589
- }
590
- });
591
- console.log(chalk2.green(" Watcher started. Press Ctrl+C to exit.\n"));
592
- }
593
-
594
543
  // src/commands/solve.ts
595
544
  import ora from "ora";
596
545
  import * as readline from "readline/promises";
597
546
  import { execSync } from "child_process";
598
547
  import chalk from "chalk";
599
- import * as fs4 from "fs";
548
+ import * as fs3 from "fs";
600
549
  import * as path2 from "path";
601
550
  import {
602
551
  AutonomousAgent,
@@ -613,14 +562,14 @@ async function solveCommand(prompt, options = {}) {
613
562
  let cwd = process.cwd();
614
563
  if (options.newProject) {
615
564
  const projectPath = path2.resolve(cwd, options.newProject);
616
- if (!fs4.existsSync(projectPath)) {
617
- fs4.mkdirSync(projectPath, { recursive: true });
565
+ if (!fs3.existsSync(projectPath)) {
566
+ fs3.mkdirSync(projectPath, { recursive: true });
618
567
  console.log(chalk.green(`
619
568
  Created new project folder: ${projectPath}`));
620
569
  }
621
570
  cwd = projectPath;
622
571
  process.chdir(cwd);
623
- if (!fs4.existsSync(path2.join(cwd, ".git"))) {
572
+ if (!fs3.existsSync(path2.join(cwd, ".git"))) {
624
573
  try {
625
574
  execSync("git init", { cwd, stdio: "ignore" });
626
575
  console.log(chalk.green(`Initialized empty Git repository in ${cwd}`));
@@ -734,9 +683,9 @@ ${chalk.cyan("=== Final Output ===")}
734
683
  `);
735
684
  console.log(result.summary);
736
685
  const packageJsonPath = path2.join(cwd, "package.json");
737
- if (fs4.existsSync(packageJsonPath)) {
686
+ if (fs3.existsSync(packageJsonPath)) {
738
687
  try {
739
- const pkg = JSON.parse(fs4.readFileSync(packageJsonPath, "utf-8"));
688
+ const pkg = JSON.parse(fs3.readFileSync(packageJsonPath, "utf-8"));
740
689
  if (pkg.scripts && pkg.scripts.build) {
741
690
  console.log(`
742
691
  ${chalk.cyan("=== Verification ===")}`);
@@ -875,6 +824,5 @@ program.command("solve-issue").description("Autonomously solve a GitHub issue us
875
824
  program.command("suggest").description("Generate AI-powered code suggestions using repository patterns and historical intelligence").requiredOption("--file <path>", "Target file path").option("--apply", "Apply suggestions automatically").option("--deep", "Enable advanced contextual suggestions").option("--no-cache", "Disable LLM response caching").action(suggestCommand);
876
825
  program.command("fix-nitbits").description("Automatically fix formatting, comments, tests, CI issues, and repository-specific patterns").option("--safe", "Apply only deterministic safe fixes").option("--dry-run", "Preview fixes without modifying files").option("--files <paths>", "Comma-separated list of target files").action(fixNitbitsCommand);
877
826
  program.command("analyze").description("Analyze other contributors' PRs using repository history and architectural intelligence").requiredOption("--pr <number>", "Pull request number", Number).option("--deep", "Enable advanced PR intelligence analysis").option("--no-cache", "Disable LLM response caching").action(analyzeCommand);
878
- program.command("watch").description("Continuously monitor local changes and provide live review feedback").option("--deep", "Enable deep live analysis").action(watchCommand);
879
827
  program.addCommand(cacheCommand);
880
828
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vortex-ai/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Vortex CLI - The main entry point",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {
@@ -25,7 +25,6 @@
25
25
  "@xenova/transformers": "^2.17.2",
26
26
  "boxen": "7",
27
27
  "chalk": "^5.6.2",
28
- "chokidar": "^5.0.0",
29
28
  "commander": "^12.1.0",
30
29
  "dotenv": "^17.4.2",
31
30
  "marked": "^15.0.12",
package/src/index.ts CHANGED
@@ -36,7 +36,6 @@ import { graphCommand } from "./commands/graph";
36
36
  import { suggestCommand } from "./commands/suggest";
37
37
  import { fixNitbitsCommand } from "./commands/fix-nitbits";
38
38
  import { analyzeCommand } from "./commands/analyze";
39
- import { watchCommand } from "./commands/watch";
40
39
  import { solveCommand } from "./commands/solve";
41
40
  import { solveIssueCommand } from "./commands/solve-issue";
42
41
  import { cacheCommand } from "./commands/cache";
@@ -136,12 +135,6 @@ program
136
135
  .option("--no-cache", "Disable LLM response caching")
137
136
  .action(analyzeCommand);
138
137
 
139
- program
140
- .command("watch")
141
- .description("Continuously monitor local changes and provide live review feedback")
142
- .option("--deep", "Enable deep live analysis")
143
- .action(watchCommand);
144
-
145
138
  program.addCommand(cacheCommand);
146
139
 
147
140
  program.parse();
@@ -1,56 +0,0 @@
1
- import { IntelligenceAgent } from "@vortex/engine";
2
- import * as fs from "fs";
3
- import * as chokidar from "chokidar";
4
-
5
- export async function watchCommand(options: { deep?: boolean }) {
6
- const { default: chalk } = await import("chalk");
7
-
8
- console.log(
9
- chalk.blue.bold("\nVortex Live Watcher\n")
10
- );
11
- console.log(
12
- chalk.gray(" Watching repository changes for live AI feedback...")
13
- );
14
-
15
- if (options.deep) {
16
- console.log(
17
- chalk.yellow(
18
- " ⚠️ Deep live analysis enabled (may consume more API tokens).\n"
19
- )
20
- );
21
- }
22
-
23
- const watcher = chokidar.watch(process.cwd(), {
24
- ignored: /(^|[\/\\])\\..|node_modules|dist/,
25
- persistent: true,
26
- });
27
-
28
- const agent = new IntelligenceAgent();
29
- let isProcessing = false;
30
-
31
- watcher.on("change", async (filePath) => {
32
- if (isProcessing) return; // Debounce
33
-
34
- console.log(
35
- chalk.cyan(`\nDetected change in ${filePath}. Analyzing...`)
36
- );
37
- isProcessing = true;
38
-
39
- try {
40
- const content = fs.readFileSync(filePath, "utf8");
41
- const feedback = await agent.generateSuggestions(content);
42
-
43
- console.log(
44
- chalk.green(`\n--- LIVE AI FEEDBACK FOR ${filePath} ---\n`)
45
- );
46
- console.log(feedback);
47
- } catch (err) {
48
- console.error(chalk.red("Analysis failed:"), err);
49
- } finally {
50
- isProcessing = false;
51
- console.log(chalk.gray("\n Watching for more changes..."));
52
- }
53
- });
54
-
55
- console.log(chalk.green(" Watcher started. Press Ctrl+C to exit.\n"));
56
- }