natureco-cli 5.52.1 → 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.
@@ -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;
@@ -0,0 +1,31 @@
1
+ const chalk = require('chalk');
2
+ const { setConfigValue } = require('../utils/config');
3
+ const { t, getLang, setLangCache } = require('../utils/i18n');
4
+
5
+ /**
6
+ * `natureco lang [tr|en]` — arayüz dilini görüntüle/ayarla.
7
+ * Ayar `~/.natureco/config.json` içindeki `language` alanına yazılır ve
8
+ * i18n katmanı + ajanın system-prompt'u bunu okur (EN → İngilizce deneyim).
9
+ */
10
+ async function lang(arg) {
11
+ const label = (l) => (l === 'en' ? 'English (en)' : 'Türkçe (tr)');
12
+ const val = (arg || '').toLowerCase().trim();
13
+
14
+ if (!val) {
15
+ console.log('\n ' + t('lang.current', { lang: label(getLang()) }));
16
+ console.log(' ' + chalk.gray(t('lang.usage')) + '\n');
17
+ return;
18
+ }
19
+ if (val !== 'tr' && val !== 'en') {
20
+ console.log('\n ' + chalk.red(t('lang.invalid')) + '\n');
21
+ process.exitCode = 1;
22
+ return;
23
+ }
24
+
25
+ setConfigValue('language', val);
26
+ setLangCache(val);
27
+ console.log('\n ' + chalk.green(t('lang.set', { lang: label(val) })));
28
+ console.log(' ' + chalk.gray(t('lang.restartHint')) + '\n');
29
+ }
30
+
31
+ module.exports = lang;