natureco-cli 5.53.0 → 5.54.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "5.53.0",
3
+ "version": "5.54.0",
4
4
  "description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
5
5
  "bin": {
6
6
  "natureco": "bin/natureco.js"
@@ -1,11 +1,15 @@
1
1
  const inquirer = require('../utils/inquirer-wrapper');
2
2
  const chalk = require('chalk');
3
3
  const acc = require('../utils/natureco-account');
4
+ const { getLang } = require('../utils/i18n');
5
+
6
+ const L = (tr, en) => (getLang() === 'en' ? en : tr);
4
7
 
5
8
  /**
6
- * `natureco account [login|logout|whoami]` — tek NatureCo hesabı (SSO).
7
- * developers.natureco.me API-KEY girişinden (`natureco login`) AYRIDIR:
8
- * bu, natureco.me hesabınla kişi kimliği; ekosistem geneli paylaşılır.
9
+ * `natureco account [login|logout|whoami]` — one NatureCo account (SSO).
10
+ * Separate from the developers.natureco.me API-KEY login (`natureco login`):
11
+ * this is your personal identity with your natureco.me account, shared
12
+ * across the whole ecosystem.
9
13
  */
10
14
  async function account(action) {
11
15
  const sub = (action || 'whoami').toLowerCase();
@@ -20,42 +24,42 @@ async function doLogin() {
20
24
  console.log(chalk.green.bold(' (•ᴥ•)'));
21
25
  console.log(chalk.green(' />🌿'));
22
26
  console.log('');
23
- console.log(chalk.green.bold(' NatureCo Hesabı — Giriş'));
24
- console.log(chalk.gray(' natureco.me hesabınla ekosistemin her yerinde tek kimlik.\n'));
27
+ console.log(chalk.green.bold(' ' + L('NatureCo Hesabı — Giriş', 'NatureCo Account — Sign in')));
28
+ console.log(chalk.gray(' ' + L('natureco.me hesabınla ekosistemin her yerinde tek kimlik.', 'One identity across the whole ecosystem with your natureco.me account.') + '\n'));
25
29
  console.log(chalk.gray(' ' + '─'.repeat(48)) + '\n');
26
30
 
27
31
  const { email } = await inquirer.prompt([{
28
32
  type: 'input',
29
33
  name: 'email',
30
- message: ' E-posta:',
31
- validate: (v) => (/.+@.+\..+/.test((v || '').trim()) ? true : 'Geçerli bir e-posta gir'),
34
+ message: L(' E-posta:', ' Email:'),
35
+ validate: (v) => (/.+@.+\..+/.test((v || '').trim()) ? true : L('Geçerli bir e-posta gir', 'Enter a valid email')),
32
36
  }]);
33
37
 
34
38
  const { method } = await inquirer.prompt([{
35
39
  type: 'list',
36
40
  name: 'method',
37
- message: ' Giriş yöntemi:',
41
+ message: L(' Giriş yöntemi:', ' Sign-in method:'),
38
42
  choices: [
39
- { name: 'Şifre', value: 'password' },
40
- { name: 'E-postama kod gönder (OTP)', value: 'otp' },
43
+ { name: L('Şifre', 'Password'), value: 'password' },
44
+ { name: L('E-postama kod gönder (OTP)', 'Email me a code (OTP)'), value: 'otp' },
41
45
  ],
42
46
  }]);
43
47
 
44
48
  try {
45
49
  if (method === 'password') {
46
- const { password } = await inquirer.prompt([{ type: 'password', name: 'password', message: ' Şifre:', mask: '*' }]);
47
- console.log(chalk.gray('\n Doğrulanıyor...'));
50
+ const { password } = await inquirer.prompt([{ type: 'password', name: 'password', message: L(' Şifre:', ' Password:'), mask: '*' }]);
51
+ console.log(chalk.gray('\n ' + L('Doğrulanıyor...', 'Verifying...')));
48
52
  await acc.loginWithPassword(email.trim(), password);
49
53
  } else {
50
- console.log(chalk.gray('\n Gönderiliyor...'));
54
+ console.log(chalk.gray('\n ' + L('Gönderiliyor...', 'Sending...')));
51
55
  await acc.sendOtp(email.trim());
52
- console.log(chalk.gray(' ') + chalk.cyan(email.trim()) + chalk.gray(' adresine e-posta gönderildi.'));
53
- console.log(chalk.gray(' 6 haneli kod geldiyse kodu, giriş linki geldiyse linki yapıştır.'));
56
+ console.log(chalk.gray(' ') + chalk.cyan(email.trim()) + chalk.gray(L(' adresine e-posta gönderildi.', ' — email sent.')));
57
+ console.log(chalk.gray(' ' + L('6 haneli kod geldiyse kodu, giriş linki geldiyse linki yapıştır.', 'Paste the 6-digit code, or the login link if you got one.')));
54
58
  const { token } = await inquirer.prompt([{
55
- type: 'input', name: 'token', message: ' Kod veya giriş linki:',
56
- validate: (v) => ((v || '').trim().length >= 6 ? true : 'Kodu ya da linki gir'),
59
+ type: 'input', name: 'token', message: L(' Kod veya giriş linki:', ' Code or login link:'),
60
+ validate: (v) => ((v || '').trim().length >= 6 ? true : L('Kodu ya da linki gir', 'Enter the code or link')),
57
61
  }]);
58
- console.log(chalk.gray('\n Doğrulanıyor...'));
62
+ console.log(chalk.gray('\n ' + L('Doğrulanıyor...', 'Verifying...')));
59
63
  const val = token.trim();
60
64
  if (/^https?:\/\//i.test(val) || val.includes('token')) {
61
65
  await acc.verifyLink(val);
@@ -64,41 +68,41 @@ async function doLogin() {
64
68
  }
65
69
  }
66
70
  } catch (err) {
67
- console.log(chalk.red(`\n ❌ ${err.message || 'Giriş başarısız'}\n`));
71
+ console.log(chalk.red(`\n ❌ ${err.message || L('Giriş başarısız', 'Sign-in failed')}\n`));
68
72
  process.exit(1);
69
73
  }
70
74
 
71
75
  const me = await acc.whoami();
72
- console.log(chalk.green('\n ✓ Giriş başarılı!'));
73
- if (me && me.email) console.log(chalk.gray(' Hoş geldin, ') + chalk.white(me.email));
74
- console.log(chalk.gray(' Oturum: ~/.natureco/auth.json'));
76
+ console.log(chalk.green('\n ✓ ' + L('Giriş başarılı!', 'Signed in!')));
77
+ if (me && me.email) console.log(chalk.gray(' ' + L('Hoş geldin, ', 'Welcome, ')) + chalk.white(me.email));
78
+ console.log(chalk.gray(' ' + L('Oturum: ', 'Session: ') + '~/.natureco/auth.json'));
75
79
  console.log('');
76
80
  }
77
81
 
78
82
  async function doLogout() {
79
83
  if (!acc.isLoggedIn()) {
80
- console.log(chalk.gray('\n Zaten giriş yapılmamış.\n'));
84
+ console.log(chalk.gray('\n ' + L('Zaten giriş yapılmamış.', 'Not signed in.') + '\n'));
81
85
  return;
82
86
  }
83
87
  const who = acc.currentEmail();
84
88
  acc.logout();
85
- console.log(chalk.green(`\n ✓ Çıkış yapıldı${who ? ' (' + who + ')' : ''}.\n`));
89
+ console.log(chalk.green('\n ✓ ' + L('Çıkış yapıldı', 'Signed out') + `${who ? ' (' + who + ')' : ''}.\n`));
86
90
  }
87
91
 
88
92
  async function doWhoami() {
89
93
  if (!acc.isLoggedIn()) {
90
- console.log(chalk.gray('\n NatureCo hesabına giriş yapılmamış.'));
91
- console.log(chalk.gray(' Giriş: ') + chalk.cyan('natureco account login') + '\n');
94
+ console.log(chalk.gray('\n ' + L('NatureCo hesabına giriş yapılmamış.', 'Not signed in to a NatureCo account.')));
95
+ console.log(chalk.gray(' ' + L('Giriş: ', 'Sign in: ')) + chalk.cyan('natureco account login') + '\n');
92
96
  return;
93
97
  }
94
- console.log(chalk.gray('\n Doğrulanıyor...'));
98
+ console.log(chalk.gray('\n ' + L('Doğrulanıyor...', 'Verifying...')));
95
99
  const me = await acc.whoami();
96
100
  if (!me) {
97
- console.log(chalk.yellow('\n ⚠ Oturum süresi dolmuş görünüyor. Tekrar giriş yap: ') + chalk.cyan('natureco account login') + '\n');
101
+ console.log(chalk.yellow('\n ⚠ ' + L('Oturum süresi dolmuş görünüyor. Tekrar giriş yap: ', 'Your session looks expired. Sign in again: ')) + chalk.cyan('natureco account login') + '\n');
98
102
  return;
99
103
  }
100
- console.log(chalk.green.bold('\n ⬡ NatureCo Hesabı'));
101
- console.log(chalk.gray(' E-posta: ') + chalk.white(me.email || '-'));
104
+ console.log(chalk.green.bold('\n ⬡ ' + L('NatureCo Hesabı', 'NatureCo Account')));
105
+ console.log(chalk.gray(' ' + L('E-posta: ', 'Email: ')) + chalk.white(me.email || '-'));
102
106
  console.log(chalk.gray(' ID: ') + chalk.gray(me.id || '-'));
103
107
  console.log('');
104
108
  }
@@ -1,4 +1,6 @@
1
- const chalk = require('chalk');
1
+ const chalk = require('chalk');
2
+ const { getLang: _getLang } = require('../utils/i18n');
3
+ const L = (tr, en) => (_getLang() === 'en' ? en : tr);
2
4
  const { getApiKey, getConfig } = require('../utils/config');
3
5
  const { getBots, sendMessage } = require('../utils/api');
4
6
  const { getSkillPrompts } = require('../utils/skills');
@@ -9,7 +11,7 @@ async function ask(question, options = {}) {
9
11
  const apiKey = getApiKey();
10
12
 
11
13
  if (!apiKey) {
12
- console.log(chalk.red('\n❌ Giriş yapılmamış. Önce "natureco login" çalıştırın.\n'));
14
+ console.log(chalk.red(L('\n❌ Giriş yapılmamış. Önce "natureco login" çalıştırın.\n', '\n❌ Not signed in. Run "natureco login" first.\n')));
13
15
  process.exit(1);
14
16
  }
15
17
 
@@ -26,7 +28,7 @@ async function ask(question, options = {}) {
26
28
  }
27
29
 
28
30
  if (!defaultBotId) {
29
- console.log(chalk.red('\n❌ Hiç bot bulunamadı. "natureco chat" ile yerel sağlayıcıyı kullanabilir ya da bir bot oluşturabilirsiniz.\n'));
31
+ console.log(chalk.red(L('\n❌ Hiç bot bulunamadı. "natureco chat" ile yerel sağlayıcıyı kullanabilir ya da bir bot oluşturabilirsiniz.\n', '\n❌ No bots found. Use "natureco chat" for the local provider, or create a bot.\n')));
30
32
  process.exit(1);
31
33
  }
32
34
 
@@ -5,7 +5,9 @@ const readline = require('readline');
5
5
  const inquirer = require('../utils/inquirer-wrapper');
6
6
  const TB = require('../utils/token-budget');
7
7
  const tui = require('../utils/tui');
8
- const chalk = require('chalk');
8
+ const chalk = require('chalk');
9
+ const { getLang: _getLang } = require('../utils/i18n');
10
+ const L = (tr, en) => (_getLang() === 'en' ? en : tr);
9
11
  const { getApiKey, getConfig } = require('../utils/config');
10
12
  const repl = require('./repl');
11
13
  const { getSkillPrompts, getSkills } = require('../utils/skills');
@@ -273,7 +275,7 @@ async function chat(botName, options = {}) {
273
275
  session = createSession(bot.id, bot.name);
274
276
  console.log(chalk.green(`Bot değişti: ${newBot.name}`));
275
277
  } else {
276
- console.log(chalk.red(`Bot bulunamadı: ${newName}`));
278
+ console.log(chalk.red(`${L('Bot bulunamadı', 'Bot not found')}: ${newName}`));
277
279
  }
278
280
  }
279
281
  console.log();
@@ -300,7 +302,7 @@ async function chat(botName, options = {}) {
300
302
  console.log();
301
303
  return;
302
304
  case 'help':
303
- console.log(chalk.yellow('Chat Komutları:'));
305
+ console.log(chalk.yellow(L('Chat Komutları:', 'Chat commands:')));
304
306
  [
305
307
  ['/clear', 'Ekranı temizle'],
306
308
  ['/bot [ad]', 'Bot değiştir'],
@@ -1,226 +1,230 @@
1
- /**
2
- * natureco help — Modern TUI help screen (v4.6+)
3
- *
4
- * Kategorize edilmiş komut listesi, TUI box + table kullanır.
5
- * v2.23 ASCII art yerine modern TUI engine.
6
- */
7
-
8
- const chalk = require('chalk');
9
- const tui = require('../utils/tui');
10
- const { getConfig } = require('../utils/config');
11
-
12
- function help() {
13
- const config = getConfig() || {};
14
- const version = require('../../package.json').version;
15
- const width = 64;
16
-
17
- console.log('');
18
-
19
- // Header — TUI box
20
- const headerLines = [
21
- tui.styled(' ╭' + '─'.repeat(width) + '╮', { color: tui.PALETTE.primary }),
22
- tui.styled(' │', { color: tui.PALETTE.primary }) + ' 🌿 ' + tui.styled('NatureCo CLI', { color: tui.PALETTE.primary, bold: true }) + tui.C.muted(' v' + version) + ' ' + tui.C.muted('Terminal-native AI agent') + tui.styled(' │', { color: tui.PALETTE.primary }),
23
- tui.styled(' ╰' + '─'.repeat(width) + '╯', { color: tui.PALETTE.primary }),
24
- ];
25
- console.log(headerLines.join('\n'));
26
-
27
- const sections = [
28
- {
29
- icon: '⚙️ ',
30
- title: 'Kurulum & Giriş',
31
- rows: [
32
- { name: 'natureco setup', desc: 'İlk kurulum sihirbazı (provider, bot)' },
33
- { name: 'natureco login', desc: 'API key ile giriş yap' },
34
- { name: 'natureco account', desc: 'NatureCo hesabı / SSO (login|logout|whoami)' },
35
- { name: 'natureco logout', desc: 'Çıkış yap' },
36
- { name: 'natureco update', desc: 'Yeni versiyon kontrolü' },
37
- { name: 'natureco doctor', desc: 'Sistem sağlığı kontrolü (10 check)' },
38
- { name: 'natureco status', desc: 'Sistem durumu (TUI kart)' },
39
- ],
40
- },
41
- {
42
- icon: '💬',
43
- title: 'Chat & Agent',
44
- rows: [
45
- { name: 'natureco chat', desc: 'Sohbet başlat (→ REPL engine)' },
46
- { name: 'natureco chat <bot>', desc: 'Belirli bot ile sohbet' },
47
- { name: 'natureco chat --resume', desc: 'Son oturuma dön' },
48
- { name: 'natureco repl', desc: 'İnteraktif REPL (persistent memory)' },
49
- { name: 'natureco repl --resume <id>', desc: 'Önceki oturumu yükle' },
50
- { name: 'natureco ask "<soru>"', desc: 'Tek seferlik soru' },
51
- { name: 'natureco code <file>', desc: 'Code agent (Claude Code alternatifi)' },
52
- { name: 'natureco run <script.md>', desc: 'Markdown script çalıştır' },
53
- { name: 'natureco bots', desc: 'Bot listesi' },
54
- { name: 'natureco team list', desc: 'Multi-agent tipleri (8 uzman)' },
55
- { name: 'natureco team spawn <type> <task>', desc: 'Sub-agent çalıştır' },
56
- ],
57
- },
58
- {
59
- icon: '🛡️ ',
60
- title: 'Güvenlik & Gözlem',
61
- rows: [
62
- { name: 'natureco audit today', desc: "Bugünkü loglar" },
63
- { name: 'natureco audit stats', desc: '24 saat istatistik' },
64
- { name: 'natureco audit files', desc: 'Log dosyaları' },
65
- { name: 'natureco audit search <q>', desc: 'Log ara' },
66
- { name: 'natureco security audit', desc: 'Güvenlik denetimi' },
67
- { name: 'natureco doctor check <name>', desc: 'Tek sağlık check' },
68
- ],
69
- },
70
- {
71
- icon: '💰',
72
- title: 'Maliyet',
73
- rows: [
74
- { name: 'natureco cost today', desc: 'Bugünkü maliyet' },
75
- { name: 'natureco cost week', desc: 'Bu hafta' },
76
- { name: 'natureco cost month', desc: 'Bu ay' },
77
- { name: 'natureco cost budget', desc: 'Bütçe durumu' },
78
- { name: 'natureco cost prices', desc: 'Model fiyatları (21+ model)' },
79
- { name: 'natureco cost model "<prompt>"', desc: 'Model önerisi (router)' },
80
- ],
81
- },
82
- {
83
- icon: '🌐',
84
- title: 'Entegrasyonlar (10 kanal)',
85
- rows: [
86
- { name: 'natureco telegram connect', desc: 'Telegram bot bağla' },
87
- { name: 'natureco whatsapp connect', desc: 'WhatsApp QR ile bağla' },
88
- { name: 'natureco discord connect', desc: 'Discord bot bağla' },
89
- { name: 'natureco slack connect', desc: 'Slack workspace bağla' },
90
- { name: 'natureco signal connect', desc: 'Signal REST API' },
91
- { name: 'natureco irc connect', desc: 'IRC sunucusu' },
92
- { name: 'natureco mattermost connect', desc: 'Mattermost bot' },
93
- { name: 'natureco imessage connect', desc: 'iMessage bridge' },
94
- { name: 'natureco sms connect', desc: 'Twilio SMS' },
95
- { name: 'natureco webhooks connect', desc: 'Webhook ekle' },
96
- ],
97
- },
98
- {
99
- icon: '🌿',
100
- title: 'NatureCo Native',
101
- rows: [
102
- { name: 'natureco naturehub post "<text>"', desc: 'NatureCo API ile bota mesaj gönder' },
103
- { name: 'natureco naturehub list', desc: 'Botlarını listele' },
104
- { name: 'natureco naturehub info [bot_id]', desc: 'Bot detayı' },
105
- { name: 'natureco medium draft <file.md>', desc: 'Medium makale taslağı' },
106
- { name: 'natureco medium publish <file.md>', desc: 'Medium\'da yayınla' },
107
- { name: 'natureco seo audit <url>', desc: 'SEO denetimi (skor 0-100)' },
108
- { name: 'natureco xp', desc: 'XP/Level durumu' },
109
- { name: 'natureco xp rewards', desc: 'Ödül listesi' },
110
- ],
111
- },
112
- {
113
- icon: '📊',
114
- title: 'Skill & MCP',
115
- rows: [
116
- { name: 'natureco skills list', desc: 'Yüklü skill\'ler' },
117
- { name: 'natureco skills suggest', desc: 'Self-evolving öneriler' },
118
- { name: 'natureco skills accept <id>', desc: 'Öneriyi kabul et' },
119
- { name: 'natureco skills reject <id>', desc: 'Öneriyi reddet' },
120
- { name: 'natureco skills install <slug>', desc: 'NatureHub\'dan yükle' },
121
- { name: 'natureco mcp list', desc: 'MCP sunucuları' },
122
- { name: 'natureco mcp add <name>', desc: 'MCP sunucusu ekle' },
123
- ],
124
- },
125
- {
126
- icon: '',
127
- title: 'Otomasyon & Dashboard',
128
- rows: [
129
- { name: 'natureco cron list', desc: 'Cron görevleri' },
130
- { name: 'natureco cron add', desc: 'Cron ekle' },
131
- { name: 'natureco hooks create <tip>', desc: 'Hook oluştur' },
132
- { name: 'natureco dashboard', desc: 'Web dashboard (port 7421)' },
133
- { name: 'natureco gateway start', desc: 'Gateway arka plan' },
134
- ],
135
- },
136
- {
137
- icon: '⚙️ ',
138
- title: 'Yapılandırma',
139
- rows: [
140
- { name: 'natureco config list', desc: 'Tüm ayarlar' },
141
- { name: 'natureco config set <key> <val>', desc: 'Ayar değiştir' },
142
- { name: 'natureco configure', desc: 'İnteraktif yapılandırma' },
143
- { name: 'natureco sessions list', desc: 'Geçmiş oturumlar' },
144
- { name: 'natureco sessions show <id>', desc: 'Oturum detayı' },
145
- { name: 'natureco memory', desc: 'Memory yönetimi' },
146
- { name: 'natureco init', desc: 'Proje başlat (.natureco/)' },
147
- ],
148
- },
149
- {
150
- icon: '🛠️ ',
151
- title: 'Diğer',
152
- rows: [
153
- { name: 'natureco agents list', desc: 'Agent listesi' },
154
- { name: 'natureco models list', desc: 'Model listesi' },
155
- { name: 'natureco channels', desc: 'Bağlı kanallar' },
156
- { name: 'natureco logs', desc: 'Gateway logları' },
157
- { name: 'natureco tasks list', desc: 'Arka plan görevleri' },
158
- { name: 'natureco nodes', desc: 'Network nodes' },
159
- { name: 'natureco security', desc: 'Güvenlik denetimi' },
160
- { name: 'natureco reset', desc: 'Sıfırla' },
161
- { name: 'natureco uninstall', desc: 'Kaldır' },
162
- ],
163
- },
164
- {
165
- icon: '💬',
166
- title: 'REPL İçi Komutlar (chat/repl)',
167
- rows: [
168
- { name: '/help', desc: 'Yardım' },
169
- { name: '/clear', desc: 'Ekranı temizle' },
170
- { name: '/memory', desc: 'Memory\'i göster' },
171
- { name: '/forget', desc: 'Memory\'i sil' },
172
- { name: '/sessions', desc: 'Geçmiş oturumlar' },
173
- { name: '/resume [id|last]', desc: 'Önceki oturuma dön' },
174
- { name: '/system <text>', desc: 'System prompt' },
175
- { name: '/model <name>', desc: 'Model değiştir' },
176
- { name: '/identity [ad]', desc: 'Bot adı değiştir' },
177
- { name: '/tokens', desc: 'Token kullanımı' },
178
- { name: '/doctor, /cost, /audit, /team, /xp', desc: 'REPL içinden TUI komutlar' },
179
- { name: '/save, /exit, /quit', desc: 'Kaydet / Çıkış' },
180
- ],
181
- },
182
- ];
183
-
184
- for (const section of sections) {
185
- console.log('\n' + tui.styled(` ${section.icon} ${section.title}`, { color: tui.PALETTE.secondary, bold: true }));
186
- console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
187
- console.log('\n' + tui.table(section.rows, [
188
- { key: 'name', label: 'Komut', minWidth: 36, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
189
- { key: 'desc', label: 'Açıklama', minWidth: 35, render: r => tui.C.muted(r.desc) },
190
- ], { borderStyle: 'round', zebra: false }));
191
- }
192
-
193
- // Mevcut config (varsa)
194
- if (config.providerUrl || config.botName) {
195
- console.log('\n' + tui.styled(' ⚙️ Mevcut Yapılandırma', { color: tui.PALETTE.accent, bold: true }));
196
- console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
197
- const cardW = 54;
198
- const cardLines = [
199
- tui.styled(' ' + ''.repeat(cardW) + '╮', { color: tui.PALETTE.border }),
200
- ];
201
- if (config.providerUrl) {
202
- const provider = config.providerUrl.replace('https?:\/\/', '').split('/')[0];
203
- cardLines.push(tui.styled(' ', { color: tui.PALETTE.border }) + tui.C.muted('Provider ') + tui.styled(provider.padEnd(38), { color: tui.PALETTE.text, bold: true }) + tui.styled('', { color: tui.PALETTE.border }));
204
- }
205
- if (config.providerModel) {
206
- cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Model ') + tui.styled((config.providerModel || '').padEnd(38), { color: tui.PALETTE.primary, bold: true }) + tui.styled('', { color: tui.PALETTE.border }));
207
- }
208
- if (config.botName) {
209
- cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Bot ') + tui.styled((config.botName || '—').padEnd(38), { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
210
- }
211
- if (config.userName) {
212
- cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Kullanıcı ') + tui.styled((config.userName || '—').padEnd(38), { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
213
- }
214
- cardLines.push(tui.styled(' ╰' + '─'.repeat(cardW) + '╯', { color: tui.PALETTE.border }));
215
- console.log(cardLines.join('\n'));
216
- }
217
-
218
- // Linkler
219
- console.log('\n' + tui.styled(' 🔗 Kaynaklar', { color: tui.PALETTE.secondary, bold: true }));
220
- console.log(' ' + tui.C.muted('Döküman ') + tui.C.brand('https://natureco.me/cli'));
221
- console.log(' ' + tui.C.muted('SDK ') + tui.C.brand('https://natureco.me/developer'));
222
- console.log(' ' + tui.C.muted('npm ') + tui.C.brand('https://npmjs.com/package/natureco-cli'));
223
- console.log('');
224
- }
225
-
226
- module.exports = help;
1
+ /**
2
+ * natureco help — Modern TUI help screen (v4.6+)
3
+ *
4
+ * Categorized command list; uses the TUI box + table engine.
5
+ * Bilingual (tr|en) via the i18n `L(tr, en)` helper.
6
+ */
7
+
8
+ const chalk = require('chalk');
9
+ const tui = require('../utils/tui');
10
+ const { getConfig } = require('../utils/config');
11
+ const { getLang } = require('../utils/i18n');
12
+
13
+ const L = (tr, en) => (getLang() === 'en' ? en : tr);
14
+
15
+ function help() {
16
+ const config = getConfig() || {};
17
+ const version = require('../../package.json').version;
18
+ const width = 64;
19
+
20
+ console.log('');
21
+
22
+ // Header TUI box
23
+ const headerLines = [
24
+ tui.styled(' ╭' + '─'.repeat(width) + '╮', { color: tui.PALETTE.primary }),
25
+ tui.styled(' │', { color: tui.PALETTE.primary }) + ' 🌿 ' + tui.styled('NatureCo CLI', { color: tui.PALETTE.primary, bold: true }) + tui.C.muted(' v' + version) + ' ' + tui.C.muted('Terminal-native AI agent') + tui.styled(' │', { color: tui.PALETTE.primary }),
26
+ tui.styled(' ╰' + '─'.repeat(width) + '╯', { color: tui.PALETTE.primary }),
27
+ ];
28
+ console.log(headerLines.join('\n'));
29
+
30
+ const sections = [
31
+ {
32
+ icon: '⚙️ ',
33
+ title: L('Kurulum & Giriş', 'Setup & Sign-in'),
34
+ rows: [
35
+ { name: 'natureco setup', desc: L('İlk kurulum sihirbazı (provider, bot)', 'First-run wizard (provider, bot)') },
36
+ { name: 'natureco login', desc: L('API key ile giriş yap', 'Sign in with an API key') },
37
+ { name: 'natureco account', desc: L('NatureCo hesabı / SSO (login|logout|whoami)', 'NatureCo account / SSO (login|logout|whoami)') },
38
+ { name: 'natureco lang', desc: L('Arayüz dili (tr | en)', 'Interface language (tr | en)') },
39
+ { name: 'natureco logout', desc: L('Çıkış yap', 'Sign out') },
40
+ { name: 'natureco update', desc: L('Yeni versiyon kontrolü', 'Check for a new version') },
41
+ { name: 'natureco doctor', desc: L('Sistem sağlığı kontrolü (10 check)', 'System health check (10 checks)') },
42
+ { name: 'natureco status', desc: L('Sistem durumu (TUI kart)', 'System status (TUI card)') },
43
+ ],
44
+ },
45
+ {
46
+ icon: '💬',
47
+ title: 'Chat & Agent',
48
+ rows: [
49
+ { name: 'natureco chat', desc: L('Sohbet başlat (→ REPL engine)', 'Start a chat (→ REPL engine)') },
50
+ { name: 'natureco chat <bot>', desc: L('Belirli bot ile sohbet', 'Chat with a specific bot') },
51
+ { name: 'natureco chat --resume', desc: L('Son oturuma dön', 'Resume the last session') },
52
+ { name: 'natureco repl', desc: L('İnteraktif REPL (persistent memory)', 'Interactive REPL (persistent memory)') },
53
+ { name: 'natureco repl --resume <id>', desc: L('Önceki oturumu yükle', 'Load a previous session') },
54
+ { name: 'natureco ask "<soru>"', desc: L('Tek seferlik soru', 'One-off question') },
55
+ { name: 'natureco code <file>', desc: L('Code agent (Claude Code alternatifi)', 'Code agent (Claude Code alternative)') },
56
+ { name: 'natureco run <script.md>', desc: L('Markdown script çalıştır', 'Run a Markdown script') },
57
+ { name: 'natureco bots', desc: L('Bot listesi', 'List bots') },
58
+ { name: 'natureco team list', desc: L('Multi-agent tipleri (8 uzman)', 'Multi-agent types (8 specialists)') },
59
+ { name: 'natureco team spawn <type> <task>', desc: L('Sub-agent çalıştır', 'Run a sub-agent') },
60
+ ],
61
+ },
62
+ {
63
+ icon: '🛡️ ',
64
+ title: L('Güvenlik & Gözlem', 'Security & Observability'),
65
+ rows: [
66
+ { name: 'natureco audit today', desc: L('Bugünkü loglar', "Today's logs") },
67
+ { name: 'natureco audit stats', desc: L('24 saat istatistik', '24-hour statistics') },
68
+ { name: 'natureco audit files', desc: L('Log dosyaları', 'Log files') },
69
+ { name: 'natureco audit search <q>', desc: L('Log ara', 'Search logs') },
70
+ { name: 'natureco security audit', desc: L('Güvenlik denetimi', 'Security audit') },
71
+ { name: 'natureco doctor check <name>', desc: L('Tek sağlık check', 'Single health check') },
72
+ ],
73
+ },
74
+ {
75
+ icon: '💰',
76
+ title: L('Maliyet', 'Cost'),
77
+ rows: [
78
+ { name: 'natureco cost today', desc: L('Bugünkü maliyet', "Today's cost") },
79
+ { name: 'natureco cost week', desc: L('Bu hafta', 'This week') },
80
+ { name: 'natureco cost month', desc: L('Bu ay', 'This month') },
81
+ { name: 'natureco cost budget', desc: L('Bütçe durumu', 'Budget status') },
82
+ { name: 'natureco cost prices', desc: L('Model fiyatları (21+ model)', 'Model prices (21+ models)') },
83
+ { name: 'natureco cost model "<prompt>"', desc: L('Model önerisi (router)', 'Model recommendation (router)') },
84
+ ],
85
+ },
86
+ {
87
+ icon: '🌐',
88
+ title: L('Entegrasyonlar (10 kanal)', 'Integrations (10 channels)'),
89
+ rows: [
90
+ { name: 'natureco telegram connect', desc: L('Telegram bot bağla', 'Connect a Telegram bot') },
91
+ { name: 'natureco whatsapp connect', desc: L('WhatsApp QR ile bağla', 'Connect WhatsApp via QR') },
92
+ { name: 'natureco discord connect', desc: L('Discord bot bağla', 'Connect a Discord bot') },
93
+ { name: 'natureco slack connect', desc: L('Slack workspace bağla', 'Connect a Slack workspace') },
94
+ { name: 'natureco signal connect', desc: L('Signal REST API', 'Signal REST API') },
95
+ { name: 'natureco irc connect', desc: L('IRC sunucusu', 'IRC server') },
96
+ { name: 'natureco mattermost connect', desc: L('Mattermost bot', 'Mattermost bot') },
97
+ { name: 'natureco imessage connect', desc: L('iMessage bridge', 'iMessage bridge') },
98
+ { name: 'natureco sms connect', desc: L('Twilio SMS', 'Twilio SMS') },
99
+ { name: 'natureco webhooks connect', desc: L('Webhook ekle', 'Add a webhook') },
100
+ ],
101
+ },
102
+ {
103
+ icon: '🌿',
104
+ title: 'NatureCo Native',
105
+ rows: [
106
+ { name: 'natureco naturehub post "<text>"', desc: L('NatureCo API ile bota mesaj gönder', 'Send a message to a bot via the NatureCo API') },
107
+ { name: 'natureco naturehub list', desc: L('Botlarını listele', 'List your bots') },
108
+ { name: 'natureco naturehub info [bot_id]', desc: L('Bot detayı', 'Bot details') },
109
+ { name: 'natureco medium draft <file.md>', desc: L('Medium makale taslağı', 'Medium article draft') },
110
+ { name: 'natureco medium publish <file.md>', desc: L("Medium'da yayınla", 'Publish to Medium') },
111
+ { name: 'natureco seo audit <url>', desc: L('SEO denetimi (skor 0-100)', 'SEO audit (score 0-100)') },
112
+ { name: 'natureco xp', desc: L('XP/Level durumu', 'XP / level status') },
113
+ { name: 'natureco xp rewards', desc: L('Ödül listesi', 'Rewards list') },
114
+ ],
115
+ },
116
+ {
117
+ icon: '📊',
118
+ title: 'Skill & MCP',
119
+ rows: [
120
+ { name: 'natureco skills list', desc: L("Yüklü skill'ler", 'Installed skills') },
121
+ { name: 'natureco skills suggest', desc: L('Self-evolving öneriler', 'Self-evolving suggestions') },
122
+ { name: 'natureco skills accept <id>', desc: L('Öneriyi kabul et', 'Accept a suggestion') },
123
+ { name: 'natureco skills reject <id>', desc: L('Öneriyi reddet', 'Reject a suggestion') },
124
+ { name: 'natureco skills install <slug>', desc: L("NatureHub'dan yükle", 'Install from NatureHub') },
125
+ { name: 'natureco mcp list', desc: L('MCP sunucuları', 'MCP servers') },
126
+ { name: 'natureco mcp add <name>', desc: L('MCP sunucusu ekle', 'Add an MCP server') },
127
+ ],
128
+ },
129
+ {
130
+ icon: '',
131
+ title: L('Otomasyon & Dashboard', 'Automation & Dashboard'),
132
+ rows: [
133
+ { name: 'natureco cron list', desc: L('Cron görevleri', 'Cron jobs') },
134
+ { name: 'natureco cron add', desc: L('Cron ekle', 'Add a cron job') },
135
+ { name: 'natureco hooks create <tip>', desc: L('Hook oluştur', 'Create a hook') },
136
+ { name: 'natureco dashboard', desc: L('Web dashboard (port 7421)', 'Web dashboard (port 7421)') },
137
+ { name: 'natureco gateway start', desc: L('Gateway arka plan', 'Gateway (background)') },
138
+ ],
139
+ },
140
+ {
141
+ icon: '⚙️ ',
142
+ title: L('Yapılandırma', 'Configuration'),
143
+ rows: [
144
+ { name: 'natureco config list', desc: L('Tüm ayarlar', 'All settings') },
145
+ { name: 'natureco config set <key> <val>', desc: L('Ayar değiştir', 'Change a setting') },
146
+ { name: 'natureco configure', desc: L('İnteraktif yapılandırma', 'Interactive configuration') },
147
+ { name: 'natureco sessions list', desc: L('Geçmiş oturumlar', 'Past sessions') },
148
+ { name: 'natureco sessions show <id>', desc: L('Oturum detayı', 'Session details') },
149
+ { name: 'natureco memory', desc: L('Memory yönetimi', 'Memory management') },
150
+ { name: 'natureco init', desc: L('Proje başlat (.natureco/)', 'Initialize a project (.natureco/)') },
151
+ ],
152
+ },
153
+ {
154
+ icon: '🛠️ ',
155
+ title: L('Diğer', 'Other'),
156
+ rows: [
157
+ { name: 'natureco agents list', desc: L('Agent listesi', 'List agents') },
158
+ { name: 'natureco models list', desc: L('Model listesi', 'List models') },
159
+ { name: 'natureco channels', desc: L('Bağlı kanallar', 'Connected channels') },
160
+ { name: 'natureco logs', desc: L('Gateway logları', 'Gateway logs') },
161
+ { name: 'natureco tasks list', desc: L('Arka plan görevleri', 'Background tasks') },
162
+ { name: 'natureco nodes', desc: L('Network nodes', 'Network nodes') },
163
+ { name: 'natureco security', desc: L('Güvenlik denetimi', 'Security audit') },
164
+ { name: 'natureco reset', desc: L('Sıfırla', 'Reset') },
165
+ { name: 'natureco uninstall', desc: L('Kaldır', 'Uninstall') },
166
+ ],
167
+ },
168
+ {
169
+ icon: '💬',
170
+ title: L('REPL İçi Komutlar (chat/repl)', 'In-REPL commands (chat/repl)'),
171
+ rows: [
172
+ { name: '/help', desc: L('Yardım', 'Help') },
173
+ { name: '/clear', desc: L('Ekranı temizle', 'Clear the screen') },
174
+ { name: '/memory', desc: L("Memory'i göster", 'Show memory') },
175
+ { name: '/forget', desc: L("Memory'i sil", 'Clear memory') },
176
+ { name: '/sessions', desc: L('Geçmiş oturumlar', 'Past sessions') },
177
+ { name: '/resume [id|last]', desc: L('Önceki oturuma dön', 'Resume a previous session') },
178
+ { name: '/system <text>', desc: L('System prompt', 'System prompt') },
179
+ { name: '/model <name>', desc: L('Model değiştir', 'Switch model') },
180
+ { name: '/identity [ad]', desc: L('Bot adı değiştir', 'Rename the bot') },
181
+ { name: '/tokens', desc: L('Token kullanımı', 'Token usage') },
182
+ { name: '/doctor, /cost, /audit, /team, /xp', desc: L('REPL içinden TUI komutlar', 'TUI commands from inside the REPL') },
183
+ { name: '/save, /exit, /quit', desc: L('Kaydet / Çıkış', 'Save / Exit') },
184
+ ],
185
+ },
186
+ ];
187
+
188
+ for (const section of sections) {
189
+ console.log('\n' + tui.styled(` ${section.icon} ${section.title}`, { color: tui.PALETTE.secondary, bold: true }));
190
+ console.log(tui.styled(' ' + ''.repeat(56), { color: tui.PALETTE.border }));
191
+ console.log('\n' + tui.table(section.rows, [
192
+ { key: 'name', label: L('Komut', 'Command'), minWidth: 36, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
193
+ { key: 'desc', label: L('Açıklama', 'Description'), minWidth: 35, render: r => tui.C.muted(r.desc) },
194
+ ], { borderStyle: 'round', zebra: false }));
195
+ }
196
+
197
+ // Current config (if any)
198
+ if (config.providerUrl || config.botName) {
199
+ console.log('\n' + tui.styled(' ⚙️ ' + L('Mevcut Yapılandırma', 'Current Configuration'), { color: tui.PALETTE.accent, bold: true }));
200
+ console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
201
+ const cardW = 54;
202
+ const cardLines = [
203
+ tui.styled(' ' + ''.repeat(cardW) + '', { color: tui.PALETTE.border }),
204
+ ];
205
+ if (config.providerUrl) {
206
+ const provider = config.providerUrl.replace('https?:\/\/', '').split('/')[0];
207
+ cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Provider ') + tui.styled(provider.padEnd(38), { color: tui.PALETTE.text, bold: true }) + tui.styled(' │', { color: tui.PALETTE.border }));
208
+ }
209
+ if (config.providerModel) {
210
+ cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Model ') + tui.styled((config.providerModel || '—').padEnd(38), { color: tui.PALETTE.primary, bold: true }) + tui.styled(' │', { color: tui.PALETTE.border }));
211
+ }
212
+ if (config.botName) {
213
+ cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Bot ') + tui.styled((config.botName || '—').padEnd(38), { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
214
+ }
215
+ if (config.userName) {
216
+ cardLines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted(L('Kullanıcı ', 'User ')) + tui.styled((config.userName || '—').padEnd(38), { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
217
+ }
218
+ cardLines.push(tui.styled(' ╰' + '─'.repeat(cardW) + '╯', { color: tui.PALETTE.border }));
219
+ console.log(cardLines.join('\n'));
220
+ }
221
+
222
+ // Links
223
+ console.log('\n' + tui.styled(' 🔗 ' + L('Kaynaklar', 'Resources'), { color: tui.PALETTE.secondary, bold: true }));
224
+ console.log(' ' + tui.C.muted(L('Döküman ', 'Docs ')) + tui.C.brand('https://natureco.me/cli'));
225
+ console.log(' ' + tui.C.muted('SDK ') + tui.C.brand('https://natureco.me/developer'));
226
+ console.log(' ' + tui.C.muted('npm ') + tui.C.brand('https://npmjs.com/package/natureco-cli'));
227
+ console.log('');
228
+ }
229
+
230
+ module.exports = help;
@@ -1,55 +1,58 @@
1
- const inquirer = require('../utils/inquirer-wrapper');
2
- const chalk = require('chalk');
3
- const { saveApiKey } = require('../utils/config');
4
- const { validateApiKey } = require('../utils/api');
5
-
6
- async function login() {
7
- console.clear();
8
-
9
- console.log('');
10
- console.log(chalk.green.bold(' (\\_/)'));
11
- console.log(chalk.green.bold(' (•ᴥ•)'));
12
- console.log(chalk.green(' />🌿'));
13
- console.log('');
14
- console.log(chalk.green.bold(' NatureCo CLI — Giriş'));
15
- console.log(chalk.gray(' API key\'ini gir ve başla.\n'));
16
- console.log(chalk.gray(' ' + '─'.repeat(48)));
17
- console.log('');
18
- console.log(chalk.gray(' API key almak için: ') + chalk.cyan('developers.natureco.me'));
19
- console.log('');
20
-
21
- const { apiKey } = await inquirer.prompt([{
22
- type: 'password',
23
- name: 'apiKey',
24
- message: ' API Key:',
25
- mask: '*',
26
- validate: (v) => {
27
- if (!v.trim()) return 'API key boş olamaz';
28
- return true;
29
- },
30
- }]);
31
-
32
- console.log('');
33
- console.log(chalk.gray(' Doğrulanıyor...'));
34
-
35
- const result = await validateApiKey(apiKey.trim());
36
-
37
- if (!result.valid) {
38
- console.log(chalk.red(`\n ${result.error || 'Geçersiz API key'}\n`));
39
- process.exit(1);
40
- }
41
-
42
- if (result.user?.email) {
43
- console.log(chalk.gray(` Hoş geldin, ${chalk.white(result.user.email)}`));
44
- }
45
-
46
- saveApiKey(apiKey.trim());
47
-
48
- console.log(chalk.green('\n ✓ Giriş başarılı!'));
49
- console.log(chalk.gray(' Config: ~/.natureco/config.json'));
50
- console.log('');
51
- console.log(chalk.gray(' Başlamak için: ') + chalk.cyan('natureco chat'));
52
- console.log('');
53
- }
54
-
55
- module.exports = login;
1
+ const inquirer = require('../utils/inquirer-wrapper');
2
+ const chalk = require('chalk');
3
+ const { saveApiKey } = require('../utils/config');
4
+ const { validateApiKey } = require('../utils/api');
5
+ const { getLang } = require('../utils/i18n');
6
+
7
+ const L = (tr, en) => (getLang() === 'en' ? en : tr);
8
+
9
+ async function login() {
10
+ console.clear();
11
+
12
+ console.log('');
13
+ console.log(chalk.green.bold(' (\\_/)'));
14
+ console.log(chalk.green.bold(' (•ᴥ•)'));
15
+ console.log(chalk.green(' />🌿'));
16
+ console.log('');
17
+ console.log(chalk.green.bold(' ' + L('NatureCo CLI — Giriş', 'NatureCo CLI — Sign in')));
18
+ console.log(chalk.gray(' ' + L("API key'ini gir ve başla.", 'Enter your API key to get started.') + '\n'));
19
+ console.log(chalk.gray(' ' + '─'.repeat(48)));
20
+ console.log('');
21
+ console.log(chalk.gray(' ' + L('API key almak için: ', 'Get an API key at: ')) + chalk.cyan('developers.natureco.me'));
22
+ console.log('');
23
+
24
+ const { apiKey } = await inquirer.prompt([{
25
+ type: 'password',
26
+ name: 'apiKey',
27
+ message: ' API Key:',
28
+ mask: '*',
29
+ validate: (v) => {
30
+ if (!v.trim()) return L('API key boş olamaz', "API key can't be empty");
31
+ return true;
32
+ },
33
+ }]);
34
+
35
+ console.log('');
36
+ console.log(chalk.gray(' ' + L('Doğrulanıyor...', 'Verifying...')));
37
+
38
+ const result = await validateApiKey(apiKey.trim());
39
+
40
+ if (!result.valid) {
41
+ console.log(chalk.red(`\n ❌ ${result.error || L('Geçersiz API key', 'Invalid API key')}\n`));
42
+ process.exit(1);
43
+ }
44
+
45
+ if (result.user?.email) {
46
+ console.log(chalk.gray(` ${L('Hoş geldin,', 'Welcome,')} ${chalk.white(result.user.email)}`));
47
+ }
48
+
49
+ saveApiKey(apiKey.trim());
50
+
51
+ console.log(chalk.green('\n ' + L('Giriş başarılı!', 'Signed in!')));
52
+ console.log(chalk.gray(' Config: ~/.natureco/config.json'));
53
+ console.log('');
54
+ console.log(chalk.gray(' ' + L('Başlamak için: ', 'To get started: ')) + chalk.cyan('natureco chat'));
55
+ console.log('');
56
+ }
57
+
58
+ module.exports = login;
@@ -46,7 +46,9 @@ function extractPreferenceFacts(content) {
46
46
  }
47
47
  return out;
48
48
  }
49
- const chalk = require('chalk');
49
+ const chalk = require('chalk');
50
+ const { getLang: _getLang } = require('../utils/i18n');
51
+ const L = (tr, en) => (_getLang() === 'en' ? en : tr);
50
52
  const tui = require('../utils/tui');
51
53
  const { loadToolDefinitions, toOpenAIFormat, executeTool } = require('../utils/tools');
52
54
  const { accumulateToolCallDeltas, finalizeToolCalls } = require('../utils/streaming-tools');
@@ -1031,7 +1033,7 @@ function runCliCommand(args) {
1031
1033
  stdio: 'inherit',
1032
1034
  });
1033
1035
  proc.on('close', (code) => resolve(code));
1034
- proc.on('error', (e) => { console.log(chalk.red(' Hata: ' + e.message)); resolve(1); });
1036
+ proc.on('error', (e) => { console.log(chalk.red(L(' Hata: ', ' Error: ') + e.message)); resolve(1); });
1035
1037
  });
1036
1038
  }
1037
1039
 
@@ -1117,7 +1119,7 @@ async function startRepl(args) {
1117
1119
  messages = session.messages || [];
1118
1120
  console.log(chalk.green(`\n ✓ Oturum yüklendi: ${session.id} (${messages.length} mesaj)\n`));
1119
1121
  } else {
1120
- console.log(chalk.yellow(`\n ⚠️ Oturum bulunamadı: ${resumeId}\n`));
1122
+ console.log(chalk.yellow(`\n ⚠️ ${L('Oturum bulunamadı', 'Session not found')}: ${resumeId}\n`));
1121
1123
  }
1122
1124
  }
1123
1125
 
@@ -1440,7 +1442,7 @@ async function startRepl(args) {
1440
1442
  console.log(chalk.gray('\n Devam etmek için: /resume <id> veya /resume last\n'));
1441
1443
  break;
1442
1444
  case 'resume':
1443
- if (!arg) { console.log(chalk.yellow(' Kullanım: /resume <id> veya /resume last')); break; }
1445
+ if (!arg) { console.log(chalk.yellow(L(' Kullanım: /resume <id> veya /resume last', ' Usage: /resume <id> or /resume last'))); break; }
1444
1446
  const session = loadSession(arg);
1445
1447
  if (session) {
1446
1448
  messages = session.messages || [];
@@ -1449,11 +1451,11 @@ async function startRepl(args) {
1449
1451
  else messages.unshift({ role: 'system', content: systemPrompt, _internal: true });
1450
1452
  console.log(chalk.green(` ✓ Oturum yüklendi: ${session.id} (${messages.length} mesaj)`));
1451
1453
  } else {
1452
- console.log(chalk.yellow(` ⚠️ Oturum bulunamadı: ${arg}`));
1454
+ console.log(chalk.yellow(` ⚠️ ${L('Oturum bulunamadı', 'Session not found')}: ${arg}`));
1453
1455
  }
1454
1456
  break;
1455
1457
  case 'system':
1456
- if (!arg) { console.log(chalk.yellow(' Kullanım: /system <text>')); break; }
1458
+ if (!arg) { console.log(chalk.yellow(L(' Kullanım: /system <text>', ' Usage: /system <text>'))); break; }
1457
1459
  // Override stable tier directly (user's custom text)
1458
1460
  _cachedStable = arg;
1459
1461
  // Rebuild volatile only (context stays unchanged)
@@ -1467,7 +1469,7 @@ async function startRepl(args) {
1467
1469
  console.log(chalk.green(' ✓ System prompt güncellendi'));
1468
1470
  break;
1469
1471
  case 'model':
1470
- if (!arg) { console.log(chalk.yellow(' Kullanım: /model <name>')); break; }
1472
+ if (!arg) { console.log(chalk.yellow(L(' Kullanım: /model <name>', ' Usage: /model <name>'))); break; }
1471
1473
  model = arg;
1472
1474
  console.log(chalk.green(' ✓ Model: ') + chalk.cyan(model));
1473
1475
  break;
@@ -1508,7 +1510,7 @@ async function startRepl(args) {
1508
1510
  console.log(tui.C.yellow(' Henüz plan yok.'));
1509
1511
  }
1510
1512
  } else {
1511
- console.log(tui.C.yellow(' Kullanım: /plan on|off|show'));
1513
+ console.log(tui.C.yellow(L(' Kullanım: /plan on|off|show', ' Usage: /plan on|off|show')));
1512
1514
  }
1513
1515
  break;
1514
1516
  case 'save':
@@ -1530,7 +1532,7 @@ async function startRepl(args) {
1530
1532
  await runCliCommand(args2);
1531
1533
  }
1532
1534
  } else {
1533
- console.log(chalk.yellow(` Bilinmeyen komut: /${cmd}. /help yazın.`));
1535
+ console.log(chalk.yellow(` ${L('Bilinmeyen komut', 'Unknown command')}: /${cmd}. ${L('/help yazın.', 'type /help.')}`));
1534
1536
  }
1535
1537
  }
1536
1538
  safePrompt();
@@ -1,6 +1,8 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
- const chalk = require('chalk');
3
+ const chalk = require('chalk');
4
+ const { getLang: _getLang } = require('../utils/i18n');
5
+ const L = (tr, en) => (_getLang() === 'en' ? en : tr);
4
6
  const { getApiKey, getConfig } = require('../utils/config');
5
7
  const { sendMessage } = require('../utils/api');
6
8
  const { getSkillPrompts } = require('../utils/skills');
@@ -9,7 +11,7 @@ async function run(scriptPath) {
9
11
  const apiKey = getApiKey();
10
12
 
11
13
  if (!apiKey) {
12
- console.log(chalk.red('\n❌ Giriş yapılmamış. Önce "natureco login" çalıştırın.\n'));
14
+ console.log(chalk.red(L('\n❌ Giriş yapılmamış. Önce "natureco login" çalıştırın.\n', '\n❌ Not signed in. Run "natureco login" first.\n')));
13
15
  process.exit(1);
14
16
  }
15
17
 
@@ -17,7 +19,7 @@ async function run(scriptPath) {
17
19
  const defaultBotId = config.defaultBotId;
18
20
 
19
21
  if (!defaultBotId) {
20
- console.log(chalk.red('\n❌ Varsayılan bot ayarlanmamış. "natureco config set defaultBotId <bot-id>" ile ayarlayın.\n'));
22
+ console.log(chalk.red(L('\n❌ Varsayılan bot ayarlanmamış. "natureco config set defaultBotId <bot-id>" ile ayarlayın.\n', '\n❌ No default bot set. Set one with "natureco config set defaultBotId <bot-id>".\n')));
21
23
  process.exit(1);
22
24
  }
23
25
 
@@ -25,21 +27,21 @@ async function run(scriptPath) {
25
27
  const fullPath = path.resolve(scriptPath);
26
28
 
27
29
  if (!fs.existsSync(fullPath)) {
28
- console.log(chalk.red(`\n❌ Dosya bulunamadı: ${scriptPath}\n`));
30
+ console.log(chalk.red(`\n❌ ${L('Dosya bulunamadı', 'File not found')}: ${scriptPath}\n`));
29
31
  process.exit(1);
30
32
  }
31
33
 
32
34
  const scriptContent = fs.readFileSync(fullPath, 'utf8');
33
35
 
34
36
  if (!scriptContent || scriptContent.trim().length === 0) {
35
- console.log(chalk.red('\n❌ Script dosyası boş.\n'));
37
+ console.log(chalk.red(L('\n❌ Script dosyası boş.\n', '\n❌ Script file is empty.\n')));
36
38
  process.exit(1);
37
39
  }
38
40
 
39
41
  // Skill prompts'ları yükle
40
42
  const skillPrompts = getSkillPrompts();
41
43
 
42
- console.log(chalk.yellow(`\n⏳ Script çalıştırılıyor: ${path.basename(scriptPath)}\n`));
44
+ console.log(chalk.yellow(`\n⏳ ${L('Script çalıştırılıyor', 'Running script')}: ${path.basename(scriptPath)}\n`));
43
45
 
44
46
  // Loading animasyonu
45
47
  const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
@@ -12,6 +12,9 @@
12
12
 
13
13
  const inquirer = require('../utils/inquirer-wrapper');
14
14
  const chalk = require('chalk');
15
+ const { getLang } = require('./i18n');
16
+
17
+ const L = (tr, en) => (getLang() === 'en' ? en : tr);
15
18
 
16
19
  const RISK = {
17
20
  LOW: 'low', // Otomatik onay
@@ -21,10 +24,10 @@ const RISK = {
21
24
  };
22
25
 
23
26
  const RISK_LABELS = {
24
- low: { color: 'gray', icon: '⚪', label: 'DUSUK RISK' },
25
- medium: { color: 'yellow', icon: '🟡', label: 'ORTA RISK' },
26
- high: { color: 'red', icon: '🔴', label: 'YUKSEK RISK' },
27
- critical: { color: 'magenta', icon: '⛔', label: 'KRITIK - GERI ALINAMAZ' },
27
+ low: { color: 'gray', icon: '⚪', label: { tr: 'DÜŞÜK RİSK', en: 'LOW RISK' } },
28
+ medium: { color: 'yellow', icon: '🟡', label: { tr: 'ORTA RİSK', en: 'MEDIUM RISK' } },
29
+ high: { color: 'red', icon: '🔴', label: { tr: 'YÜKSEK RİSK', en: 'HIGH RISK' } },
30
+ critical: { color: 'magenta', icon: '⛔', label: { tr: 'KRİTİK - GERİ ALINAMAZ', en: 'CRITICAL - IRREVERSIBLE' } },
28
31
  };
29
32
 
30
33
  const RISK_RANK = { low: 0, medium: 1, high: 2, critical: 3 };
@@ -44,37 +47,39 @@ async function requireApproval(command, args = {}, risk = RISK.HIGH, reason = ''
44
47
  }
45
48
 
46
49
  const label = RISK_LABELS[risk] || RISK_LABELS.high;
50
+ const labelText = (label.label && (label.label[getLang()] || label.label.tr)) || '';
47
51
 
48
52
  console.log();
49
- console.log(chalk[label.color](` ${label.icon} ${label.label}: ${command}`));
53
+ console.log(chalk[label.color](` ${label.icon} ${labelText}: ${command}`));
50
54
  console.log(chalk.gray(' ' + '─'.repeat(60)));
51
- console.log(chalk.white(` Komut: ${command}`));
55
+ console.log(chalk.white(` ${L('Komut', 'Command')}: ${command}`));
52
56
  if (Object.keys(args).length > 0) {
53
- console.log(chalk.gray(` Argumanlar: ${JSON.stringify(args)}`));
57
+ console.log(chalk.gray(` ${L('Argümanlar', 'Arguments')}: ${JSON.stringify(args)}`));
54
58
  }
55
59
  if (reason) {
56
- console.log(chalk[label.color](` Neden: ${reason}`));
60
+ console.log(chalk[label.color](` ${L('Neden', 'Reason')}: ${reason}`));
57
61
  }
58
62
  console.log(chalk.gray(' ' + '─'.repeat(60)));
59
63
 
60
64
  // Dusuk risk - otomatik onay, sadece mesaj goster
61
65
  if (risk === RISK.LOW) {
62
- console.log(chalk.gray(' Otomatik onaylandi (dusuk risk)'));
66
+ console.log(chalk.gray(' ' + L('Otomatik onaylandı (düşük risk)', 'Auto-approved (low risk)')));
63
67
  console.log();
64
68
  return true;
65
69
  }
66
70
 
67
71
  // Kritik risk - tam yazim gerekli
68
72
  if (risk === RISK.CRITICAL) {
69
- console.log(chalk.red(' Bu islem geri alinamaz!'));
73
+ console.log(chalk.red(' ' + L('Bu işlem geri alınamaz!', 'This action cannot be undone!')));
74
+ const yesWord = L('EVET SIL', 'YES DELETE');
70
75
  const { confirm } = await inquirer.prompt([{
71
76
  type: 'input',
72
77
  name: 'confirm',
73
- message: chalk.red(' Devam etmek icin "EVET SIL" yazin (veya Enter ile iptal):'),
74
- validate: (input) => input === 'EVET SIL' || input === ''
78
+ message: chalk.red(' ' + L(`Devam etmek için "${yesWord}" yazın (veya Enter ile iptal):`, `Type "${yesWord}" to continue (or Enter to cancel):`)),
79
+ validate: (input) => input === 'EVET SIL' || input === 'YES DELETE' || input === ''
75
80
  }]);
76
81
  console.log();
77
- return confirm === 'EVET SIL';
82
+ return confirm === 'EVET SIL' || confirm === 'YES DELETE';
78
83
  }
79
84
 
80
85
  // Yuksek ve orta risk - basit onay
@@ -82,7 +87,7 @@ async function requireApproval(command, args = {}, risk = RISK.HIGH, reason = ''
82
87
  const { ok } = await inquirer.prompt([{
83
88
  type: promptType,
84
89
  name: 'ok',
85
- message: chalk[label.color](` Bu komutu calistirmak istediginize emin misiniz?`),
90
+ message: chalk[label.color](' ' + L('Bu komutu çalıştırmak istediğinize emin misiniz?', 'Are you sure you want to run this command?')),
86
91
  default: false,
87
92
  }]);
88
93
  console.log();