vibecodingmachine-cli 1.0.1 → 1.0.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.
- package/.env +1 -1
- package/README.md +9 -9
- package/bin/vibecodingmachine.js +1 -1
- package/package.json +4 -2
- package/scripts/README.md +5 -5
- package/scripts/auto-start-wrapper.sh +3 -3
- package/src/commands/auth.js +1 -1
- package/src/commands/auto-direct.js +3 -3
- package/src/commands/auto.js +5 -5
- package/src/commands/ide.js +1 -1
- package/src/commands/repo.js +2 -2
- package/src/utils/auth.js +51 -22
- package/src/utils/config.js +1 -1
- package/src/utils/interactive.js +3 -3
- package/tests/auto-mode.test.js +2 -2
- package/tests/config.test.js +1 -1
package/.env
CHANGED
package/README.md
CHANGED
|
@@ -13,18 +13,18 @@ npm run --workspaces --if-present build
|
|
|
13
13
|
npm link ./packages/cli
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Then run `
|
|
16
|
+
Then run `vibecodingmachine` or `vcm` (short version).
|
|
17
17
|
|
|
18
|
-
**Note**: The `vcm` shortcut will only be installed if you don't already have another `vcm` command on your system. If a conflict is detected, you can still use the full `
|
|
18
|
+
**Note**: The `vcm` shortcut will only be installed if you don't already have another `vcm` command on your system. If a conflict is detected, you can still use the full `vibecodingmachine` command.
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
vibecodingmachine --help # or: ana --help (if installed)
|
|
24
|
+
vibecodingmachine -v # or: ana -v (if installed)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
**Note**: You can use either `
|
|
27
|
+
**Note**: You can use either `vibecodingmachine` or `vcm` - they're the same command!
|
|
28
28
|
|
|
29
29
|
### Repository
|
|
30
30
|
```bash
|
|
@@ -71,15 +71,15 @@ ana interactive
|
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
## Configuration
|
|
74
|
-
- Stored at `~/.config/
|
|
74
|
+
- Stored at `~/.config/vibecodingmachine/config.json` by default
|
|
75
75
|
- Override for testing with env var `ALLNIGHTAI_CONFIG_PATH=/tmp/your-test-config.json`
|
|
76
76
|
|
|
77
77
|
## Development
|
|
78
78
|
```bash
|
|
79
79
|
# format and lint
|
|
80
|
-
npm run -w @
|
|
81
|
-
npm run -w @
|
|
80
|
+
npm run -w @vibecodingmachine/cli format
|
|
81
|
+
npm run -w @vibecodingmachine/cli lint
|
|
82
82
|
|
|
83
83
|
# tests
|
|
84
|
-
npm run -w @
|
|
84
|
+
npm run -w @vibecodingmachine/cli test
|
|
85
85
|
```
|
package/bin/vibecodingmachine.js
CHANGED
|
@@ -224,7 +224,7 @@ process.on('unhandledRejection', (error) => {
|
|
|
224
224
|
async function checkForUpdates() {
|
|
225
225
|
try {
|
|
226
226
|
const { checkForUpdatesWithCache } = require('@vibecodingmachine/core');
|
|
227
|
-
const updateInfo = await checkForUpdatesWithCache('
|
|
227
|
+
const updateInfo = await checkForUpdatesWithCache('vibecodingmachine-cli', packageJson.version);
|
|
228
228
|
|
|
229
229
|
if (updateInfo.hasUpdate) {
|
|
230
230
|
// Store update info globally for when auto mode starts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibecodingmachine-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Command-line interface for Vibe Coding Machine - Autonomous development",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
"jsonwebtoken": "^9.0.2",
|
|
39
39
|
"jwks-rsa": "^3.2.0",
|
|
40
40
|
"node-fetch": "^2.7.0",
|
|
41
|
-
"node-pty": "^1.0.0",
|
|
42
41
|
"open": "^11.0.0",
|
|
43
42
|
"ora": "^5.4.1",
|
|
44
43
|
"react": "^19.2.0",
|
|
45
44
|
"table": "^6.8.1"
|
|
46
45
|
},
|
|
46
|
+
"optionalDependencies": {
|
|
47
|
+
"node-pty": "^1.0.0"
|
|
48
|
+
},
|
|
47
49
|
"devDependencies": {
|
|
48
50
|
"eslint": "^8.57.0",
|
|
49
51
|
"jest": "^29.7.0",
|
package/scripts/README.md
CHANGED
|
@@ -14,10 +14,10 @@ Due to a Node.js limitation, SIGINT (Ctrl+C) signals don't reliably reach the ev
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# From anywhere (recommended)
|
|
17
|
-
~/.asdf/installs/nodejs/20.19.5/lib/node_modules/@
|
|
17
|
+
~/.asdf/installs/nodejs/20.19.5/lib/node_modules/@vibecodingmachine/cli/scripts/auto-start-wrapper.sh
|
|
18
18
|
|
|
19
19
|
# Or if you know the package location
|
|
20
|
-
/path/to/
|
|
20
|
+
/path/to/vibecodingmachine/packages/cli/scripts/auto-start-wrapper.sh
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### Creating a Convenient Alias
|
|
@@ -26,7 +26,7 @@ Add this to your `~/.zshrc` or `~/.bashrc`:
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# Alias for ana auto:start with Ctrl+C support
|
|
29
|
-
alias ana-start='~/.asdf/installs/nodejs/20.19.5/lib/node_modules/@
|
|
29
|
+
alias ana-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:
|
|
@@ -64,7 +64,7 @@ This wrapper script:
|
|
|
64
64
|
|
|
65
65
|
1. **Wrapper starts**: Spawns `node ana 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
|
-
3. **Key pressed**: Creates `~/.config/
|
|
67
|
+
3. **Key pressed**: Creates `~/.config/vibecodingmachine/.stop` file
|
|
68
68
|
4. **Watchdog detects**: The running ana process has a watchdog that checks for this file every 500ms
|
|
69
69
|
5. **Graceful exit**: When detected, ana kills Aider processes and exits the main loop
|
|
70
70
|
6. **Cleanup**: Wrapper removes the stop file and exits
|
|
@@ -74,7 +74,7 @@ This wrapper script:
|
|
|
74
74
|
You can also create the stop file manually:
|
|
75
75
|
```bash
|
|
76
76
|
# Create stop file
|
|
77
|
-
touch ~/.config/
|
|
77
|
+
touch ~/.config/vibecodingmachine/.stop
|
|
78
78
|
|
|
79
79
|
# Or use the stop command
|
|
80
80
|
ana auto:stop
|
|
@@ -18,10 +18,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
18
18
|
CLI_DIR="$(dirname "$SCRIPT_DIR")"
|
|
19
19
|
|
|
20
20
|
# Path to ana command
|
|
21
|
-
ANA_CMD="$CLI_DIR/bin/
|
|
21
|
+
ANA_CMD="$CLI_DIR/bin/vibecodingmachine.js"
|
|
22
22
|
|
|
23
23
|
# Path to stop file
|
|
24
|
-
STOP_FILE="$HOME/.config/
|
|
24
|
+
STOP_FILE="$HOME/.config/vibecodingmachine/.stop"
|
|
25
25
|
|
|
26
26
|
# Cleanup function
|
|
27
27
|
cleanup() {
|
|
@@ -46,7 +46,7 @@ cleanup() {
|
|
|
46
46
|
fi
|
|
47
47
|
|
|
48
48
|
# Also kill any remaining aider processes
|
|
49
|
-
pkill -9 -f "aider.*
|
|
49
|
+
pkill -9 -f "aider.*vibecodingmachine" 2>/dev/null || true
|
|
50
50
|
|
|
51
51
|
echo -e "${GREEN}Auto mode stopped${NC}"
|
|
52
52
|
exit 0
|
package/src/commands/auth.js
CHANGED
|
@@ -12,8 +12,8 @@ const fs = require('fs-extra');
|
|
|
12
12
|
const path = require('path');
|
|
13
13
|
const { spawn } = require('child_process');
|
|
14
14
|
const chokidar = require('chokidar');
|
|
15
|
-
|
|
16
|
-
const CLI_ENTRY_POINT = path.join(__dirname, '../../bin/
|
|
15
|
+
// Status management will use in-process tracking instead of external file
|
|
16
|
+
const CLI_ENTRY_POINT = path.join(__dirname, '../../bin/vibecodingmachine.js');
|
|
17
17
|
const { getProviderPreferences, getProviderDefinition } = require('../utils/provider-registry');
|
|
18
18
|
|
|
19
19
|
// CRITICAL: Shared ProviderManager instance to track rate limits across all function calls
|
|
@@ -1661,7 +1661,7 @@ async function handleAutoStart(options) {
|
|
|
1661
1661
|
|
|
1662
1662
|
// Spawn new CLI process
|
|
1663
1663
|
const { spawn } = require('child_process');
|
|
1664
|
-
const cliScriptPath = path.join(__dirname, '../../bin/
|
|
1664
|
+
const cliScriptPath = path.join(__dirname, '../../bin/vibecodingmachine.js');
|
|
1665
1665
|
const args = ['auto:direct', '--max-chats', remainingIterations.toString()];
|
|
1666
1666
|
|
|
1667
1667
|
// Spawn without detached mode - child will inherit terminal
|
package/src/commands/auto.js
CHANGED
|
@@ -521,7 +521,7 @@ async function start(options) {
|
|
|
521
521
|
|
|
522
522
|
// Install update using npm
|
|
523
523
|
await new Promise((resolve, reject) => {
|
|
524
|
-
const npmInstall = spawn('npm', ['install', '-g', '
|
|
524
|
+
const npmInstall = spawn('npm', ['install', '-g', 'vibecodingmachine-cli'], {
|
|
525
525
|
stdio: 'inherit'
|
|
526
526
|
});
|
|
527
527
|
|
|
@@ -560,7 +560,7 @@ async function start(options) {
|
|
|
560
560
|
const repoPath = await getRepoPath();
|
|
561
561
|
if (!repoPath) {
|
|
562
562
|
spinner.fail('No repository configured');
|
|
563
|
-
console.log(chalk.gray('Run'), chalk.cyan('
|
|
563
|
+
console.log(chalk.gray('Run'), chalk.cyan('vcm repo:set <path>'), chalk.gray('or'), chalk.cyan('vcm repo:init'));
|
|
564
564
|
throw new Error('No repository configured');
|
|
565
565
|
}
|
|
566
566
|
|
|
@@ -1653,7 +1653,7 @@ Please implement this requirement now.`;
|
|
|
1653
1653
|
// This runs periodically to check if user wants to exit
|
|
1654
1654
|
// (workaround for SIGINT not being processed reliably when blocked on child processes)
|
|
1655
1655
|
const fs = require('fs-extra');
|
|
1656
|
-
const stopFilePath = path.join(os.homedir(), '.config', '
|
|
1656
|
+
const stopFilePath = path.join(os.homedir(), '.config', 'vibecodingmachine', '.stop');
|
|
1657
1657
|
|
|
1658
1658
|
const watchdog = setInterval(async () => {
|
|
1659
1659
|
// Check for stop file (created by 'vcm auto:stop' or user)
|
|
@@ -4552,7 +4552,7 @@ Example BAD questions (never ask these):
|
|
|
4552
4552
|
logIDEMessage(config.ide, `[FAILED] ${textToSend}`);
|
|
4553
4553
|
spinner.warn('Auto mode started but failed to send initial message to IDE');
|
|
4554
4554
|
console.log(chalk.yellow('\n⚠ Warning:'), result.error || 'Failed to send message');
|
|
4555
|
-
console.log(chalk.gray(' Consider using'), chalk.cyan('Cline IDE'), chalk.gray('instead (set with'), chalk.cyan('
|
|
4555
|
+
console.log(chalk.gray(' Consider using'), chalk.cyan('Cline IDE'), chalk.gray('instead (set with'), chalk.cyan('vcm'), chalk.gray('menu)'));
|
|
4556
4556
|
} else {
|
|
4557
4557
|
logIDEMessage(config.ide, textToSend);
|
|
4558
4558
|
spinner.succeed('Autonomous mode started and initial message sent');
|
|
@@ -4603,7 +4603,7 @@ async function stop() {
|
|
|
4603
4603
|
try {
|
|
4604
4604
|
// Create stop file to signal running auto:start process
|
|
4605
4605
|
const fs = require('fs-extra');
|
|
4606
|
-
const stopFilePath = path.join(os.homedir(), '.config', '
|
|
4606
|
+
const stopFilePath = path.join(os.homedir(), '.config', 'vibecodingmachine', '.stop');
|
|
4607
4607
|
|
|
4608
4608
|
await fs.ensureDir(path.dirname(stopFilePath));
|
|
4609
4609
|
await fs.writeFile(stopFilePath, `Stop requested at ${new Date().toISOString()}`);
|
package/src/commands/ide.js
CHANGED
|
@@ -16,7 +16,7 @@ async function open(ide) {
|
|
|
16
16
|
const repoPath = await getRepoPath();
|
|
17
17
|
if (!repoPath) {
|
|
18
18
|
console.log(chalk.yellow('No repository path configured'));
|
|
19
|
-
console.log(chalk.gray('Use'), chalk.cyan('
|
|
19
|
+
console.log(chalk.gray('Use'), chalk.cyan('vcm repo:init'), chalk.gray('or'), chalk.cyan('vcm repo:set <path>'));
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
22
|
const ideKey = String(ide || '').toLowerCase();
|
package/src/commands/repo.js
CHANGED
|
@@ -33,7 +33,7 @@ async function getRepo() {
|
|
|
33
33
|
|
|
34
34
|
if (!repoPath) {
|
|
35
35
|
console.log(chalk.yellow('No repository path configured'));
|
|
36
|
-
console.log(chalk.gray('Use'), chalk.cyan('
|
|
36
|
+
console.log(chalk.gray('Use'), chalk.cyan('vcm repo:set <path>'), chalk.gray('to set repository path'));
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -145,7 +145,7 @@ ${fileNote}
|
|
|
145
145
|
console.log(chalk.gray('\nNext steps:'));
|
|
146
146
|
const configPath = location === 'inside' ? `.vibecodingmachine/${requirementsFilename}` : `../.vibecodingmachine-${repoName}/${requirementsFilename}`;
|
|
147
147
|
console.log(chalk.gray(' 1. Edit'), chalk.cyan(configPath), chalk.gray('with your requirements'));
|
|
148
|
-
console.log(chalk.gray(' 2. Run'), chalk.cyan('
|
|
148
|
+
console.log(chalk.gray(' 2. Run'), chalk.cyan('vcm auto:start'), chalk.gray('to begin autonomous development'));
|
|
149
149
|
} catch (error) {
|
|
150
150
|
console.error(chalk.red('Error initializing repository:'), error.message);
|
|
151
151
|
process.exit(1);
|
package/src/utils/auth.js
CHANGED
|
@@ -7,7 +7,7 @@ const sharedAuth = require('vibecodingmachine-core/src/auth/shared-auth-storage'
|
|
|
7
7
|
|
|
8
8
|
// AWS Cognito configuration
|
|
9
9
|
const COGNITO_DOMAIN = process.env.COGNITO_DOMAIN || 'allnightai-auth-1763598779.auth.us-east-1.amazoncognito.com';
|
|
10
|
-
const CLIENT_ID = process.env.COGNITO_APP_CLIENT_ID || '
|
|
10
|
+
const CLIENT_ID = process.env.COGNITO_APP_CLIENT_ID || '3tbe1i2g36uqule92iuk6snuo3'; // Public client (no secret)
|
|
11
11
|
const PORT = 3000;
|
|
12
12
|
|
|
13
13
|
// Load shared access denied HTML
|
|
@@ -248,8 +248,6 @@ class CLIAuth {
|
|
|
248
248
|
|
|
249
249
|
// Standard browser-based login
|
|
250
250
|
return new Promise((resolve, reject) => {
|
|
251
|
-
console.log(chalk.cyan('\n🔐 Opening browser for authentication...\n'));
|
|
252
|
-
|
|
253
251
|
let serverClosed = false;
|
|
254
252
|
|
|
255
253
|
// Generate PKCE code verifier and challenge
|
|
@@ -282,23 +280,42 @@ class CLIAuth {
|
|
|
282
280
|
await sharedAuth.saveToken(idToken);
|
|
283
281
|
|
|
284
282
|
// Show success page
|
|
285
|
-
res.writeHead(200, {
|
|
283
|
+
res.writeHead(200, {
|
|
284
|
+
'Content-Type': 'text/html',
|
|
285
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
|
286
|
+
'Pragma': 'no-cache',
|
|
287
|
+
'Expires': '0'
|
|
288
|
+
});
|
|
286
289
|
res.end(`
|
|
290
|
+
<!DOCTYPE html>
|
|
287
291
|
<html>
|
|
288
292
|
<head>
|
|
293
|
+
<meta charset="UTF-8">
|
|
294
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
289
295
|
<style>
|
|
296
|
+
* {
|
|
297
|
+
margin: 0;
|
|
298
|
+
padding: 0;
|
|
299
|
+
box-sizing: border-box;
|
|
300
|
+
}
|
|
301
|
+
html, body {
|
|
302
|
+
width: 100%;
|
|
303
|
+
height: 100%;
|
|
304
|
+
overflow: hidden;
|
|
305
|
+
position: fixed;
|
|
306
|
+
}
|
|
290
307
|
body {
|
|
291
308
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
292
|
-
text-align: center;
|
|
293
|
-
padding: 50px;
|
|
294
309
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
295
310
|
color: white;
|
|
296
|
-
|
|
297
|
-
|
|
311
|
+
}
|
|
312
|
+
.wrapper {
|
|
313
|
+
width: 100%;
|
|
314
|
+
height: 100%;
|
|
298
315
|
display: flex;
|
|
299
|
-
flex-direction: column;
|
|
300
316
|
align-items: center;
|
|
301
317
|
justify-content: center;
|
|
318
|
+
padding: 20px;
|
|
302
319
|
}
|
|
303
320
|
.container {
|
|
304
321
|
background: white;
|
|
@@ -306,7 +323,9 @@ class CLIAuth {
|
|
|
306
323
|
padding: 40px;
|
|
307
324
|
border-radius: 12px;
|
|
308
325
|
box-shadow: 0 8px 32px rgba(0,0,0,0.3);
|
|
309
|
-
|
|
326
|
+
width: 500px;
|
|
327
|
+
max-width: 100%;
|
|
328
|
+
text-align: center;
|
|
310
329
|
}
|
|
311
330
|
h1 { margin: 0 0 20px 0; color: #10b981; }
|
|
312
331
|
p { margin: 10px 0; color: #666; }
|
|
@@ -338,17 +357,19 @@ class CLIAuth {
|
|
|
338
357
|
</style>
|
|
339
358
|
</head>
|
|
340
359
|
<body>
|
|
341
|
-
<div class="
|
|
342
|
-
<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
<div class="info-
|
|
348
|
-
|
|
349
|
-
<
|
|
350
|
-
|
|
351
|
-
|
|
360
|
+
<div class="wrapper">
|
|
361
|
+
<div class="container">
|
|
362
|
+
<h1>Authentication Successful!</h1>
|
|
363
|
+
<p>You are now logged in to Vibe Coding Machine.</p>
|
|
364
|
+
<p>You can close this window and return to the terminal.</p>
|
|
365
|
+
|
|
366
|
+
<div class="info-box">
|
|
367
|
+
<div class="info-title">Available Commands:</div>
|
|
368
|
+
<div class="command-list">
|
|
369
|
+
<code>vcm</code> - Start interactive mode<br>
|
|
370
|
+
<code>vcm auth:status</code> - Check authentication status<br>
|
|
371
|
+
<code>vcm auth:logout</code> - Logout
|
|
372
|
+
</div>
|
|
352
373
|
</div>
|
|
353
374
|
</div>
|
|
354
375
|
</div>
|
|
@@ -411,7 +432,15 @@ class CLIAuth {
|
|
|
411
432
|
} else {
|
|
412
433
|
// Standard open for local or GUI environments
|
|
413
434
|
const open = (await import('open')).default;
|
|
414
|
-
|
|
435
|
+
try {
|
|
436
|
+
await open(authUrl);
|
|
437
|
+
console.log(chalk.gray('\nIf the browser did not open automatically, please manually open:'));
|
|
438
|
+
console.log(chalk.blue(` ${authUrl}\n`));
|
|
439
|
+
} catch (error) {
|
|
440
|
+
console.log(chalk.yellow('\n⚠️ Could not open browser automatically.'));
|
|
441
|
+
console.log(chalk.gray('Please manually open this URL:\n'));
|
|
442
|
+
console.log(chalk.blue(` ${authUrl}\n`));
|
|
443
|
+
}
|
|
415
444
|
}
|
|
416
445
|
});
|
|
417
446
|
|
package/src/utils/config.js
CHANGED
|
@@ -2,7 +2,7 @@ const path = require('path');
|
|
|
2
2
|
const os = require('os');
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
|
|
5
|
-
const DEFAULT_CONFIG_DIR = path.join(os.homedir(), '.config', '
|
|
5
|
+
const DEFAULT_CONFIG_DIR = path.join(os.homedir(), '.config', 'vibecodingmachine');
|
|
6
6
|
const DEFAULT_CONFIG_PATH = path.join(DEFAULT_CONFIG_DIR, 'config.json');
|
|
7
7
|
|
|
8
8
|
function getConfigPath() {
|
package/src/utils/interactive.js
CHANGED
|
@@ -63,7 +63,7 @@ function getAgentDisplayName(agentType) {
|
|
|
63
63
|
const fs = require('fs');
|
|
64
64
|
const path = require('path');
|
|
65
65
|
const os = require('os');
|
|
66
|
-
const configPath = path.join(os.homedir(), '.config', '
|
|
66
|
+
const configPath = path.join(os.homedir(), '.config', 'vibecodingmachine', 'config.json');
|
|
67
67
|
if (fs.existsSync(configPath)) {
|
|
68
68
|
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
69
69
|
const model = config.auto?.llmModel || config.auto?.aiderModel || config.auto?.groqModel;
|
|
@@ -110,7 +110,7 @@ function getCurrentAIProvider(ide) {
|
|
|
110
110
|
const fs = require('fs');
|
|
111
111
|
const path = require('path');
|
|
112
112
|
const os = require('os');
|
|
113
|
-
const configPath = path.join(os.homedir(), '.config', '
|
|
113
|
+
const configPath = path.join(os.homedir(), '.config', 'vibecodingmachine', 'config.json');
|
|
114
114
|
if (fs.existsSync(configPath)) {
|
|
115
115
|
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
116
116
|
const aiderModel = config.auto?.aiderModel;
|
|
@@ -2703,7 +2703,7 @@ async function startInteractive() {
|
|
|
2703
2703
|
const path = require('path');
|
|
2704
2704
|
const os = require('os');
|
|
2705
2705
|
|
|
2706
|
-
const configPath = path.join(os.homedir(), '.config', '
|
|
2706
|
+
const configPath = path.join(os.homedir(), '.config', 'vibecodingmachine', 'config.json');
|
|
2707
2707
|
|
|
2708
2708
|
if (fs.existsSync(configPath)) {
|
|
2709
2709
|
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
package/tests/auto-mode.test.js
CHANGED
|
@@ -3,8 +3,8 @@ const path = require('path');
|
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
|
|
5
5
|
describe('auto-mode utils', () => {
|
|
6
|
-
const tmpConfig = path.join(os.tmpdir(), `
|
|
7
|
-
const tmpRepo = path.join(os.tmpdir(), `
|
|
6
|
+
const tmpConfig = path.join(os.tmpdir(), `vibecodingmachine_test_config_${Date.now()}.json`);
|
|
7
|
+
const tmpRepo = path.join(os.tmpdir(), `vibecodingmachine_test_repo_${Date.now()}`);
|
|
8
8
|
|
|
9
9
|
beforeAll(async () => {
|
|
10
10
|
process.env.ALLNIGHTAI_CONFIG_PATH = tmpConfig;
|
package/tests/config.test.js
CHANGED
|
@@ -3,7 +3,7 @@ const path = require('path');
|
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
|
|
5
5
|
describe('config utils', () => {
|
|
6
|
-
const tmpConfig = path.join(os.tmpdir(), `
|
|
6
|
+
const tmpConfig = path.join(os.tmpdir(), `vibecodingmachine_test_config_${Date.now()}.json`);
|
|
7
7
|
|
|
8
8
|
beforeAll(() => {
|
|
9
9
|
process.env.ALLNIGHTAI_CONFIG_PATH = tmpConfig;
|