bit-cli-ai 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +12 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bit-cli-ai",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Git with a brain - intelligent Git wrapper with AI-powered commits, ghost branches, and predictive merge",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -6,7 +6,7 @@ import chalk from 'chalk';
6
6
 
7
7
  import { smartInit } from './commands/init.js';
8
8
  import { aiCommit } from './commands/commit.js';
9
- import { ghostBranch, listBranches, checkoutGhost } from './commands/branch.js';
9
+ import { ghostBranch, checkoutGhost } from './commands/branch.js';
10
10
  import { mergePreview } from './commands/merge.js';
11
11
  import { checkHotZones } from './commands/hotzone.js';
12
12
  import { analyzeSymbols } from './commands/analyze.js';
@@ -66,7 +66,7 @@ program
66
66
  .description('Analyze code changes at function/symbol level')
67
67
  .action(analyzeSymbols);
68
68
 
69
- // ============ STATUS WITH INTELLIGENCE ============
69
+ // ============ STATUS ============
70
70
  program
71
71
  .command('status')
72
72
  .description('Enhanced git status with Bit intelligence')
@@ -74,31 +74,26 @@ program
74
74
  try {
75
75
  console.log(chalk.cyan('\n--- Bit Status ---\n'));
76
76
  execSync('git status', { stdio: 'inherit' });
77
-
78
- // Add Bit intelligence
79
77
  checkHotZones(true); // silent mode
80
- } catch (error) {
78
+ } catch {
81
79
  console.error(chalk.red('Not a git repository'));
82
80
  }
83
81
  });
84
82
 
85
83
  // ============ GIT PASSTHROUGH ============
86
- // Any unknown command goes directly to git
87
84
  program
88
- .arguments('<command> [args...]')
85
+ .arguments('[command] [args...]')
89
86
  .action((command, args) => {
87
+ if (!command) {
88
+ program.outputHelp();
89
+ return;
90
+ }
91
+
90
92
  try {
91
- const gitCmd = `git ${command} ${args.join(' ')}`;
92
- execSync(gitCmd, { stdio: 'inherit' });
93
- } catch (error) {
94
- // Git will print its own error message
93
+ execSync(`git ${command} ${args.join(' ')}`, { stdio: 'inherit' });
94
+ } catch {
95
95
  process.exit(1);
96
96
  }
97
97
  });
98
98
 
99
- // Handle no arguments
100
- if (process.argv.length === 2) {
101
- program.outputHelp();
102
- }
103
-
104
- program.parse();
99
+ program.parse(process.argv);