vibecodingmachine-cli 1.0.4 → 1.0.5

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 (37) hide show
  1. package/.allnightai/REQUIREMENTS.md +11 -11
  2. package/.eslintrc.js +16 -16
  3. package/README.md +85 -85
  4. package/bin/vibecodingmachine.js +274 -274
  5. package/jest.config.js +8 -8
  6. package/logs/audit/2025-11-07.jsonl +2 -2
  7. package/package.json +62 -66
  8. package/scripts/README.md +128 -128
  9. package/scripts/auto-start-wrapper.sh +92 -92
  10. package/scripts/postinstall.js +81 -81
  11. package/src/commands/auth.js +96 -96
  12. package/src/commands/auto-direct.js +1748 -1748
  13. package/src/commands/auto.js +4692 -4692
  14. package/src/commands/auto.js.bak +710 -710
  15. package/src/commands/ide.js +70 -70
  16. package/src/commands/repo.js +159 -159
  17. package/src/commands/requirements.js +161 -161
  18. package/src/commands/setup.js +91 -91
  19. package/src/commands/status.js +88 -88
  20. package/src/index.js +5 -5
  21. package/src/utils/auth.js +577 -577
  22. package/src/utils/auto-mode-ansi-ui.js +238 -238
  23. package/src/utils/auto-mode-simple-ui.js +161 -161
  24. package/src/utils/auto-mode-ui.js.bak.blessed +207 -207
  25. package/src/utils/auto-mode.js +65 -65
  26. package/src/utils/config.js +64 -64
  27. package/src/utils/interactive.js +3616 -3616
  28. package/src/utils/keyboard-handler.js +152 -152
  29. package/src/utils/logger.js +4 -4
  30. package/src/utils/persistent-header.js +116 -116
  31. package/src/utils/provider-registry.js +128 -128
  32. package/src/utils/status-card.js +120 -120
  33. package/src/utils/stdout-interceptor.js +127 -127
  34. package/tests/auto-mode.test.js +37 -37
  35. package/tests/config.test.js +34 -34
  36. package/.allnightai/temp/auto-status.json +0 -6
  37. package/.env +0 -7
