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.
@@ -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
  * Trigger immediate sync
@@ -9,8 +10,8 @@ async function syncNow() {
9
10
  const syncEngine = new SyncEngine();
10
11
 
11
12
  try {
12
- console.log(chalk.cyan('\nšŸ”„ Starting sync...\n'));
13
-
13
+ console.log(chalk.cyan(`\nšŸ”„ ${t('sync.starting')}\n`));
14
+
14
15
  await syncEngine.initialize();
15
16
 
16
17
  // Listen for sync completion
@@ -31,18 +32,18 @@ async function syncNow() {
31
32
  const result = await syncPromise;
32
33
 
33
34
  const status = syncEngine.getStatus();
34
-
35
- console.log(chalk.green('āœ“ Sync complete!\n'));
36
- console.log(chalk.white('Last Sync: ') + new Date(status.lastSyncTime).toLocaleString());
37
- console.log(chalk.white('Remote Changes: ') + (result.remoteChanges || 0));
38
- console.log(chalk.white('Local Changes: ') + (result.localChanges || 0));
39
- console.log(chalk.white('Conflicts: ') + (result.conflicts || 0));
40
- console.log(chalk.white('Queued Changes: ') + status.queuedChanges);
35
+
36
+ console.log(chalk.green(`āœ“ ${t('sync.complete')}\n`));
37
+ console.log(chalk.white(t('sync.last.sync').padEnd(17)) + new Date(status.lastSyncTime).toLocaleString());
38
+ console.log(chalk.white(t('sync.remote.changes').padEnd(17)) + (result.remoteChanges || 0));
39
+ console.log(chalk.white(t('sync.local.changes').padEnd(17)) + (result.localChanges || 0));
40
+ console.log(chalk.white(t('sync.conflicts').padEnd(17)) + (result.conflicts || 0));
41
+ console.log(chalk.white(t('sync.queued.changes').padEnd(17)) + status.queuedChanges);
41
42
  console.log('');
42
43
 
43
44
  } catch (error) {
44
- console.error(chalk.red('\nāœ— Sync failed:'), error.message);
45
- console.log(chalk.gray('\nTip: Check AWS credentials and DynamoDB table configuration.\n'));
45
+ console.error(chalk.red(`\nāœ— ${t('sync.failed')}`), error.message);
46
+ console.log(chalk.gray(`\n${t('sync.tip.aws')}\n`));
46
47
  // Don't throw - just log the error
47
48
  } finally {
48
49
  syncEngine.stop();
@@ -59,42 +60,42 @@ async function syncStatus() {
59
60
  await syncEngine.initialize();
60
61
 
61
62
  const status = syncEngine.getStatus();
62
-
63
- console.log('\n' + chalk.bold.cyan('Sync Status'));
63
+
64
+ console.log('\n' + chalk.bold.cyan(t('sync.status.title')));
64
65
  console.log(chalk.gray('─'.repeat(60)));
65
-
66
+
66
67
  // Connection status
67
68
  const onlineIcon = status.isOnline ? chalk.green('ā—') : chalk.red('ā—');
68
- const onlineText = status.isOnline ? 'Online' : 'Offline';
69
- console.log(chalk.white('Connection: ') + onlineIcon + ' ' + onlineText);
70
-
69
+ const onlineText = status.isOnline ? t('sync.status.online') : t('sync.status.offline');
70
+ console.log(chalk.white(t('sync.connection').padEnd(17)) + onlineIcon + ' ' + onlineText);
71
+
71
72
  // Sync status
72
73
  const syncingIcon = status.isSyncing ? chalk.yellow('⟳') : chalk.gray('ā—‹');
73
- const syncingText = status.isSyncing ? 'Syncing...' : 'Idle';
74
- console.log(chalk.white('Status: ') + syncingIcon + ' ' + syncingText);
75
-
74
+ const syncingText = status.isSyncing ? t('sync.status.syncing') : t('sync.status.idle');
75
+ console.log(chalk.white(t('sync.status').padEnd(17)) + syncingIcon + ' ' + syncingText);
76
+
76
77
  // Last sync
77
- const lastSync = status.lastSyncTime
78
+ const lastSync = status.lastSyncTime
78
79
  ? new Date(status.lastSyncTime).toLocaleString()
79
- : 'Never';
80
- console.log(chalk.white('Last Sync: ') + lastSync);
81
-
80
+ : t('sync.never');
81
+ console.log(chalk.white(t('sync.last.sync').padEnd(17)) + lastSync);
82
+
82
83
  // Queued changes
83
84
  const queueColor = status.queuedChanges > 0 ? chalk.yellow : chalk.gray;
84
- console.log(chalk.white('Queued Changes: ') + queueColor(status.queuedChanges));
85
-
85
+ console.log(chalk.white(t('sync.queued.changes').padEnd(17)) + queueColor(status.queuedChanges));
86
+
86
87
  // Conflict strategy
87
- console.log(chalk.white('Conflict Mode: ') + status.conflictStrategy);
88
-
88
+ console.log(chalk.white(t('sync.conflict.mode').padEnd(17)) + status.conflictStrategy);
89
+
89
90
  // Computer ID
90
- console.log(chalk.white('Computer ID: ') + status.computerId);
91
-
91
+ console.log(chalk.white(t('sync.computer.id').padEnd(17)) + status.computerId);
92
+
92
93
  console.log('');
93
94
 
94
95
  // Show recent sync events
95
96
  const history = syncEngine.getHistory(5);
96
97
  if (history.length > 0) {
97
- console.log(chalk.bold.cyan('Recent Sync Events'));
98
+ console.log(chalk.bold.cyan(t('sync.recent.events')));
98
99
  console.log(chalk.gray('─'.repeat(60)));
99
100
 
100
101
  for (const event of history.reverse()) {
@@ -107,7 +108,7 @@ async function syncStatus() {
107
108
  }
108
109
 
109
110
  } catch (error) {
110
- console.error(chalk.red('\nāœ— Failed to get sync status:'), error.message);
111
+ console.error(chalk.red(`\nāœ— ${t('sync.status.failed')}`), error.message);
111
112
  throw error;
112
113
  } finally {
113
114
  syncEngine.stop();
@@ -124,21 +125,21 @@ async function viewQueue() {
124
125
  await syncEngine.initialize();
125
126
 
126
127
  const status = syncEngine.getStatus();
127
-
128
+
128
129
  if (status.queuedChanges === 0) {
129
- console.log(chalk.gray('\nNo pending changes in queue.\n'));
130
+ console.log(chalk.gray(`\n${t('sync.queue.no.pending')}\n`));
130
131
  return;
131
132
  }
132
-
133
- console.log(chalk.cyan(`\nšŸ“‹ Offline Queue (${status.queuedChanges} changes)\n`));
134
-
133
+
134
+ console.log(chalk.cyan(`\nšŸ“‹ ${t('sync.queue.title', { count: status.queuedChanges })}\n`));
135
+
135
136
  // Create table
136
137
  const table = new Table({
137
138
  head: [
138
- chalk.cyan('#'),
139
- chalk.cyan('Type'),
140
- chalk.cyan('Requirement'),
141
- chalk.cyan('Timestamp')
139
+ chalk.cyan(t('sync.queue.header.number')),
140
+ chalk.cyan(t('sync.queue.header.type')),
141
+ chalk.cyan(t('sync.queue.header.requirement')),
142
+ chalk.cyan(t('sync.queue.header.timestamp'))
142
143
  ],
143
144
  colWidths: [5, 15, 40, 20]
144
145
  });
@@ -154,15 +155,15 @@ async function viewQueue() {
154
155
  });
155
156
 
156
157
  console.log(table.toString() + '\n');
157
-
158
- console.log(chalk.gray('These changes will be synced when connection is restored.\n'));
159
- console.log(chalk.white('Commands:'));
160
- console.log(chalk.gray(' vcm sync:force ') + '- Force sync now');
161
- console.log(chalk.gray(' vcm sync:now ') + '- Sync when online');
158
+
159
+ console.log(chalk.gray(`${t('sync.queue.will.sync')}\n`));
160
+ console.log(chalk.white(t('sync.queue.commands')));
161
+ console.log(chalk.gray(' vcm sync:force ') + `- ${t('sync.queue.force.now')}`);
162
+ console.log(chalk.gray(' vcm sync:now ') + `- ${t('sync.queue.sync.online')}`);
162
163
  console.log('');
163
164
 
164
165
  } catch (error) {
165
- console.error(chalk.red('\nāœ— Failed to view queue:'), error.message);
166
+ console.error(chalk.red(`\nāœ— ${t('sync.queue.view.failed')}`), error.message);
166
167
  throw error;
167
168
  } finally {
168
169
  syncEngine.stop();
@@ -176,25 +177,25 @@ async function forceSync() {
176
177
  const syncEngine = new SyncEngine();
177
178
 
178
179
  try {
179
- console.log(chalk.yellow('\n⚠ Forcing sync (ignoring offline status)...\n'));
180
-
180
+ console.log(chalk.yellow(`\n⚠ ${t('sync.force.starting')}\n`));
181
+
181
182
  await syncEngine.initialize();
182
-
183
+
183
184
  // Temporarily set online
184
185
  const wasOnline = syncEngine.isOnline;
185
186
  syncEngine.setOnlineMode(true);
186
-
187
+
187
188
  try {
188
189
  await syncEngine.sync();
189
- console.log(chalk.green('āœ“ Force sync complete!\n'));
190
+ console.log(chalk.green(`āœ“ ${t('sync.force.complete')}\n`));
190
191
  } finally {
191
192
  // Restore original online status
192
193
  syncEngine.setOnlineMode(wasOnline);
193
194
  }
194
195
 
195
196
  } catch (error) {
196
- console.error(chalk.red('\nāœ— Force sync failed:'), error.message);
197
- console.log(chalk.gray('\nThis usually means the server is unreachable.\n'));
197
+ console.error(chalk.red(`\nāœ— ${t('sync.force.failed')}`), error.message);
198
+ console.log(chalk.gray(`\n${t('sync.force.unreachable')}\n`));
198
199
  throw error;
199
200
  } finally {
200
201
  syncEngine.stop();
@@ -212,20 +213,20 @@ async function viewHistory(options = {}) {
212
213
 
213
214
  const limit = parseInt(options.limit) || 50;
214
215
  const history = syncEngine.getHistory(limit);
215
-
216
+
216
217
  if (history.length === 0) {
217
- console.log(chalk.gray('\nNo sync history available.\n'));
218
+ console.log(chalk.gray(`\n${t('sync.history.no.events')}\n`));
218
219
  return;
219
220
  }
220
-
221
- console.log(chalk.cyan(`\nšŸ“œ Sync History (last ${history.length} events)\n`));
222
-
221
+
222
+ console.log(chalk.cyan(`\nšŸ“œ ${t('sync.history.title', { count: history.length })}\n`));
223
+
223
224
  // Create table
224
225
  const table = new Table({
225
226
  head: [
226
- chalk.cyan('Time'),
227
- chalk.cyan('Type'),
228
- chalk.cyan('Details')
227
+ chalk.cyan(t('sync.history.header.time')),
228
+ chalk.cyan(t('sync.history.header.type')),
229
+ chalk.cyan(t('sync.history.header.details'))
229
230
  ],
230
231
  colWidths: [20, 20, 50]
231
232
  });
@@ -242,7 +243,7 @@ async function viewHistory(options = {}) {
242
243
  console.log(table.toString() + '\n');
243
244
 
244
245
  } catch (error) {
245
- console.error(chalk.red('\nāœ— Failed to view history:'), error.message);
246
+ console.error(chalk.red(`\nāœ— ${t('sync.history.view.failed')}`), error.message);
246
247
  throw error;
247
248
  } finally {
248
249
  syncEngine.stop();
@@ -259,13 +260,13 @@ function truncate(str, maxLength) {
259
260
  function getEventDetails(event) {
260
261
  switch (event.type) {
261
262
  case 'conflict-resolution':
262
- return `Resolved: ${event.resolution?.requirementId || 'unknown'}`;
263
+ return t('sync.event.resolved', { id: event.resolution?.requirementId || 'unknown' });
263
264
  case 'sync-complete':
264
- return `Remote: ${event.remoteChanges || 0}, Local: ${event.localChanges || 0}`;
265
+ return t('sync.event.remote.local', { remote: event.remoteChanges || 0, local: event.localChanges || 0 });
265
266
  case 'remote-change-applied':
266
- return `Applied: ${event.change?.requirementId || 'unknown'}`;
267
+ return t('sync.event.applied', { id: event.change?.requirementId || 'unknown' });
267
268
  case 'local-change-pushed':
268
- return `Pushed: ${event.change?.requirementId || 'unknown'}`;
269
+ return t('sync.event.pushed', { id: event.change?.requirementId || 'unknown' });
269
270
  default:
270
271
  return JSON.stringify(event).substring(0, 47);
271
272
  }
@@ -6,6 +6,7 @@ const path = require('path');
6
6
  const os = require('os');
7
7
  const { getProviderDefinitions, saveProviderPreferences, getDefaultProviderOrder } = require('./provider-registry');
8
8
  const { isKiroInstalled } = require('./kiro-installer');
9
+ const { t } = require('vibecodingmachine-core');
9
10
 
10
11
  const { execSync } = require('child_process');
11
12
 
@@ -151,7 +152,7 @@ async function checkFirstRun() {
151
152
  await inquirer.prompt([{
152
153
  type: 'input',
153
154
  name: 'continue',
154
- message: 'Press Enter to continue...'
155
+ message: t('interactive.press.enter.continue')
155
156
  }]);
156
157
  }
157
158
 
@@ -378,7 +379,7 @@ async function checkFirstRun() {
378
379
  await inquirer.prompt([{
379
380
  type: 'input',
380
381
  name: 'continue',
381
- message: 'Press Enter to continue...'
382
+ message: t('interactive.press.enter.continue')
382
383
  }]);
383
384
  }
384
385
 
@@ -395,7 +396,7 @@ async function checkFirstRun() {
395
396
  }
396
397
  ));
397
398
 
398
- console.log(chalk.cyan('Press any key to continue to the main menu...'));
399
+ console.log(chalk.cyan(t('interactive.press.any.key.menu')));
399
400
 
400
401
  await new Promise((resolve) => {
401
402
  process.stdin.setRawMode(true);