vibecodingmachine-cli 1.0.9 → 1.0.10
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/README.md +22 -22
- package/package.json +1 -1
- package/scripts/README.md +15 -15
- package/scripts/auto-start-wrapper.sh +7 -7
- package/scripts/postinstall.js +14 -14
- package/src/commands/auto-direct.js +1 -1
- package/src/commands/auto.js +2 -2
- package/src/utils/interactive.js +1 -1
package/README.md
CHANGED
|
@@ -20,54 +20,54 @@ Then run `vibecodingmachine` or `vcm` (short version).
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
vibecodingmachine --help # or:
|
|
24
|
-
vibecodingmachine -v # or:
|
|
23
|
+
vibecodingmachine --help # or: vcm --help (if installed)
|
|
24
|
+
vibecodingmachine -v # or: vcm -v (if installed)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
**Note**: You can use either `vibecodingmachine` or `vcm` - they're the same command!
|
|
28
28
|
|
|
29
29
|
### Repository
|
|
30
30
|
```bash
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
vcm repo:init # initialize .vibecodingmachine in CWD and set repo
|
|
32
|
+
vcm repo:set /path/to/repo # set active repository
|
|
33
|
+
vcm repo:get # print current repo path
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Auto Mode
|
|
37
37
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
vcm auto:start --ide cursor --max-chats 10
|
|
39
|
+
vcm auto:status
|
|
40
|
+
vcm auto:config --max-chats 25 --never-stop
|
|
41
|
+
vcm auto:stop
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### Requirements
|
|
45
45
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
vcm req:list
|
|
47
|
+
vcm req:add "Build initial CLI MVP"
|
|
48
|
+
vcm req:current
|
|
49
|
+
vcm req:next
|
|
50
|
+
vcm req:edit
|
|
51
|
+
vcm req:watch
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
### IDE
|
|
55
55
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
vcm ide:list
|
|
57
|
+
vcm ide:open cursor # or vscode, windsurf
|
|
58
|
+
vcm ide:send "Summarize failures" -i cursor
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### Status
|
|
62
62
|
```bash
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
vcm status
|
|
64
|
+
vcm progress
|
|
65
|
+
vcm logs -n 100
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
### Interactive
|
|
69
69
|
```bash
|
|
70
|
-
|
|
70
|
+
vcm interactive
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
## Configuration
|
package/package.json
CHANGED
package/scripts/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
The `auto-start-wrapper.sh` script provides **reliable Ctrl+C handling** for `
|
|
5
|
+
The `auto-start-wrapper.sh` script provides **reliable Ctrl+C handling** for `vcm auto:start`.
|
|
6
6
|
|
|
7
7
|
## Problem
|
|
8
8
|
|
|
9
|
-
Due to a Node.js limitation, SIGINT (Ctrl+C) signals don't reliably reach the event loop when Node.js is blocked waiting for child processes (like Aider). **This means Ctrl+C does NOT work when running `
|
|
9
|
+
Due to a Node.js limitation, SIGINT (Ctrl+C) signals don't reliably reach the event loop when Node.js is blocked waiting for child processes (like Aider). **This means Ctrl+C does NOT work when running `vcm auto:start` directly.**
|
|
10
10
|
|
|
11
11
|
## Recommended Usage
|
|
12
12
|
|
|
13
|
-
**If you want Ctrl+C to work**, use the wrapper script instead of running `
|
|
13
|
+
**If you want Ctrl+C to work**, use the wrapper script instead of running `vcm auto:start` directly:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# From anywhere (recommended)
|
|
@@ -25,23 +25,23 @@ Due to a Node.js limitation, SIGINT (Ctrl+C) signals don't reliably reach the ev
|
|
|
25
25
|
Add this to your `~/.zshrc` or `~/.bashrc`:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
# Alias for
|
|
29
|
-
alias
|
|
28
|
+
# Alias for vcm auto:start with Ctrl+C support
|
|
29
|
+
alias vcm-start='~/.asdf/installs/nodejs/20.19.5/lib/node_modules/@vibecodingmachine/cli/scripts/auto-start-wrapper.sh'
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Then you can simply run:
|
|
33
33
|
```bash
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
vcm-start
|
|
35
|
+
vcm-start --max-chats 10
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Solution
|
|
39
39
|
|
|
40
40
|
This wrapper script:
|
|
41
|
-
1. Runs `
|
|
41
|
+
1. Runs `vcm auto:start` in the background
|
|
42
42
|
2. Monitors keyboard input in the foreground (in the wrapper's process)
|
|
43
43
|
3. When Ctrl+C, Esc, or 'x' is pressed, creates a `.stop` file
|
|
44
|
-
4. The running `
|
|
44
|
+
4. The running `vcm` process detects the file (via watchdog timer) and exits gracefully
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
@@ -58,15 +58,15 @@ This wrapper script:
|
|
|
58
58
|
- **Ctrl+C**: Stops the process (most common)
|
|
59
59
|
- **Esc key**: Stops the process
|
|
60
60
|
- **'x' key**: Stops the process
|
|
61
|
-
- **`
|
|
61
|
+
- **`vcm auto:stop`**: From another terminal
|
|
62
62
|
|
|
63
63
|
## How It Works
|
|
64
64
|
|
|
65
|
-
1. **Wrapper starts**: Spawns `node
|
|
65
|
+
1. **Wrapper starts**: Spawns `node vcm auto:start` as a background process
|
|
66
66
|
2. **Wrapper monitors**: Uses `read -t 0.5 -n 1` to check for key presses every 500ms
|
|
67
67
|
3. **Key pressed**: Creates `~/.config/vibecodingmachine/.stop` file
|
|
68
|
-
4. **Watchdog detects**: The running
|
|
69
|
-
5. **Graceful exit**: When detected,
|
|
68
|
+
4. **Watchdog detects**: The running vcm process has a watchdog that checks for this file every 500ms
|
|
69
|
+
5. **Graceful exit**: When detected, vcm kills Aider processes and exits the main loop
|
|
70
70
|
6. **Cleanup**: Wrapper removes the stop file and exits
|
|
71
71
|
|
|
72
72
|
## Alternative: Manual Stop File
|
|
@@ -77,7 +77,7 @@ You can also create the stop file manually:
|
|
|
77
77
|
touch ~/.config/vibecodingmachine/.stop
|
|
78
78
|
|
|
79
79
|
# Or use the stop command
|
|
80
|
-
|
|
80
|
+
vcm auto:stop
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
## Technical Details
|
|
@@ -123,6 +123,6 @@ Test with stop command:
|
|
|
123
123
|
```bash
|
|
124
124
|
./packages/cli/scripts/auto-start-wrapper.sh &
|
|
125
125
|
sleep 5
|
|
126
|
-
|
|
126
|
+
vcm auto:stop
|
|
127
127
|
# Should see process exit within 2 seconds
|
|
128
128
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
#
|
|
3
|
-
# Wrapper script for '
|
|
4
|
-
# This script runs
|
|
3
|
+
# Wrapper script for 'vcm auto:start' that properly handles Ctrl+C and other key presses
|
|
4
|
+
# This script runs vcm auto:start in the background and monitors keyboard input
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
set -e
|
|
@@ -17,7 +17,7 @@ NC='\033[0m' # No Color
|
|
|
17
17
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
18
18
|
CLI_DIR="$(dirname "$SCRIPT_DIR")"
|
|
19
19
|
|
|
20
|
-
# Path to
|
|
20
|
+
# Path to vcm command
|
|
21
21
|
ANA_CMD="$CLI_DIR/bin/vibecodingmachine.js"
|
|
22
22
|
|
|
23
23
|
# Path to stop file
|
|
@@ -31,7 +31,7 @@ cleanup() {
|
|
|
31
31
|
mkdir -p "$(dirname "$STOP_FILE")"
|
|
32
32
|
echo "Stop requested at $(date)" > "$STOP_FILE"
|
|
33
33
|
|
|
34
|
-
# Send SIGTERM to the
|
|
34
|
+
# Send SIGTERM to the vcm process if it's running
|
|
35
35
|
if [ -n "$ANA_PID" ] && kill -0 "$ANA_PID" 2>/dev/null; then
|
|
36
36
|
kill -TERM "$ANA_PID" 2>/dev/null || true
|
|
37
37
|
fi
|
|
@@ -55,12 +55,12 @@ cleanup() {
|
|
|
55
55
|
# Set up trap for Ctrl+C
|
|
56
56
|
trap cleanup INT TERM
|
|
57
57
|
|
|
58
|
-
# Start
|
|
58
|
+
# Start vcm auto:start in background
|
|
59
59
|
echo -e "${GRAY}Starting auto mode...${NC}"
|
|
60
60
|
echo -e "${GRAY}Press Ctrl+C, Esc, or 'x' to stop${NC}"
|
|
61
61
|
echo ""
|
|
62
62
|
|
|
63
|
-
# Start
|
|
63
|
+
# Start vcm in background, saving its PID
|
|
64
64
|
# Set ANA_WRAPPER_RUNNING to prevent infinite recursion
|
|
65
65
|
export ANA_WRAPPER_RUNNING=1
|
|
66
66
|
node "$ANA_CMD" auto:start "$@" &
|
|
@@ -69,7 +69,7 @@ ANA_PID=$!
|
|
|
69
69
|
# Monitor for keyboard input AND stop file in the foreground
|
|
70
70
|
# Use a non-blocking read to check for key presses
|
|
71
71
|
while kill -0 "$ANA_PID" 2>/dev/null; do
|
|
72
|
-
# Check for stop file first (created by '
|
|
72
|
+
# Check for stop file first (created by 'vcm auto:stop' or Ctrl+C signal)
|
|
73
73
|
if [ -f "$STOP_FILE" ]; then
|
|
74
74
|
echo -e "\n${YELLOW}Stop signal detected${NC}"
|
|
75
75
|
cleanup
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Post-install script to check if '
|
|
4
|
+
* Post-install script to check if 'vcm' command exists
|
|
5
5
|
* and warn users if there's a conflict
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -12,13 +12,13 @@ const fs = require('fs');
|
|
|
12
12
|
|
|
13
13
|
function checkForExistingAna() {
|
|
14
14
|
try {
|
|
15
|
-
// Check if '
|
|
15
|
+
// Check if 'vcm' command exists in PATH before installation
|
|
16
16
|
// We need to check the actual binary, not symlinks
|
|
17
|
-
const result = execSync('which
|
|
18
|
-
const
|
|
17
|
+
const result = execSync('which vcm 2>/dev/null || true', { encoding: 'utf8' });
|
|
18
|
+
const vcmPath = result.trim();
|
|
19
19
|
|
|
20
|
-
if (!
|
|
21
|
-
// No
|
|
20
|
+
if (!vcmPath) {
|
|
21
|
+
// No vcm found - safe to install
|
|
22
22
|
console.log(chalk.green('\n✓ Vibe Coding Machine CLI installed successfully!'));
|
|
23
23
|
console.log(chalk.gray(' You can use either:'));
|
|
24
24
|
console.log(chalk.cyan(' vibecodingmachine') + chalk.gray(' or ') + chalk.cyan('vcm'));
|
|
@@ -28,10 +28,10 @@ function checkForExistingAna() {
|
|
|
28
28
|
|
|
29
29
|
// Check if it's a real file (not a broken symlink from previous install)
|
|
30
30
|
try {
|
|
31
|
-
fs.accessSync(
|
|
31
|
+
fs.accessSync(vcmPath, fs.constants.X_OK);
|
|
32
32
|
|
|
33
33
|
// Read the file to see if it's ours
|
|
34
|
-
const content = fs.readFileSync(
|
|
34
|
+
const content = fs.readFileSync(vcmPath, 'utf8');
|
|
35
35
|
|
|
36
36
|
// Check if this is our VibeCodingMachine binary
|
|
37
37
|
if (content.includes('VibeCodingMachine CLI') || content.includes('allnightai')) {
|
|
@@ -45,19 +45,19 @@ function checkForExistingAna() {
|
|
|
45
45
|
|
|
46
46
|
// It's NOT ours - there's a conflict
|
|
47
47
|
console.log(chalk.yellow('\n⚠️ Warning: An existing "vcm" command was detected at:'));
|
|
48
|
-
console.log(chalk.yellow(` ${
|
|
48
|
+
console.log(chalk.yellow(` ${vcmPath}`));
|
|
49
49
|
console.log(chalk.yellow('\n The "vcm" shortcut will NOT be installed to avoid conflicts.'));
|
|
50
50
|
console.log(chalk.cyan(' You can still use the full command: ') + chalk.bold('vibecodingmachine'));
|
|
51
51
|
console.log();
|
|
52
52
|
|
|
53
|
-
// Remove
|
|
53
|
+
// Remove vcm from bin to prevent conflict
|
|
54
54
|
const packageJsonPath = path.join(__dirname, '..', 'package.json');
|
|
55
55
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
56
56
|
|
|
57
|
-
if (packageJson.bin && packageJson.bin.
|
|
58
|
-
delete packageJson.bin.
|
|
57
|
+
if (packageJson.bin && packageJson.bin.vcm) {
|
|
58
|
+
delete packageJson.bin.vcm;
|
|
59
59
|
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
|
|
60
|
-
console.log(chalk.gray(' ✓ Removed "
|
|
60
|
+
console.log(chalk.gray(' ✓ Removed "vcm" from bin configuration to prevent conflict\n'));
|
|
61
61
|
}
|
|
62
62
|
} catch (err) {
|
|
63
63
|
// File doesn't exist or can't be read - probably safe to install
|
|
@@ -67,7 +67,7 @@ function checkForExistingAna() {
|
|
|
67
67
|
console.log();
|
|
68
68
|
}
|
|
69
69
|
} catch (error) {
|
|
70
|
-
// Error running which - assume no
|
|
70
|
+
// Error running which - assume no vcm exists
|
|
71
71
|
console.log(chalk.green('\n✓ Vibe Coding Machine CLI installed successfully!'));
|
|
72
72
|
console.log(chalk.gray(' You can use either:'));
|
|
73
73
|
console.log(chalk.cyan(' vibecodingmachine') + chalk.gray(' or ') + chalk.cyan('vcm'));
|
|
@@ -1605,7 +1605,7 @@ async function handleAutoStart(options) {
|
|
|
1605
1605
|
const repoPath = await getRepoPath();
|
|
1606
1606
|
if (!repoPath) {
|
|
1607
1607
|
console.log(chalk.red('✗ No repository configured'));
|
|
1608
|
-
console.log(chalk.gray('Run:'), chalk.cyan('
|
|
1608
|
+
console.log(chalk.gray('Run:'), chalk.cyan('vcm repo:set <path>'));
|
|
1609
1609
|
return;
|
|
1610
1610
|
}
|
|
1611
1611
|
|
package/src/commands/auto.js
CHANGED
|
@@ -803,7 +803,7 @@ async function start(options) {
|
|
|
803
803
|
} else {
|
|
804
804
|
console.log(chalk.gray(` Max chats: unlimited (will run until all requirements complete)`));
|
|
805
805
|
}
|
|
806
|
-
console.log(chalk.gray(` To stop: Press x or Ctrl+C, or run '
|
|
806
|
+
console.log(chalk.gray(` To stop: Press x or Ctrl+C, or run 'vcm auto:stop'\n`));
|
|
807
807
|
|
|
808
808
|
// Initialize control variables
|
|
809
809
|
let shouldExit = false;
|
|
@@ -1709,7 +1709,7 @@ Please implement this requirement now.`;
|
|
|
1709
1709
|
if (maxChats > 0) {
|
|
1710
1710
|
console.log(chalk.gray(` Max chats: ${maxChats}`));
|
|
1711
1711
|
}
|
|
1712
|
-
console.log(chalk.gray(` To stop: Press `) + chalk.white.bold('x') + chalk.gray(' or ') + chalk.white.bold('Ctrl+C') + chalk.gray(', or run \'
|
|
1712
|
+
console.log(chalk.gray(` To stop: Press `) + chalk.white.bold('x') + chalk.gray(' or ') + chalk.white.bold('Ctrl+C') + chalk.gray(', or run \'vcm auto:stop\''));
|
|
1713
1713
|
console.log();
|
|
1714
1714
|
|
|
1715
1715
|
// Helper function to print the purple status card
|
package/src/utils/interactive.js
CHANGED
|
@@ -3560,7 +3560,7 @@ Max Chats: ${maxChats || 'Never stop'}`;
|
|
|
3560
3560
|
try {
|
|
3561
3561
|
await auth.logout();
|
|
3562
3562
|
console.log(chalk.green('\n✓ Logged out successfully!\n'));
|
|
3563
|
-
console.log(chalk.gray('Run "vcm auth:login" or "
|
|
3563
|
+
console.log(chalk.gray('Run "vcm auth:login" or "vcm" to login again.\n'));
|
|
3564
3564
|
process.exit(0);
|
|
3565
3565
|
} catch (error) {
|
|
3566
3566
|
console.error(chalk.red('\n✗ Logout failed:'), error.message);
|