natureco-cli 1.0.8 → 1.0.10

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/natureco.js CHANGED
@@ -45,8 +45,8 @@ program
45
45
  .action(bots);
46
46
 
47
47
  program
48
- .command('chat <bot-name>')
49
- .description('Start interactive chat with a bot')
48
+ .command('chat [bot-name]')
49
+ .description('Start interactive chat with a bot (uses default bot if not specified)')
50
50
  .option('--resume [session-id]', 'Resume a previous session')
51
51
  .action((botName, options) => {
52
52
  chat(botName, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -35,15 +35,38 @@ async function chat(botName, options = {}) {
35
35
  process.exit(1);
36
36
  }
37
37
 
38
- // Bot adı ile eşleşen botu bul
39
- let bot = botList.bots.find(b => b.name.toLowerCase() === botName.toLowerCase());
40
-
41
- if (!bot) {
42
- console.log(chalk.red(`\n❌ Bot "${botName}" not found.\n`));
43
- console.log(chalk.gray('Available bots:'));
44
- botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
45
- console.log('');
46
- process.exit(1);
38
+ // Bot adı verilmediyse config'den defaultBot'u kullan
39
+ let bot;
40
+ if (!botName) {
41
+ const { getConfig } = require('../utils/config');
42
+ const config = getConfig();
43
+
44
+ if (config.defaultBot) {
45
+ bot = botList.bots.find(b => b.name.toLowerCase() === config.defaultBot.toLowerCase());
46
+ if (!bot && config.defaultBotId) {
47
+ bot = botList.bots.find(b => b.id === config.defaultBotId);
48
+ }
49
+ }
50
+
51
+ if (!bot) {
52
+ console.log(chalk.red('\n❌ No default bot configured.\n'));
53
+ console.log(chalk.gray('Available bots:'));
54
+ botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
55
+ console.log('');
56
+ console.log(chalk.yellow('Usage: natureco chat <bot-name>\n'));
57
+ process.exit(1);
58
+ }
59
+ } else {
60
+ // Bot adı ile eşleşen botu bul
61
+ bot = botList.bots.find(b => b.name.toLowerCase() === botName.toLowerCase());
62
+
63
+ if (!bot) {
64
+ console.log(chalk.red(`\n❌ Bot "${botName}" not found.\n`));
65
+ console.log(chalk.gray('Available bots:'));
66
+ botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
67
+ console.log('');
68
+ process.exit(1);
69
+ }
47
70
  }
48
71
 
49
72
  // Chat başlat
@@ -25,15 +25,18 @@ async function gateway() {
25
25
  // Normal gateway ekranı
26
26
  const version = packageJson.version;
27
27
 
28
- // Ana kutu
28
+ console.clear();
29
+
30
+ // Ana logo kutusu - daha büyük ve etkileyici
29
31
  const title = boxen(
30
- chalk.green.bold(`🌿 NatureCo Terminal v${version}\n\n`) +
31
- chalk.gray('AI botlarınızla terminal\'den\n') +
32
- chalk.gray('konuşun, workflow\'ları otomatize\n') +
33
- chalk.gray('edin.'),
32
+ chalk.green.bold('🌿 NatureCo Terminal\n') +
33
+ chalk.green.bold(` v${version}\n\n`) +
34
+ chalk.gray('AI botlarınızla terminal\'den konuşun\n') +
35
+ chalk.gray('Workflow\'ları otomatize edin\n') +
36
+ chalk.gray('Yetenekler ekleyin, MCP entegre edin'),
34
37
  {
35
- padding: 1,
36
- margin: 1,
38
+ padding: { top: 1, bottom: 1, left: 3, right: 3 },
39
+ margin: { top: 1, bottom: 0, left: 0, right: 0 },
37
40
  borderStyle: 'round',
38
41
  borderColor: 'green',
39
42
  align: 'center',
@@ -41,43 +44,69 @@ async function gateway() {
41
44
  );
42
45
 
43
46
  console.log(title);
47
+ console.log(chalk.gray('─'.repeat(60)));
48
+ console.log('');
44
49
 
45
- // Durum bilgileri
50
+ // Durum bilgileri - emoji ve ikonlarla
46
51
  if (config.apiKey) {
47
52
  const maskedKey = config.apiKey.substring(0, 7) + '...';
48
- console.log(chalk.cyan(' Giriş yapıldı:'), chalk.white(maskedKey));
53
+ console.log(chalk.cyan('🔑 Giriş yapıldı:'), chalk.white(maskedKey));
49
54
  } else {
50
- console.log(chalk.yellow(' Giriş yapılmadı'), chalk.gray('(natureco login)'));
55
+ console.log(chalk.yellow('🔑 Giriş yapılmadı'), chalk.gray('(natureco login)'));
51
56
  }
52
57
 
53
58
  if (config.defaultBot) {
54
- console.log(chalk.cyan(' Aktif bot:'), chalk.white(config.defaultBot));
59
+ console.log(chalk.cyan('🤖 Aktif bot:'), chalk.white(config.defaultBot));
55
60
  } else {
56
- console.log(chalk.gray(' Aktif bot: Yok'));
61
+ console.log(chalk.gray('🤖 Aktif bot: Yok'));
57
62
  }
58
63
 
59
64
  const skills = getSkills();
60
65
  const skillCount = skills.length;
61
- console.log(chalk.cyan(' Skills:'), chalk.white(`${skillCount} yüklü`));
66
+ console.log(chalk.cyan(' Skills:'), chalk.white(`${skillCount} yüklü`));
62
67
 
63
68
  const mcpServers = getMcpServers();
64
69
  const mcpCount = Object.keys(mcpServers).length;
65
70
  const activeMcpCount = Object.values(mcpServers).filter(s => !s.disabled).length;
66
- console.log(chalk.cyan(' MCP:'), chalk.white(`${activeMcpCount}/${mcpCount} aktif`));
71
+ console.log(chalk.cyan('🔌 MCP:'), chalk.white(`${activeMcpCount}/${mcpCount} aktif`));
67
72
 
73
+ console.log('');
74
+ console.log(chalk.gray('─'.repeat(60)));
68
75
  console.log('');
69
76
 
70
- // Komutlar
71
- console.log(chalk.bold('Komutlar:'));
72
- console.log(chalk.yellow(' chat <bot> '), chalk.gray('Bot ile konuş'));
73
- console.log(chalk.yellow(' bots '), chalk.gray('Botlarını listele'));
74
- console.log(chalk.yellow(' skills '), chalk.gray('Skill\'leri yönet'));
75
- console.log(chalk.yellow(' mcp '), chalk.gray('MCP sunucularını yönet'));
76
- console.log(chalk.yellow(' init '), chalk.gray('Projeyi başlat'));
77
- console.log(chalk.yellow(' ask "soru" '), chalk.gray('Tek seferlik soru'));
78
- console.log(chalk.yellow(' config '), chalk.gray('Ayarları yönet'));
77
+ // Komutlar - daha okunabilir format
78
+ console.log(chalk.green.bold('Komutlar:\n'));
79
+
80
+ console.log(chalk.yellow(' natureco chat <bot>'));
81
+ console.log(chalk.gray(' Bot ile interaktif sohbet başlat\n'));
82
+
83
+ console.log(chalk.yellow(' natureco bots'));
84
+ console.log(chalk.gray(' Tüm botlarını listele\n'));
85
+
86
+ console.log(chalk.yellow(' natureco ask "soru"'));
87
+ console.log(chalk.gray(' Tek seferlik soru sor\n'));
88
+
89
+ console.log(chalk.yellow(' natureco skills'));
90
+ console.log(chalk.gray(' Skill\'leri yönet (install, remove, list)\n'));
91
+
92
+ console.log(chalk.yellow(' natureco mcp'));
93
+ console.log(chalk.gray(' MCP sunucularını yönet\n'));
94
+
95
+ console.log(chalk.yellow(' natureco init'));
96
+ console.log(chalk.gray(' Mevcut dizinde proje başlat\n'));
97
+
98
+ console.log(chalk.yellow(' natureco config'));
99
+ console.log(chalk.gray(' Ayarları görüntüle ve düzenle\n'));
100
+
101
+ console.log(chalk.yellow(' natureco help'));
102
+ console.log(chalk.gray(' Tüm komutları ve örnekleri göster\n'));
103
+
104
+ console.log(chalk.gray('─'.repeat(60)));
79
105
  console.log('');
80
- console.log(chalk.gray('Yardım için: '), chalk.cyan('natureco help'));
106
+
107
+ // Hızlı başlat ve döküman
108
+ console.log(chalk.cyan('💬 Hızlı başlat:'), chalk.white('natureco chat'));
109
+ console.log(chalk.cyan('📚 Döküman:'), chalk.white('natureco.me/docs'));
81
110
  console.log('');
82
111
  }
83
112
 
@@ -247,7 +247,7 @@ async function browseSkillsCommand() {
247
247
  message: 'Kurmak istediğiniz skill\'leri seçin:',
248
248
  choices: popularSkills.map(skill => ({
249
249
  name: `${skill.name} - ${skill.description}`,
250
- value: skill.slug,
250
+ value: skill.source === 'clawhub' ? `clawhub:${skill.slug}` : skill.slug,
251
251
  })),
252
252
  },
253
253
  ]);
@@ -277,14 +277,14 @@ Bu skill ${name} işlemlerini yapar.
277
277
 
278
278
  // Popular skills list
279
279
  const POPULAR_SKILLS = [
280
- { slug: 'github', name: 'GitHub', description: 'GitHub repo işlemleri' },
281
- { slug: 'filesystem', name: 'Filesystem', description: 'Dosya sistemi işlemleri' },
282
- { slug: 'web-search', name: 'Web Search', description: 'Web arama' },
283
- { slug: 'summarize', name: 'Summarize', description: 'Metin özetleme' },
284
- { slug: 'code-review', name: 'Code Review', description: 'Kod inceleme' },
285
- { slug: 'translate', name: 'Translate', description: 'Çeviri' },
286
- { slug: 'weather', name: 'Weather', description: 'Hava durumu' },
287
- { slug: 'calendar', name: 'Calendar', description: 'Takvim yönetimi' },
280
+ { slug: 'github', name: 'GitHub', description: 'GitHub repo işlemleri', source: 'clawhub' },
281
+ { slug: 'filesystem', name: 'Filesystem', description: 'Dosya sistemi işlemleri', source: 'clawhub' },
282
+ { slug: 'web-search', name: 'Web Search', description: 'Web arama', source: 'clawhub' },
283
+ { slug: 'summarize', name: 'Summarize', description: 'Metin özetleme', source: 'clawhub' },
284
+ { slug: 'code-review', name: 'Code Review', description: 'Kod inceleme', source: 'clawhub' },
285
+ { slug: 'translate', name: 'Translate', description: 'Çeviri', source: 'clawhub' },
286
+ { slug: 'weather', name: 'Weather', description: 'Hava durumu', source: 'clawhub' },
287
+ { slug: 'calendar', name: 'Calendar', description: 'Takvim yönetimi', source: 'clawhub' },
288
288
  ];
289
289
 
290
290
  // Get popular skills