vibecodingmachine-cli 2025.12.22-2230 → 2025.12.24-2348
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/vibecodingmachine.js +57 -50
- package/logs/audit/2025-12-24.jsonl +2 -0
- package/package.json +2 -2
- package/src/commands/auth.js +19 -18
- package/src/commands/auto-direct.js +81 -56
- package/src/commands/auto.js +13 -12
- package/src/commands/computers.js +58 -55
- package/src/commands/locale.js +73 -0
- package/src/commands/requirements-remote.js +4 -3
- package/src/commands/setup.js +14 -13
- package/src/commands/status.js +17 -17
- package/src/commands/sync.js +68 -67
- package/src/utils/first-run.js +4 -3
- package/src/utils/interactive.js +178 -117
- package/src/utils/provider-registry.js +38 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const Table = require('cli-table3');
|
|
3
3
|
const SyncEngine = require('vibecodingmachine-core/src/sync/sync-engine');
|
|
4
|
+
const { t } = require('vibecodingmachine-core');
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Display all registered computers with their status
|
|
@@ -15,8 +16,8 @@ async function listComputers(options = {}) {
|
|
|
15
16
|
const computers = await fetchAllComputers(syncEngine);
|
|
16
17
|
|
|
17
18
|
if (computers.length === 0) {
|
|
18
|
-
console.log(chalk.yellow('
|
|
19
|
-
console.log(chalk.gray('
|
|
19
|
+
console.log(chalk.yellow(`\n${t('computers.no.computers')}\n`));
|
|
20
|
+
console.log(chalk.gray(`${t('computers.will.appear')}\n`));
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -38,12 +39,12 @@ async function listComputers(options = {}) {
|
|
|
38
39
|
// Create table
|
|
39
40
|
const table = new Table({
|
|
40
41
|
head: [
|
|
41
|
-
chalk.cyan('
|
|
42
|
-
chalk.cyan('
|
|
43
|
-
chalk.cyan('
|
|
44
|
-
chalk.cyan('
|
|
45
|
-
chalk.cyan('
|
|
46
|
-
chalk.cyan('
|
|
42
|
+
chalk.cyan(t('computers.table.computer')),
|
|
43
|
+
chalk.cyan(t('computers.table.focus')),
|
|
44
|
+
chalk.cyan(t('computers.table.status')),
|
|
45
|
+
chalk.cyan(t('computers.table.requirement')),
|
|
46
|
+
chalk.cyan(t('computers.table.progress')),
|
|
47
|
+
chalk.cyan(t('computers.table.last.sync'))
|
|
47
48
|
],
|
|
48
49
|
colWidths: [25, 30, 12, 35, 10, 15]
|
|
49
50
|
});
|
|
@@ -51,11 +52,12 @@ async function listComputers(options = {}) {
|
|
|
51
52
|
// Add rows
|
|
52
53
|
for (const computer of filteredComputers) {
|
|
53
54
|
const statusIcon = getStatusIcon(computer.status);
|
|
54
|
-
const
|
|
55
|
+
const statusKey = `computers.status.${computer.status || 'unknown'}`;
|
|
56
|
+
const statusText = `${statusIcon} ${t(statusKey)}`;
|
|
55
57
|
const progress = computer.progress ? `${computer.progress}%` : '-';
|
|
56
|
-
const lastSync = computer.lastSyncTime
|
|
58
|
+
const lastSync = computer.lastSyncTime
|
|
57
59
|
? formatTimeSince(computer.lastSyncTime)
|
|
58
|
-
: 'never';
|
|
60
|
+
: t('computers.never');
|
|
59
61
|
|
|
60
62
|
table.push([
|
|
61
63
|
computer.hostname || computer.computerId,
|
|
@@ -73,17 +75,17 @@ async function listComputers(options = {}) {
|
|
|
73
75
|
const activeCount = computers.filter(c => c.status === 'active').length;
|
|
74
76
|
const idleCount = computers.filter(c => c.status === 'idle').length;
|
|
75
77
|
const errorCount = computers.filter(c => c.status === 'error').length;
|
|
76
|
-
|
|
77
|
-
console.log(chalk.gray(
|
|
78
|
-
console.log(chalk.green(`
|
|
79
|
-
console.log(chalk.yellow(`
|
|
78
|
+
|
|
79
|
+
console.log(chalk.gray(t('computers.total', { count: computers.length })));
|
|
80
|
+
console.log(chalk.green(` ${t('computers.active', { count: activeCount })}`));
|
|
81
|
+
console.log(chalk.yellow(` ${t('computers.idle', { count: idleCount })}`));
|
|
80
82
|
if (errorCount > 0) {
|
|
81
|
-
console.log(chalk.red(`
|
|
83
|
+
console.log(chalk.red(` ${t('computers.error', { count: errorCount })}`));
|
|
82
84
|
}
|
|
83
85
|
console.log('');
|
|
84
86
|
|
|
85
87
|
} catch (error) {
|
|
86
|
-
console.error(chalk.red(
|
|
88
|
+
console.error(chalk.red(`\n✗ ${t('computers.fetch.failed')}`), error.message);
|
|
87
89
|
throw error;
|
|
88
90
|
} finally {
|
|
89
91
|
syncEngine.stop();
|
|
@@ -102,44 +104,45 @@ async function showComputerStatus(computerId) {
|
|
|
102
104
|
const computer = await fetchComputer(syncEngine, computerId);
|
|
103
105
|
|
|
104
106
|
if (!computer) {
|
|
105
|
-
console.log(chalk.red(`\n✗
|
|
107
|
+
console.log(chalk.red(`\n✗ ${t('computers.not.found', { id: computerId })}\n`));
|
|
106
108
|
return;
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
// Display computer details
|
|
110
|
-
console.log('\n' + chalk.bold.cyan('
|
|
112
|
+
console.log('\n' + chalk.bold.cyan(t('computers.details.title')));
|
|
111
113
|
console.log(chalk.gray('─'.repeat(60)));
|
|
112
|
-
console.log(chalk.white('
|
|
113
|
-
console.log(chalk.white('
|
|
114
|
-
console.log(chalk.white('
|
|
115
|
-
console.log(chalk.white('
|
|
116
|
-
|
|
117
|
-
console.log(chalk.white('
|
|
114
|
+
console.log(chalk.white(t('computers.details.hostname').padEnd(17)) + (computer.hostname || computer.computerId));
|
|
115
|
+
console.log(chalk.white(t('computers.details.id').padEnd(17)) + computer.computerId);
|
|
116
|
+
console.log(chalk.white(t('computers.details.focus').padEnd(17)) + (computer.focusArea || '-'));
|
|
117
|
+
console.log(chalk.white(t('computers.details.os').padEnd(17)) + (computer.os || '-'));
|
|
118
|
+
const statusKey = `computers.status.${computer.status || 'unknown'}`;
|
|
119
|
+
console.log(chalk.white(t('computers.details.status').padEnd(17)) + getStatusIcon(computer.status) + ' ' + t(statusKey));
|
|
120
|
+
console.log(chalk.white(t('computers.details.last.sync').padEnd(17)) + (computer.lastSyncTime ? formatTimeSince(computer.lastSyncTime) : t('computers.never')));
|
|
118
121
|
console.log('');
|
|
119
122
|
|
|
120
123
|
// Current work
|
|
121
|
-
console.log(chalk.bold.cyan('
|
|
124
|
+
console.log(chalk.bold.cyan(t('computers.work.title')));
|
|
122
125
|
console.log(chalk.gray('─'.repeat(60)));
|
|
123
|
-
console.log(chalk.white('
|
|
124
|
-
console.log(chalk.white('
|
|
125
|
-
console.log(chalk.white('
|
|
126
|
-
console.log(chalk.white('
|
|
126
|
+
console.log(chalk.white(t('computers.work.requirement').padEnd(17)) + (computer.currentRequirement || t('computers.work.none')));
|
|
127
|
+
console.log(chalk.white(t('computers.work.progress').padEnd(17)) + (computer.progress ? `${computer.progress}%` : '-'));
|
|
128
|
+
console.log(chalk.white(t('computers.work.time.active').padEnd(17)) + (computer.timeActive || '-'));
|
|
129
|
+
console.log(chalk.white(t('computers.work.ide').padEnd(17)) + (computer.ide || '-'));
|
|
127
130
|
console.log('');
|
|
128
131
|
|
|
129
132
|
// Statistics
|
|
130
133
|
if (computer.stats) {
|
|
131
|
-
console.log(chalk.bold.cyan('
|
|
134
|
+
console.log(chalk.bold.cyan(t('computers.stats.title')));
|
|
132
135
|
console.log(chalk.gray('─'.repeat(60)));
|
|
133
|
-
console.log(chalk.white('
|
|
134
|
-
console.log(chalk.white('
|
|
135
|
-
console.log(chalk.white('
|
|
136
|
-
console.log(chalk.white('
|
|
137
|
-
console.log(chalk.white('
|
|
136
|
+
console.log(chalk.white(t('computers.stats.total').padEnd(21)) + (computer.stats.total || 0));
|
|
137
|
+
console.log(chalk.white(t('computers.stats.completed').padEnd(21)) + chalk.green(computer.stats.completed || 0));
|
|
138
|
+
console.log(chalk.white(t('computers.stats.in.progress').padEnd(21)) + chalk.yellow(computer.stats.inProgress || 0));
|
|
139
|
+
console.log(chalk.white(t('computers.stats.to.verify').padEnd(21)) + chalk.blue(computer.stats.toVerify || 0));
|
|
140
|
+
console.log(chalk.white(t('computers.stats.completion.rate').padEnd(21)) + (computer.stats.completionRate || '0%'));
|
|
138
141
|
console.log('');
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
} catch (error) {
|
|
142
|
-
console.error(chalk.red(
|
|
145
|
+
console.error(chalk.red(`\n✗ ${t('computers.status.fetch.failed')}`), error.message);
|
|
143
146
|
throw error;
|
|
144
147
|
} finally {
|
|
145
148
|
syncEngine.stop();
|
|
@@ -167,15 +170,15 @@ async function registerComputer(focusArea) {
|
|
|
167
170
|
};
|
|
168
171
|
|
|
169
172
|
await saveComputer(syncEngine, computerData);
|
|
170
|
-
|
|
171
|
-
console.log(chalk.green(
|
|
172
|
-
console.log(chalk.white('
|
|
173
|
-
console.log(chalk.white('
|
|
174
|
-
console.log(chalk.white('
|
|
173
|
+
|
|
174
|
+
console.log(chalk.green(`\n✓ ${t('computers.register.success')}\n`));
|
|
175
|
+
console.log(chalk.white(t('computers.register.id').padEnd(14)) + computerData.computerId);
|
|
176
|
+
console.log(chalk.white(t('computers.register.hostname').padEnd(14)) + computerData.hostname);
|
|
177
|
+
console.log(chalk.white(t('computers.register.focus').padEnd(14)) + computerData.focusArea);
|
|
175
178
|
console.log('');
|
|
176
179
|
|
|
177
180
|
} catch (error) {
|
|
178
|
-
console.error(chalk.red(
|
|
181
|
+
console.error(chalk.red(`\n✗ ${t('computers.register.failed')}`), error.message);
|
|
179
182
|
throw error;
|
|
180
183
|
} finally {
|
|
181
184
|
syncEngine.stop();
|
|
@@ -194,7 +197,7 @@ async function updateFocus(newFocusArea) {
|
|
|
194
197
|
const computer = await fetchComputer(syncEngine, syncEngine.computerId);
|
|
195
198
|
|
|
196
199
|
if (!computer) {
|
|
197
|
-
console.log(chalk.yellow(
|
|
200
|
+
console.log(chalk.yellow(`\n⚠ ${t('computers.not.registered')}\n`));
|
|
198
201
|
await registerComputer(newFocusArea);
|
|
199
202
|
return;
|
|
200
203
|
}
|
|
@@ -203,14 +206,14 @@ async function updateFocus(newFocusArea) {
|
|
|
203
206
|
computer.lastSyncTime = Date.now();
|
|
204
207
|
|
|
205
208
|
await saveComputer(syncEngine, computer);
|
|
206
|
-
|
|
207
|
-
console.log(chalk.green(
|
|
208
|
-
console.log(chalk.white('
|
|
209
|
-
console.log(chalk.white('
|
|
209
|
+
|
|
210
|
+
console.log(chalk.green(`\n✓ ${t('computers.focus.updated')}\n`));
|
|
211
|
+
console.log(chalk.white(t('computers.focus.computer').padEnd(14)) + computer.hostname);
|
|
212
|
+
console.log(chalk.white(t('computers.focus.new').padEnd(14)) + newFocusArea);
|
|
210
213
|
console.log('');
|
|
211
214
|
|
|
212
215
|
} catch (error) {
|
|
213
|
-
console.error(chalk.red(
|
|
216
|
+
console.error(chalk.red(`\n✗ ${t('computers.focus.update.failed')}`), error.message);
|
|
214
217
|
throw error;
|
|
215
218
|
} finally {
|
|
216
219
|
syncEngine.stop();
|
|
@@ -232,16 +235,16 @@ function getStatusIcon(status) {
|
|
|
232
235
|
function formatTimeSince(timestamp) {
|
|
233
236
|
const now = Date.now();
|
|
234
237
|
const diff = now - timestamp;
|
|
235
|
-
|
|
238
|
+
|
|
236
239
|
const seconds = Math.floor(diff / 1000);
|
|
237
240
|
const minutes = Math.floor(seconds / 60);
|
|
238
241
|
const hours = Math.floor(minutes / 60);
|
|
239
242
|
const days = Math.floor(hours / 24);
|
|
240
|
-
|
|
241
|
-
if (days > 0) return
|
|
242
|
-
if (hours > 0) return
|
|
243
|
-
if (minutes > 0) return
|
|
244
|
-
return
|
|
243
|
+
|
|
244
|
+
if (days > 0) return t('computers.time.days.ago', { count: days });
|
|
245
|
+
if (hours > 0) return t('computers.time.hours.ago', { count: hours });
|
|
246
|
+
if (minutes > 0) return t('computers.time.minutes.ago', { count: minutes });
|
|
247
|
+
return t('computers.time.seconds.ago', { count: seconds });
|
|
245
248
|
}
|
|
246
249
|
|
|
247
250
|
function truncate(str, maxLength) {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const { t, getCurrentLocale, setLocale, getAvailableLocales, detectLocale } = require('vibecodingmachine-core');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Show current locale information
|
|
6
|
+
*/
|
|
7
|
+
async function show() {
|
|
8
|
+
const current = getCurrentLocale();
|
|
9
|
+
const detected = detectLocale();
|
|
10
|
+
const available = getAvailableLocales();
|
|
11
|
+
|
|
12
|
+
console.log(chalk.bold(`\n🌍 ${t('app.name')} - Locale Information`));
|
|
13
|
+
console.log(chalk.gray('Current locale:'), chalk.cyan(current));
|
|
14
|
+
console.log(chalk.gray('Detected locale:'), chalk.cyan(detected));
|
|
15
|
+
console.log(chalk.gray('Available locales:'), chalk.cyan(available.join(', ')));
|
|
16
|
+
|
|
17
|
+
// Test some translations
|
|
18
|
+
console.log(chalk.bold('\n📝 Sample Translations:'));
|
|
19
|
+
console.log(` ${t('auth.login')}`);
|
|
20
|
+
console.log(` ${t('status.title')}`);
|
|
21
|
+
console.log(` ${t('setup.title')}`);
|
|
22
|
+
console.log();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Set locale
|
|
27
|
+
* @param {string} locale - Locale to set
|
|
28
|
+
*/
|
|
29
|
+
async function set(locale) {
|
|
30
|
+
const available = getAvailableLocales();
|
|
31
|
+
|
|
32
|
+
if (!available.includes(locale)) {
|
|
33
|
+
console.log(chalk.red(`\n✗ Unsupported locale: ${locale}`));
|
|
34
|
+
console.log(chalk.gray('Available locales:'), chalk.cyan(available.join(', ')));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setLocale(locale);
|
|
39
|
+
console.log(chalk.green(`\n✓ Locale set to: ${chalk.cyan(locale)}`));
|
|
40
|
+
|
|
41
|
+
// Show sample translation
|
|
42
|
+
console.log(chalk.gray('Sample:'), t('app.name'));
|
|
43
|
+
console.log();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Test locale detection and translations
|
|
48
|
+
*/
|
|
49
|
+
async function test() {
|
|
50
|
+
console.log(chalk.bold(`\n🧪 Testing Locale System`));
|
|
51
|
+
|
|
52
|
+
const available = getAvailableLocales();
|
|
53
|
+
|
|
54
|
+
for (const locale of available) {
|
|
55
|
+
console.log(chalk.bold(`\n--- ${locale.toUpperCase()} ---`));
|
|
56
|
+
setLocale(locale);
|
|
57
|
+
|
|
58
|
+
console.log(`${t('app.name')}`);
|
|
59
|
+
console.log(`${t('auth.login')}`);
|
|
60
|
+
console.log(`${t('status.title')}`);
|
|
61
|
+
console.log(`${t('setup.title')}`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Reset to detected locale
|
|
65
|
+
setLocale(detectLocale());
|
|
66
|
+
console.log();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
module.exports = {
|
|
70
|
+
show,
|
|
71
|
+
set,
|
|
72
|
+
test
|
|
73
|
+
};
|
|
@@ -2,6 +2,7 @@ const chalk = require('chalk');
|
|
|
2
2
|
const fs = require('fs-extra');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const inquirer = require('inquirer');
|
|
5
|
+
const { t } = require('vibecodingmachine-core');
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* List requirements for a specific computer
|
|
@@ -21,7 +22,7 @@ async function listRemoteRequirements(computerId) {
|
|
|
21
22
|
const content = await fs.readFile(reqPath, 'utf8');
|
|
22
23
|
const sections = parseRequirements(content);
|
|
23
24
|
|
|
24
|
-
console.log(chalk.bold.cyan(`\n📋
|
|
25
|
+
console.log(chalk.bold.cyan(`\n📋 ${t('requirements.for.computer', { computerId })}\n`));
|
|
25
26
|
|
|
26
27
|
// Show counts
|
|
27
28
|
console.log(chalk.white('Summary:'));
|
|
@@ -170,7 +171,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
170
171
|
switch (action) {
|
|
171
172
|
case 'view': {
|
|
172
173
|
await listRemoteRequirements(computerId);
|
|
173
|
-
console.log(chalk.gray('
|
|
174
|
+
console.log(chalk.gray(t('interactive.press.enter.continue')));
|
|
174
175
|
await new Promise(resolve => {
|
|
175
176
|
const readline = require('readline');
|
|
176
177
|
const rl = readline.createInterface({
|
|
@@ -197,7 +198,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
197
198
|
|
|
198
199
|
if (requirement) {
|
|
199
200
|
await addRemoteRequirement(computerId, requirement);
|
|
200
|
-
console.log(chalk.gray('
|
|
201
|
+
console.log(chalk.gray(t('interactive.press.enter.continue')));
|
|
201
202
|
await new Promise(resolve => {
|
|
202
203
|
const readline = require('readline');
|
|
203
204
|
const rl = readline.createInterface({
|
package/src/commands/setup.js
CHANGED
|
@@ -3,9 +3,10 @@ const path = require('path');
|
|
|
3
3
|
const os = require('os');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
5
|
const inquirer = require('inquirer');
|
|
6
|
+
const { t } = require('vibecodingmachine-core');
|
|
6
7
|
|
|
7
8
|
async function setupAlias() {
|
|
8
|
-
console.log(chalk.bold.cyan(
|
|
9
|
+
console.log(chalk.bold.cyan(`\n🛠️ ${t('setup.alias.title')}\n`));
|
|
9
10
|
|
|
10
11
|
// Detect shell
|
|
11
12
|
const shell = process.env.SHELL;
|
|
@@ -29,14 +30,14 @@ async function setupAlias() {
|
|
|
29
30
|
shellName = 'fish';
|
|
30
31
|
configFile = path.join(os.homedir(), '.config', 'fish', 'config.fish');
|
|
31
32
|
} else {
|
|
32
|
-
console.log(chalk.yellow(`⚠️
|
|
33
|
-
console.log(chalk.gray('
|
|
34
|
-
console.log(chalk.cyan('
|
|
33
|
+
console.log(chalk.yellow(`⚠️ ${t('setup.shell.unsupported', { shell })}`));
|
|
34
|
+
console.log(chalk.gray(`${t('setup.manual.alias')}\n`));
|
|
35
|
+
console.log(chalk.cyan(` ${t('cli.alias.manual')}`));
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
console.log(chalk.gray(
|
|
39
|
-
console.log(chalk.gray(
|
|
39
|
+
console.log(chalk.gray(t('setup.alias.detected', { shell: chalk.cyan(shellName) })));
|
|
40
|
+
console.log(chalk.gray(t('setup.alias.config', { file: chalk.cyan(configFile) })));
|
|
40
41
|
|
|
41
42
|
// Check if config file exists
|
|
42
43
|
if (!fs.existsSync(configFile)) {
|
|
@@ -56,7 +57,7 @@ async function setupAlias() {
|
|
|
56
57
|
|
|
57
58
|
// Check if alias already exists
|
|
58
59
|
if (content.includes('alias vcm="vibecodingmachine"') || content.includes("alias vcm='vibecodingmachine'")) {
|
|
59
|
-
console.log(chalk.green(
|
|
60
|
+
console.log(chalk.green(`\n✓ ${t('setup.alias.exists')}`));
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
63
|
|
|
@@ -65,13 +66,13 @@ async function setupAlias() {
|
|
|
65
66
|
{
|
|
66
67
|
type: 'confirm',
|
|
67
68
|
name: 'confirm',
|
|
68
|
-
message:
|
|
69
|
+
message: t('setup.alias.confirm', { file: path.basename(configFile) }),
|
|
69
70
|
default: true
|
|
70
71
|
}
|
|
71
72
|
]);
|
|
72
73
|
|
|
73
74
|
if (!confirm) {
|
|
74
|
-
console.log(chalk.yellow('
|
|
75
|
+
console.log(chalk.yellow(`\n${t('setup.alias.cancelled')}`));
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -80,11 +81,11 @@ async function setupAlias() {
|
|
|
80
81
|
|
|
81
82
|
try {
|
|
82
83
|
fs.appendFileSync(configFile, aliasCommand, 'utf8');
|
|
83
|
-
console.log(chalk.green(`\n✓
|
|
84
|
-
console.log(chalk.gray('
|
|
85
|
-
console.log(chalk.cyan(` source
|
|
84
|
+
console.log(chalk.green(`\n✓ ${t('setup.alias.added', { file: path.basename(configFile) })}`));
|
|
85
|
+
console.log(chalk.gray(`\n${t('setup.alias.restart')}`));
|
|
86
|
+
console.log(chalk.cyan(` ${t('setup.alias.source', { file: configFile })}`));
|
|
86
87
|
} catch (error) {
|
|
87
|
-
console.log(chalk.red(`\n✗
|
|
88
|
+
console.log(chalk.red(`\n✗ ${t('setup.alias.error', { error: error.message })}`));
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
|
package/src/commands/status.js
CHANGED
|
@@ -4,7 +4,7 @@ const os = require('os');
|
|
|
4
4
|
const chalk = require('chalk');
|
|
5
5
|
const { getRepoPath } = require('../utils/config');
|
|
6
6
|
const { checkAutoModeStatus } = require('../utils/auto-mode');
|
|
7
|
-
const { getRequirementsPath } = require('vibecodingmachine-core');
|
|
7
|
+
const { getRequirementsPath, t } = require('vibecodingmachine-core');
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Format IDE name for display
|
|
@@ -13,16 +13,16 @@ const { getRequirementsPath } = require('vibecodingmachine-core');
|
|
|
13
13
|
*/
|
|
14
14
|
function formatIDEName(ide) {
|
|
15
15
|
const ideNames = {
|
|
16
|
-
'cline': '
|
|
17
|
-
'cursor': '
|
|
18
|
-
'vscode': '
|
|
19
|
-
'windsurf': '
|
|
16
|
+
'cline': t('ide.cline'),
|
|
17
|
+
'cursor': t('ide.cursor'),
|
|
18
|
+
'vscode': t('ide.vscode'),
|
|
19
|
+
'windsurf': t('ide.windsurf')
|
|
20
20
|
};
|
|
21
21
|
return ideNames[ide] || ide;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function formatPath(fullPath) {
|
|
25
|
-
if (!fullPath) return 'not
|
|
25
|
+
if (!fullPath) return t('status.not.set');
|
|
26
26
|
const homeDir = os.homedir();
|
|
27
27
|
if (fullPath.startsWith(homeDir)) {
|
|
28
28
|
return fullPath.replace(homeDir, '~');
|
|
@@ -32,13 +32,13 @@ function formatPath(fullPath) {
|
|
|
32
32
|
|
|
33
33
|
async function show() {
|
|
34
34
|
const repoPath = await getRepoPath();
|
|
35
|
-
console.log(chalk.bold('
|
|
36
|
-
console.log(chalk.gray('
|
|
35
|
+
console.log(chalk.bold(`\n${t('status.title')}`));
|
|
36
|
+
console.log(chalk.gray(`${t('status.repository')}:`), chalk.cyan(formatPath(repoPath)));
|
|
37
37
|
const status = await checkAutoModeStatus();
|
|
38
|
-
console.log(chalk.gray('
|
|
38
|
+
console.log(chalk.gray(`${t('status.auto.mode')}:`), status.running ? chalk.green(t('status.running')) : chalk.yellow(t('status.stopped')));
|
|
39
39
|
if (status.running) {
|
|
40
|
-
console.log(chalk.gray('
|
|
41
|
-
console.log(chalk.gray('
|
|
40
|
+
console.log(chalk.gray(`${t('status.ide')}:`), chalk.cyan(formatIDEName(status.ide || 'cline')));
|
|
41
|
+
console.log(chalk.gray(`${t('status.chats')}:`), chalk.cyan(status.chatCount || 0));
|
|
42
42
|
}
|
|
43
43
|
console.log();
|
|
44
44
|
}
|
|
@@ -46,19 +46,19 @@ async function show() {
|
|
|
46
46
|
async function progress() {
|
|
47
47
|
const repoPath = await getRepoPath();
|
|
48
48
|
if (!repoPath) {
|
|
49
|
-
console.log(chalk.yellow('
|
|
49
|
+
console.log(chalk.yellow(t('status.no.repo')));
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
// Use getRequirementsPath to get the hostname-specific file
|
|
53
53
|
const reqPath = await getRequirementsPath(repoPath);
|
|
54
54
|
if (!reqPath || !await fs.pathExists(reqPath)) {
|
|
55
|
-
console.log(chalk.yellow('
|
|
55
|
+
console.log(chalk.yellow(t('status.no.requirements')));
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
const content = await fs.readFile(reqPath, 'utf8');
|
|
59
59
|
const current = content.match(/## \uD83D\uDEA6 Current Status\n([A-Z_ ]+)/);
|
|
60
|
-
console.log(chalk.bold('
|
|
61
|
-
console.log(chalk.gray('
|
|
60
|
+
console.log(chalk.bold(`\n${t('status.progress')}`));
|
|
61
|
+
console.log(chalk.gray(`${t('status.current.status')}:`), chalk.cyan(current ? current[1] : t('status.unknown')));
|
|
62
62
|
console.log();
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -66,9 +66,9 @@ async function logs(cmd) {
|
|
|
66
66
|
const lines = parseInt((cmd && cmd.lines) || '50', 10);
|
|
67
67
|
const defaultLog = path.join(process.cwd(), 'logs', 'security', 'security-2025-10-29.log');
|
|
68
68
|
const logPath = await fs.pathExists(defaultLog) ? defaultLog : null;
|
|
69
|
-
console.log(chalk.bold('
|
|
69
|
+
console.log(chalk.bold(`\n${t('logs.recent')}`));
|
|
70
70
|
if (!logPath) {
|
|
71
|
-
console.log(chalk.gray('
|
|
71
|
+
console.log(chalk.gray(t('logs.none')));
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
const content = await fs.readFile(logPath, 'utf8');
|