@@ -1,88 +1,88 @@
1
- const fs = require('fs-extra');
2
- const path = require('path');
3
- const os = require('os');
4
- const chalk = require('chalk');
5
- const { getRepoPath } = require('../utils/config');
6
- const { checkAutoModeStatus } = require('../utils/auto-mode');
7
- const { getRequirementsPath } = require('vibecodingmachine-core');
8
-
9
- /**
10
- * Format IDE name for display
11
- * @param {string} ide - Internal IDE identifier
12
- * @returns {string} Display name for IDE
13
- */
14
- function formatIDEName(ide) {
15
- const ideNames = {
16
- 'cline': 'Cline IDE',
17
- 'cursor': 'Cursor',
18
- 'vscode': 'VS Code',
19
- 'windsurf': 'Windsurf'
20
- };
21
- return ideNames[ide] || ide;
22
- }
23
-
24
- function formatPath(fullPath) {
25
- if (!fullPath) return 'not set';
26
- const homeDir = os.homedir();
27
- if (fullPath.startsWith(homeDir)) {
28
- return fullPath.replace(homeDir, '~');
29
- }
30
- return fullPath;
31
- }
32
-
33
- async function show() {
34
- const repoPath = await getRepoPath();
35
- console.log(chalk.bold('\nVibe Coding Machine Status'));
36
- console.log(chalk.gray('Repository:'), chalk.cyan(formatPath(repoPath)));
37
- const status = await checkAutoModeStatus();
38
- console.log(chalk.gray('Auto mode:'), status.running ? chalk.green('running') : chalk.yellow('stopped'));
39
- if (status.running) {
40
- console.log(chalk.gray('IDE:'), chalk.cyan(formatIDEName(status.ide || 'cline')));
41
- console.log(chalk.gray('Chats:'), chalk.cyan(status.chatCount || 0));
42
- }
43
- console.log();
44
- }
45
-
46
- async function progress() {
47
- const repoPath = await getRepoPath();
48
- if (!repoPath) {
49
- console.log(chalk.yellow('No repository path configured'));
50
- return;
51
- }
52
- // Use getRequirementsPath to get the hostname-specific file
53
- const reqPath = await getRequirementsPath(repoPath);
54
- if (!reqPath || !await fs.pathExists(reqPath)) {
55
- console.log(chalk.yellow('No REQUIREMENTS file found.'));
56
- return;
57
- }
58
- const content = await fs.readFile(reqPath, 'utf8');
59
- const current = content.match(/## \uD83D\uDEA6 Current Status\n([A-Z_ ]+)/);
60
- console.log(chalk.bold('\nProgress'));
61
- console.log(chalk.gray('Current Status:'), chalk.cyan(current ? current[1] : 'UNKNOWN'));
62
- console.log();
63
- }
64
-
65
- async function logs(cmd) {
66
- const lines = parseInt((cmd && cmd.lines) || '50', 10);
67
- const repoPath = await getRepoPath();
68
- const defaultLog = path.join(process.cwd(), 'logs', 'security', 'security-2025-10-29.log');
69
- const logPath = await fs.pathExists(defaultLog) ? defaultLog : null;
70
- console.log(chalk.bold('\nRecent Logs'));
71
- if (!logPath) {
72
- console.log(chalk.gray('No logs available.'));
73
- return;
74
- }
75
- const content = await fs.readFile(logPath, 'utf8');
76
- const out = content.trim().split('\n').slice(-lines).join('\n');
77
- console.log(out);
78
- console.log();
79
- }
80
-
81
- module.exports = {
82
- show,
83
- progress,
84
- logs
85
- };
86
-
87
-
88
-
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+ const os = require('os');
4
+ const chalk = require('chalk');
5
+ const { getRepoPath } = require('../utils/config');
6
+ const { checkAutoModeStatus } = require('../utils/auto-mode');
7
+ const { getRequirementsPath } = require('vibecodingmachine-core');
8
+
9
+ /**
10
+ * Format IDE name for display
11
+ * @param {string} ide - Internal IDE identifier
12
+ * @returns {string} Display name for IDE
13
+ */
14
+ function formatIDEName(ide) {
15
+ const ideNames = {
16
+ 'cline': 'Cline IDE',
17
+ 'cursor': 'Cursor',
18
+ 'vscode': 'VS Code',
19
+ 'windsurf': 'Windsurf'
20
+ };
21
+ return ideNames[ide] || ide;
22
+ }
23
+
24
+ function formatPath(fullPath) {
25
+ if (!fullPath) return 'not set';
26
+ const homeDir = os.homedir();
27
+ if (fullPath.startsWith(homeDir)) {
28
+ return fullPath.replace(homeDir, '~');
29
+ }
30
+ return fullPath;
31
+ }
32
+
33
+ async function show() {
34
+ const repoPath = await getRepoPath();
35
+ console.log(chalk.bold('\nVibe Coding Machine Status'));
36
+ console.log(chalk.gray('Repository:'), chalk.cyan(formatPath(repoPath)));
37
+ const status = await checkAutoModeStatus();
38
+ console.log(chalk.gray('Auto mode:'), status.running ? chalk.green('running') : chalk.yellow('stopped'));
39
+ if (status.running) {
40
+ console.log(chalk.gray('IDE:'), chalk.cyan(formatIDEName(status.ide || 'cline')));
41
+ console.log(chalk.gray('Chats:'), chalk.cyan(status.chatCount || 0));
42
+ }
43
+ console.log();
44
+ }
45
+
46
+ async function progress() {
47
+ const repoPath = await getRepoPath();
48
+ if (!repoPath) {
49
+ console.log(chalk.yellow('No repository path configured'));
50
+ return;
51
+ }
52
+ // Use getRequirementsPath to get the hostname-specific file
53
+ const reqPath = await getRequirementsPath(repoPath);
54
+ if (!reqPath || !await fs.pathExists(reqPath)) {
55
+ console.log(chalk.yellow('No REQUIREMENTS file found.'));
56
+ return;
57
+ }
58
+ const content = await fs.readFile(reqPath, 'utf8');
59
+ const current = content.match(/## \uD83D\uDEA6 Current Status\n([A-Z_ ]+)/);
60
+ console.log(chalk.bold('\nProgress'));
61
+ console.log(chalk.gray('Current Status:'), chalk.cyan(current ? current[1] : 'UNKNOWN'));
62
+ console.log();
63
+ }
64
+
65
+ async function logs(cmd) {
66
+ const lines = parseInt((cmd && cmd.lines) || '50', 10);
67
+ const repoPath = await getRepoPath();
68
+ const defaultLog = path.join(process.cwd(), 'logs', 'security', 'security-2025-10-29.log');
69
+ const logPath = await fs.pathExists(defaultLog) ? defaultLog : null;
70
+ console.log(chalk.bold('\nRecent Logs'));
71
+ if (!logPath) {
72
+ console.log(chalk.gray('No logs available.'));
73
+ return;
74
+ }
75
+ const content = await fs.readFile(logPath, 'utf8');
76
+ const out = content.trim().split('\n').slice(-lines).join('\n');
77
+ console.log(out);
78
+ console.log();
79
+ }
80
+
81
+ module.exports = {
82
+ show,
83
+ progress,
84
+ logs
85
+ };
86
+
87
+
88
+
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
- // Entry point placeholder to satisfy package.json main
2
- module.exports = {};
3
-
4
-
5
-
1
+ // Entry point placeholder to satisfy package.json main
2
+ module.exports = {};
3
+
4
+
5
+