vibecodingmachine-cli 2026.2.20-438 ā 2026.2.26-1739
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/bin/auth/auth-compliance.js +126 -0
- package/bin/cli-program.js +104 -0
- package/bin/cli-setup.js +52 -0
- package/bin/commands/agent-commands.js +310 -0
- package/bin/commands/auto-commands.js +70 -0
- package/bin/commands/command-aliases.js +118 -0
- package/bin/commands/repo-commands.js +39 -0
- package/bin/commands/rui-commands.js +152 -0
- package/bin/config/cli-config.js +394 -0
- package/bin/init/environment-setup.js +84 -0
- package/bin/update/update-checker.js +126 -0
- package/bin/vibecodingmachine-new.js +50 -0
- package/bin/vibecodingmachine.js +29 -663
- package/package.json +8 -2
- package/src/commands/agents/add.js +277 -0
- package/src/commands/agents/check.js +380 -0
- package/src/commands/agents/list.js +471 -0
- package/src/commands/agents/remove.js +351 -0
- package/src/commands/analyze-file-sizes.js +428 -0
- package/src/commands/auto-direct/code-processor.js +282 -0
- package/src/commands/auto-direct/file-scanner.js +266 -0
- package/src/commands/auto-direct/provider-config.js +178 -0
- package/src/commands/auto-direct/provider-manager.js +219 -0
- package/src/commands/auto-direct/requirement-manager.js +172 -0
- package/src/commands/auto-direct/status-display.js +91 -0
- package/src/commands/auto-direct/utils.js +106 -0
- package/src/commands/auto-direct.js +875 -488
- package/src/commands/auto-execution.js +342 -0
- package/src/commands/auto-provider-management.js +102 -0
- package/src/commands/auto-requirement-management.js +161 -0
- package/src/commands/auto-status-helpers.js +141 -0
- package/src/commands/auto.js +105 -5155
- package/src/commands/check-compliance.js +536 -0
- package/src/commands/continuous-scan.js +119 -0
- package/src/commands/ide.js +16 -4
- package/src/commands/refactor-file.js +486 -0
- package/src/commands/requirements.js +301 -2
- package/src/commands/timeout.js +290 -0
- package/src/trui/TruiInterface.js +108 -0
- package/src/trui/agents/AgentInterface.js +580 -0
- package/src/utils/antigravity-installer.js +60 -6
- package/src/utils/clarification-actions.js +290 -0
- package/src/utils/config.js +123 -2
- package/src/utils/first-run.js +5 -5
- package/src/utils/ide-handlers.js +212 -0
- package/src/utils/interactive/clarification-actions.js +348 -0
- package/src/utils/interactive/core-ui.js +265 -0
- package/src/utils/interactive/file-backup.js +237 -0
- package/src/utils/interactive/file-import-export.js +305 -0
- package/src/utils/interactive/file-operations.js +49 -0
- package/src/utils/interactive/file-validation.js +276 -0
- package/src/utils/interactive/interactive-prompts.js +480 -0
- package/src/utils/interactive/requirement-actions.js +127 -0
- package/src/utils/interactive/requirement-crud.js +356 -0
- package/src/utils/interactive/requirements-navigation.js +286 -0
- package/src/utils/interactive.js +390 -3459
- package/src/utils/provider-checker/agent-checker.js +250 -0
- package/src/utils/provider-checker/agent-runner.js +450 -0
- package/src/utils/provider-checker/cli-installer.js +123 -0
- package/src/utils/provider-checker/cli-utils.js +15 -0
- package/src/utils/provider-checker/format-utils.js +32 -0
- package/src/utils/provider-checker/ide-manager.js +72 -0
- package/src/utils/provider-checker/ide-utils.js +71 -0
- package/src/utils/provider-checker/node-detector.js +56 -0
- package/src/utils/provider-checker/node-utils.js +61 -0
- package/src/utils/provider-checker/process-spawn.js +22 -0
- package/src/utils/provider-checker/process-utils.js +37 -0
- package/src/utils/provider-checker/provider-validator.js +160 -0
- package/src/utils/provider-checker/quota-checker.js +54 -0
- package/src/utils/provider-checker/quota-detector.js +44 -0
- package/src/utils/provider-checker/requirements-manager.js +94 -0
- package/src/utils/provider-checker/test-requirements.js +95 -0
- package/src/utils/provider-checker/time-formatter.js +18 -0
- package/src/utils/provider-checker-new.js +14 -0
- package/src/utils/provider-checker.js +12 -407
- package/src/utils/provider-checkers/ide-manager.js +128 -0
- package/src/utils/provider-checkers/node-executable-finder.js +51 -0
- package/src/utils/provider-checkers/provider-checker-core.js +172 -0
- package/src/utils/provider-checkers/provider-checker-main.js +107 -0
- package/src/utils/provider-manager.js +60 -4
- package/src/utils/provider-registry.js +26 -3
- package/src/utils/provider-utils.js +173 -0
- package/src/utils/quota-detectors.js +212 -0
- package/src/utils/requirement-action-handlers.js +288 -0
- package/src/utils/requirement-actions/clarification-actions.js +229 -0
- package/src/utils/requirement-actions/confirmation-prompts.js +93 -0
- package/src/utils/requirement-actions/file-operations.js +92 -0
- package/src/utils/requirement-actions/helpers.js +40 -0
- package/src/utils/requirement-actions/requirement-operations.js +335 -0
- package/src/utils/requirement-actions.js +46 -856
- package/src/utils/requirement-file-operations.js +259 -0
- package/src/utils/requirement-helpers.js +128 -0
- package/src/utils/requirement-management.js +279 -0
- package/src/utils/requirement-navigation.js +146 -0
- package/src/utils/requirement-organization.js +271 -0
- package/src/utils/simple-trui.js +75 -1
- package/src/utils/trui-navigation.js +28 -2
- package/src/utils/trui-req-tree.js +196 -11
- package/src/utils/trui-specifications.js +31 -1
- package/src/utils/interactive-backup.js +0 -5664
- package/src/utils/trui-provider-manager.js +0 -182
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment setup and initialization
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const { cleanupBrokenAssets } = require('../../src/utils/asset-cleanup');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Load environment variables from .env.cognito file
|
|
11
|
+
*/
|
|
12
|
+
function loadEnvironmentVariables() {
|
|
13
|
+
// Auto-load .env.cognito from root
|
|
14
|
+
const rootDir = path.join(__dirname, '..', '..', '..', '..');
|
|
15
|
+
const envCognitoPath = path.join(rootDir, '.env.cognito');
|
|
16
|
+
|
|
17
|
+
if (fs.existsSync(envCognitoPath)) {
|
|
18
|
+
const envContent = fs.readFileSync(envCognitoPath, 'utf8');
|
|
19
|
+
envContent.split('\n').forEach(line => {
|
|
20
|
+
const trimmed = line.trim();
|
|
21
|
+
if (trimmed && !trimmed.startsWith('#')) {
|
|
22
|
+
const [key, ...valueParts] = trimmed.split('=');
|
|
23
|
+
if (key && valueParts.length > 0) {
|
|
24
|
+
process.env[key.trim()] = valueParts.join('=').trim();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Initialize cleanup for broken assets
|
|
33
|
+
*/
|
|
34
|
+
async function initializeCleanup() {
|
|
35
|
+
try {
|
|
36
|
+
// mitigate broken assets issue
|
|
37
|
+
await cleanupBrokenAssets();
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.warn('Warning: Failed to cleanup broken assets:', error.message);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Setup error handlers
|
|
45
|
+
* @param {Object} dependencies - Dependencies for error reporting
|
|
46
|
+
*/
|
|
47
|
+
function setupErrorHandlers(dependencies) {
|
|
48
|
+
const { chalk, t, errorReporter } = dependencies;
|
|
49
|
+
|
|
50
|
+
process.on('uncaughtException', async (error) => {
|
|
51
|
+
console.error(chalk.red(`${t('cli.error')}:`), error.message);
|
|
52
|
+
if (process.env.DEBUG) {
|
|
53
|
+
console.error(chalk.gray('Stack:'), error.stack);
|
|
54
|
+
}
|
|
55
|
+
await errorReporter.reportError(error, { type: 'uncaughtException' });
|
|
56
|
+
process.exit(1);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
process.on('unhandledRejection', async (error) => {
|
|
60
|
+
console.error(chalk.red(`${t('cli.error')}:`), error.message);
|
|
61
|
+
if (process.env.DEBUG) {
|
|
62
|
+
console.error(chalk.gray('Stack:'), error.stack);
|
|
63
|
+
}
|
|
64
|
+
await errorReporter.reportError(error, { type: 'unhandledRejection' });
|
|
65
|
+
process.exit(1);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Initialize environment and setup
|
|
71
|
+
* @param {Object} dependencies - Dependencies for initialization
|
|
72
|
+
*/
|
|
73
|
+
async function initializeEnvironment(dependencies) {
|
|
74
|
+
loadEnvironmentVariables();
|
|
75
|
+
await initializeCleanup();
|
|
76
|
+
setupErrorHandlers(dependencies);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
module.exports = {
|
|
80
|
+
loadEnvironmentVariables,
|
|
81
|
+
initializeCleanup,
|
|
82
|
+
setupErrorHandlers,
|
|
83
|
+
initializeEnvironment
|
|
84
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update checking functionality
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const chalk = require('chalk');
|
|
8
|
+
const ora = require('ora');
|
|
9
|
+
const { execSync } = require('child_process');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Check for updates and display notification
|
|
13
|
+
* @param {Object} dependencies - Dependencies for update checking
|
|
14
|
+
* @param {Object} options - Options for update checking
|
|
15
|
+
*/
|
|
16
|
+
async function checkForUpdates(dependencies, options = {}) {
|
|
17
|
+
const { packageJson, promptWithDefaultsOnce } = dependencies;
|
|
18
|
+
const rootDir = path.join(__dirname, '..', '..', '..', '..');
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
if (process.env.VCM_SKIP_UPDATE_CHECK === '1' || process.env.VCM_SKIP_UPDATE_CHECK === 'true') {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// If running inside the repository (local development), skip update checks entirely
|
|
26
|
+
const isDevWorkspace = fs.existsSync(path.join(rootDir, '.git'));
|
|
27
|
+
if (isDevWorkspace) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Additional check: if we're in a workspace with package.json containing vibecodingmachine
|
|
32
|
+
const packageJsonPath = path.join(rootDir, 'package.json');
|
|
33
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
34
|
+
try {
|
|
35
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
36
|
+
if (pkg.name === 'vibecodingmachine' || (pkg.workspaces && pkg.workspaces.length > 0)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
} catch (e) {
|
|
40
|
+
// Ignore JSON parse errors
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.log(chalk.gray(`\nš Checking for updates... (current: v${packageJson.version})`));
|
|
45
|
+
|
|
46
|
+
// Check npm registry for CLI updates (not S3 manifest which is for Electron)
|
|
47
|
+
const { checkForUpdates: checkNpmUpdates } = require('vibecodingmachine-core');
|
|
48
|
+
const updateInfo = await checkNpmUpdates('vibecodingmachine-cli', packageJson.version);
|
|
49
|
+
console.log(chalk.gray(` Update check result: ${JSON.stringify(updateInfo)}\n`));
|
|
50
|
+
|
|
51
|
+
if (updateInfo.hasUpdate) {
|
|
52
|
+
// Store update info globally for when auto mode starts
|
|
53
|
+
global.pendingUpdate = updateInfo;
|
|
54
|
+
|
|
55
|
+
// Display update notification
|
|
56
|
+
console.log(chalk.cyan(`\nš¦ Update available: v${updateInfo.currentVersion} ā v${updateInfo.latestVersion}`));
|
|
57
|
+
console.log(chalk.gray(` Published: ${updateInfo.publishedDate}`));
|
|
58
|
+
|
|
59
|
+
// Prompt user to update
|
|
60
|
+
const answer = await promptWithDefaultsOnce([
|
|
61
|
+
{
|
|
62
|
+
type: 'confirm',
|
|
63
|
+
name: 'shouldUpdate',
|
|
64
|
+
message: 'Would you like to update now?',
|
|
65
|
+
default: true
|
|
66
|
+
}
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
if (answer.shouldUpdate) {
|
|
70
|
+
await performUpdate(updateInfo, rootDir);
|
|
71
|
+
} else {
|
|
72
|
+
console.log(chalk.gray(' You can update later with: ') + chalk.bold.white('npm install -g vibecodingmachine-cli@latest\n'));
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
console.log(chalk.gray(' No updates available - you have the latest version!\n'));
|
|
76
|
+
}
|
|
77
|
+
} catch (error) {
|
|
78
|
+
// Show error but don't block CLI usage
|
|
79
|
+
console.log(chalk.yellow(`\nā ļø Update check failed: ${error.message}\n`));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Perform the actual update
|
|
85
|
+
* @param {Object} updateInfo - Update information
|
|
86
|
+
* @param {string} rootDir - Root directory path
|
|
87
|
+
*/
|
|
88
|
+
async function performUpdate(updateInfo, rootDir) {
|
|
89
|
+
const chalk = require('chalk');
|
|
90
|
+
const ora = require('ora');
|
|
91
|
+
const { execSync } = require('child_process');
|
|
92
|
+
|
|
93
|
+
console.log(chalk.cyan('\nš Updating VibeCodingMachine CLI...\n'));
|
|
94
|
+
try {
|
|
95
|
+
// If we're running from the repository (local dev), avoid performing a global install
|
|
96
|
+
const isDevWorkspace = fs.existsSync(path.join(rootDir, '.git'));
|
|
97
|
+
if (isDevWorkspace) {
|
|
98
|
+
console.log(chalk.yellow('\nDetected local development workspace; skipping automatic global install.'));
|
|
99
|
+
console.log(chalk.gray(' To update the globally installed CLI run:') + ' ' + chalk.bold.white('npm install -g vibecodingmachine-cli@latest\n'));
|
|
100
|
+
// Do not attempt global install during development to avoid confusing local dev flow
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const spinner = ora('Installing update from npm...').start();
|
|
105
|
+
try {
|
|
106
|
+
// Use npm directly to install the latest version from registry
|
|
107
|
+
execSync('npm install -g vibecodingmachine-cli@latest', { stdio: 'inherit', encoding: 'utf8' });
|
|
108
|
+
spinner.succeed('Installed update');
|
|
109
|
+
console.log(chalk.green('\nā
Successfully updated to v' + updateInfo.latestVersion + '!'));
|
|
110
|
+
console.log(chalk.gray(' Please restart your command to use the new version.\n'));
|
|
111
|
+
process.exit(0);
|
|
112
|
+
} catch (err) {
|
|
113
|
+
spinner.fail('Installation failed');
|
|
114
|
+
console.log(chalk.red('\nā Update failed:'), err.message);
|
|
115
|
+
console.log(chalk.yellow(' You can manually update with: ') + chalk.bold.white('npm install -g vibecodingmachine-cli@latest\n'));
|
|
116
|
+
}
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.log(chalk.red('\nā Update failed:'), error.message);
|
|
119
|
+
console.log(chalk.yellow(' You can manually update with: ') + chalk.bold.white('npm install -g vibecodingmachine-cli@latest\n'));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
module.exports = {
|
|
124
|
+
checkForUpdates,
|
|
125
|
+
performUpdate
|
|
126
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Vibe Coding Machine CLI - Command-line interface for autonomous AI development
|
|
5
|
+
* "Big Dreams + AI + VibeCodingMachine.com = Your money making apps"
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Import CLI setup and initialization
|
|
9
|
+
const { initializeCLI } = require('./cli-setup');
|
|
10
|
+
|
|
11
|
+
// Import command setup modules
|
|
12
|
+
const { setupProgram, setupOtherCommands, runCLI } = require('./cli-program');
|
|
13
|
+
const { setupRepoCommands } = require('./commands/repo-commands');
|
|
14
|
+
const { setupAutoCommands } = require('./commands/auto-commands');
|
|
15
|
+
const { setupAgentCommands } = require('./commands/agent-commands');
|
|
16
|
+
const { setupCommandAliases } = require('./commands/command-aliases');
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Main CLI execution
|
|
20
|
+
*/
|
|
21
|
+
async function main() {
|
|
22
|
+
try {
|
|
23
|
+
// Initialize CLI environment
|
|
24
|
+
await initializeCLI();
|
|
25
|
+
|
|
26
|
+
// Setup main program configuration
|
|
27
|
+
const { commandName, packageJson } = setupProgram();
|
|
28
|
+
|
|
29
|
+
// Import command modules after initialization
|
|
30
|
+
const repoCommands = require('../src/commands/repo');
|
|
31
|
+
const autoCommands = require('../src/commands/auto');
|
|
32
|
+
|
|
33
|
+
// Setup all command groups
|
|
34
|
+
setupRepoCommands(repoCommands);
|
|
35
|
+
setupAutoCommands(autoCommands);
|
|
36
|
+
setupAgentCommands();
|
|
37
|
+
setupCommandAliases();
|
|
38
|
+
setupOtherCommands();
|
|
39
|
+
|
|
40
|
+
// Run CLI
|
|
41
|
+
runCLI();
|
|
42
|
+
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error('ā CLI Error:', error);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Execute main function
|
|
50
|
+
main();
|