natureco-cli 2.23.32 → 4.4.1

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.
Files changed (174) hide show
  1. package/AUDIT.md +178 -0
  2. package/CHANGELOG.md +422 -0
  3. package/DEPLOY_v2.0.0.md +400 -0
  4. package/README.md +159 -1
  5. package/bin/natureco.js +170 -8
  6. package/package.json +43 -11
  7. package/skills/code-review/SKILL.md +0 -0
  8. package/skills/summarize/SKILL.md +0 -0
  9. package/skills/translate/SKILL.md +0 -0
  10. package/src/commands/acp.js +0 -0
  11. package/src/commands/admin-rpc.js +0 -0
  12. package/src/commands/agent.js +0 -0
  13. package/src/commands/agents.js +0 -0
  14. package/src/commands/approvals.js +0 -0
  15. package/src/commands/ask.js +0 -0
  16. package/src/commands/audit.js +209 -0
  17. package/src/commands/backup.js +0 -0
  18. package/src/commands/bonjour.js +0 -0
  19. package/src/commands/bots.js +0 -0
  20. package/src/commands/browser.js +0 -0
  21. package/src/commands/capability.js +0 -0
  22. package/src/commands/channels.js +0 -0
  23. package/src/commands/chat.js +0 -0
  24. package/src/commands/clawbot.js +0 -0
  25. package/src/commands/clickclack.js +0 -0
  26. package/src/commands/code.js +0 -0
  27. package/src/commands/commands.js +0 -0
  28. package/src/commands/commitments.js +0 -0
  29. package/src/commands/completion.js +0 -0
  30. package/src/commands/config.js +0 -0
  31. package/src/commands/configure.js +0 -0
  32. package/src/commands/cost.js +210 -0
  33. package/src/commands/crestodian.js +0 -0
  34. package/src/commands/cron.js +0 -0
  35. package/src/commands/daemon.js +0 -0
  36. package/src/commands/dashboard.js +126 -45
  37. package/src/commands/device-pair.js +0 -0
  38. package/src/commands/devices.js +0 -0
  39. package/src/commands/directory.js +0 -0
  40. package/src/commands/discord.js +0 -0
  41. package/src/commands/dns.js +0 -0
  42. package/src/commands/docs.js +0 -0
  43. package/src/commands/doctor.js +134 -15
  44. package/src/commands/exec-policy.js +0 -0
  45. package/src/commands/gateway-server.js +0 -0
  46. package/src/commands/gateway.js +0 -0
  47. package/src/commands/git.js +0 -0
  48. package/src/commands/health.js +0 -0
  49. package/src/commands/help.js +0 -0
  50. package/src/commands/hooks.js +0 -0
  51. package/src/commands/imessage.js +0 -0
  52. package/src/commands/infer.js +0 -0
  53. package/src/commands/init.js +0 -0
  54. package/src/commands/irc.js +0 -0
  55. package/src/commands/login.js +0 -0
  56. package/src/commands/logout.js +0 -0
  57. package/src/commands/logs.js +0 -0
  58. package/src/commands/mattermost.js +0 -0
  59. package/src/commands/mcp.js +0 -0
  60. package/src/commands/medium.js +206 -0
  61. package/src/commands/memory-cmd.js +0 -0
  62. package/src/commands/memory.js +0 -0
  63. package/src/commands/message.js +0 -0
  64. package/src/commands/migrate.js +0 -0
  65. package/src/commands/models.js +0 -0
  66. package/src/commands/naturehub.js +156 -0
  67. package/src/commands/node.js +0 -0
  68. package/src/commands/nodes.js +0 -0
  69. package/src/commands/oc-path.js +0 -0
  70. package/src/commands/onboard.js +0 -0
  71. package/src/commands/open-prose.js +0 -0
  72. package/src/commands/pairing.js +0 -0
  73. package/src/commands/path.js +0 -0
  74. package/src/commands/plugins.js +0 -0
  75. package/src/commands/policy.js +0 -0
  76. package/src/commands/proxy.js +0 -0
  77. package/src/commands/qr.js +0 -0
  78. package/src/commands/reset.js +0 -0
  79. package/src/commands/run.js +0 -0
  80. package/src/commands/sandbox.js +0 -0
  81. package/src/commands/secrets.js +0 -0
  82. package/src/commands/security.js +0 -0
  83. package/src/commands/seo.js +268 -0
  84. package/src/commands/sessions.js +0 -0
  85. package/src/commands/setup.js +13 -6
  86. package/src/commands/signal.js +0 -0
  87. package/src/commands/skills.js +82 -1
  88. package/src/commands/slack.js +0 -0
  89. package/src/commands/sms.js +0 -0
  90. package/src/commands/status.js +0 -0
  91. package/src/commands/system.js +0 -0
  92. package/src/commands/tasks.js +0 -0
  93. package/src/commands/team.js +171 -0
  94. package/src/commands/telegram.js +0 -0
  95. package/src/commands/terminal.js +0 -0
  96. package/src/commands/thread-ownership.js +0 -0
  97. package/src/commands/transcripts.js +0 -0
  98. package/src/commands/tui.js +0 -0
  99. package/src/commands/ultrareview.js +0 -0
  100. package/src/commands/uninstall.js +0 -0
  101. package/src/commands/update.js +0 -0
  102. package/src/commands/voice.js +0 -0
  103. package/src/commands/vydra.js +0 -0
  104. package/src/commands/web-fetch.js +0 -0
  105. package/src/commands/webhooks.js +0 -0
  106. package/src/commands/whatsapp.js +0 -0
  107. package/src/commands/wiki.js +0 -0
  108. package/src/commands/workboard.js +0 -0
  109. package/src/commands/xp.js +194 -0
  110. package/src/tools/audio_understanding.js +0 -0
  111. package/src/tools/bash.js +0 -0
  112. package/src/tools/browser.js +0 -0
  113. package/src/tools/canvas.js +0 -0
  114. package/src/tools/document_extract.js +0 -0
  115. package/src/tools/duckduckgo.js +0 -0
  116. package/src/tools/exa_search.js +0 -0
  117. package/src/tools/filesystem.js +0 -0
  118. package/src/tools/firecrawl.js +0 -0
  119. package/src/tools/git.js +0 -0
  120. package/src/tools/http.js +0 -0
  121. package/src/tools/image_generation.js +0 -0
  122. package/src/tools/list_dir.js +0 -0
  123. package/src/tools/llm_task.js +43 -11
  124. package/src/tools/media_understanding.js +0 -0
  125. package/src/tools/music_generation.js +0 -0
  126. package/src/tools/parallel_search.js +0 -0
  127. package/src/tools/phone_control.js +0 -0
  128. package/src/tools/phone_control_enhanced.js +0 -0
  129. package/src/tools/read_file.js +0 -0
  130. package/src/tools/searxng.js +0 -0
  131. package/src/tools/speech_to_text.js +0 -0
  132. package/src/tools/text_to_speech.js +0 -0
  133. package/src/tools/thread_ownership.js +0 -0
  134. package/src/tools/video_generation.js +0 -0
  135. package/src/tools/web_readability.js +0 -0
  136. package/src/tools/web_search.js +0 -0
  137. package/src/tools/write_file.js +0 -0
  138. package/src/utils/agents-md.js +0 -0
  139. package/src/utils/agents.js +0 -0
  140. package/src/utils/api.js +5 -1
  141. package/src/utils/approvals.js +0 -0
  142. package/src/utils/audit.js +199 -0
  143. package/src/utils/background.js +0 -0
  144. package/src/utils/baileys.js +0 -0
  145. package/src/utils/branding.js +136 -0
  146. package/src/utils/commands.js +0 -0
  147. package/src/utils/config.js +0 -0
  148. package/src/utils/cost-tracker.js +360 -0
  149. package/src/utils/cron.js +0 -0
  150. package/src/utils/dashboard-server.js +284 -0
  151. package/src/utils/errors.js +0 -0
  152. package/src/utils/format.js +7 -10
  153. package/src/utils/gateway-ws.js +0 -0
  154. package/src/utils/headless.js +0 -0
  155. package/src/utils/history.js +0 -0
  156. package/src/utils/hooks.js +0 -0
  157. package/src/utils/inquirer-wrapper.js +0 -0
  158. package/src/utils/mcp-client.js +0 -0
  159. package/src/utils/mcp.js +0 -0
  160. package/src/utils/memory.js +0 -0
  161. package/src/utils/parallel-tools.js +0 -0
  162. package/src/utils/path-utils.js +0 -0
  163. package/src/utils/pattern-detector.js +314 -0
  164. package/src/utils/plugin-registry.js +0 -0
  165. package/src/utils/secret-scanner.js +204 -0
  166. package/src/utils/secrets.js +0 -0
  167. package/src/utils/sessions.js +0 -0
  168. package/src/utils/skills.js +0 -0
  169. package/src/utils/sub-agent.js +6 -0
  170. package/src/utils/token-budget.js +0 -0
  171. package/src/utils/tool-adapter.js +0 -0
  172. package/src/utils/tool-runner.js +0 -0
  173. package/src/utils/tui.js +750 -0
  174. package/src/utils/web-fetch.js +0 -0
File without changes
File without changes
@@ -0,0 +1,206 @@
1
+ /**
2
+ * natureco medium — Medium makale yayınlama (Phase 6)
3
+ *
4
+ * Parton'un hedefi: ayda en az 4 Medium makalesi.
5
+ * Bu komut CLI'dan taslak yayınlamayı sağlar.
6
+ *
7
+ * Kullanım:
8
+ * natureco medium draft <file.md> Dosyadan taslak oluştur
9
+ * natureco medium publish <file.md> Doğrudan yayınla
10
+ * natureco medium list Taslak/yayınlanan makaleler
11
+ * natureco medium stats Performans istatistikleri
12
+ *
13
+ * Not: Medium API resmi değil, integration token gerektirir.
14
+ */
15
+
16
+ const chalk = require('chalk');
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+ const os = require('os');
20
+ const https = require('https');
21
+ const audit = require('../utils/audit');
22
+
23
+ const API_BASE = 'https://api.medium.com/v1';
24
+ const TOKEN_KEY = 'mediumIntegrationToken';
25
+
26
+ function getToken() {
27
+ const { getConfig } = require('../utils/config');
28
+ return getConfig()[TOKEN_KEY] || null;
29
+ }
30
+
31
+ async function apiCall(endpoint, options = {}) {
32
+ const token = getToken();
33
+ if (!token) throw new Error('Medium integration token tanımlı değil');
34
+ return new Promise((resolve, reject) => {
35
+ const url = new URL(endpoint, API_BASE);
36
+ const req = https.request({
37
+ hostname: url.hostname,
38
+ path: url.pathname + url.search,
39
+ method: options.method || 'GET',
40
+ headers: {
41
+ 'Authorization': `Bearer ${token}`,
42
+ 'Content-Type': 'application/json',
43
+ 'User-Agent': 'natureco-cli/3.5',
44
+ },
45
+ timeout: 15000,
46
+ }, (res) => {
47
+ let data = '';
48
+ res.on('data', (c) => data += c);
49
+ res.on('end', () => {
50
+ if (res.statusCode >= 200 && res.statusCode < 300) {
51
+ try { resolve(JSON.parse(data)); } catch { resolve(data); }
52
+ } else reject(new Error(`HTTP ${res.statusCode}: ${data.slice(0, 200)}`));
53
+ });
54
+ });
55
+ req.on('error', reject);
56
+ req.on('timeout', () => req.destroy());
57
+ if (options.body) req.write(JSON.stringify(options.body));
58
+ req.end();
59
+ });
60
+ }
61
+
62
+ function parseMarkdown(content) {
63
+ const lines = content.split('\n');
64
+ let title = '';
65
+ let body = [];
66
+ let inCode = false;
67
+
68
+ for (const line of lines) {
69
+ if (line.startsWith('```')) { inCode = !inCode; body.push(line); continue; }
70
+ if (inCode) { body.push(line); continue; }
71
+ if (!title && line.startsWith('# ')) {
72
+ title = line.slice(2).trim();
73
+ continue;
74
+ }
75
+ body.push(line);
76
+ }
77
+ return { title: title || 'Başlıksız', content: body.join('\n').trim() };
78
+ }
79
+
80
+ async function cmdDraft(args) {
81
+ const filePath = args[0];
82
+ if (!filePath) {
83
+ console.log(chalk.red('\n Kullanım: natureco medium draft <dosya.md>\n'));
84
+ return;
85
+ }
86
+ if (!fs.existsSync(filePath)) {
87
+ console.log(chalk.red(`\n Dosya bulunamadı: ${filePath}\n`));
88
+ return;
89
+ }
90
+
91
+ const content = fs.readFileSync(filePath, 'utf8');
92
+ const { title, content: body } = parseMarkdown(content);
93
+
94
+ console.log(chalk.cyan('\n 📝 Taslak hazırlanıyor...\n'));
95
+ console.log(chalk.gray(` Başlık: ${title}`));
96
+ console.log(chalk.gray(` Uzunluk: ${body.length} karakter, ${body.split(/\s+/).length} kelime`));
97
+
98
+ const token = getToken();
99
+ if (!token) {
100
+ console.log(chalk.yellow('\n ⚠️ Medium token tanımlı değil.'));
101
+ console.log(chalk.gray(' Ayarlamak için: ') + chalk.cyan('natureco config set mediumIntegrationToken <token>'));
102
+ console.log(chalk.gray('\n Token almak için: ') + chalk.cyan('https://medium.com/me/settings/tokens'));
103
+ console.log('');
104
+ // Yerel taslak kaydet
105
+ const draftDir = path.join(os.homedir(), '.natureco', 'medium-drafts');
106
+ if (!fs.existsSync(draftDir)) fs.mkdirSync(draftDir, { recursive: true });
107
+ const draftFile = path.join(draftDir, `${Date.now()}-${path.basename(filePath, '.md')}.json`);
108
+ fs.writeFileSync(draftFile, JSON.stringify({ title, body, source: filePath, createdAt: new Date().toISOString() }, null, 2));
109
+ console.log(chalk.green(` ✓ Taslak yerel olarak kaydedildi: ${draftFile}\n`));
110
+ return;
111
+ }
112
+
113
+ try {
114
+ const user = await apiCall('/me');
115
+ const userId = user.data?.id;
116
+ if (!userId) throw new Error('User ID alınamadı');
117
+
118
+ const result = await apiCall(`/users/${userId}/posts`, {
119
+ method: 'POST',
120
+ body: { title, contentFormat: 'markdown', content: body, publishStatus: 'draft' },
121
+ });
122
+ console.log(chalk.green('\n ✓ Medium\'a taslak yüklendi!'));
123
+ if (result.data?.url) console.log(chalk.cyan(` 🔗 ${result.data.url}\n`));
124
+ audit.log(audit.ACTIONS.INFO, { source: 'medium', action: 'draft', url: result.data?.url });
125
+ } catch (e) {
126
+ console.log(chalk.yellow(`\n ⚠️ API hatası: ${e.message}`));
127
+ console.log(chalk.gray(' Token\'ı kontrol et veya mediumIntegrationToken ayarla.\n'));
128
+ }
129
+ }
130
+
131
+ async function cmdPublish(args) {
132
+ const filePath = args[0];
133
+ if (!filePath) {
134
+ console.log(chalk.red('\n Kullanım: natureco medium publish <dosya.md>\n'));
135
+ return;
136
+ }
137
+ if (!fs.existsSync(filePath)) {
138
+ console.log(chalk.red(`\n Dosya bulunamadı: ${filePath}\n`));
139
+ return;
140
+ }
141
+
142
+ const content = fs.readFileSync(filePath, 'utf8');
143
+ const { title, content: body } = parseMarkdown(content);
144
+
145
+ const token = getToken();
146
+ if (!token) {
147
+ console.log(chalk.red('\n ❌ Medium token tanımlı değil.\n'));
148
+ console.log(chalk.gray(' Yayınlamak için mediumIntegrationToken gerekli.\n'));
149
+ return;
150
+ }
151
+
152
+ console.log(chalk.yellow(`\n ⚠️ "${title}" Medium'da YAYINLANACAK.\n`));
153
+
154
+ try {
155
+ const user = await apiCall('/me');
156
+ const userId = user.data?.id;
157
+ const result = await apiCall(`/users/${userId}/posts`, {
158
+ method: 'POST',
159
+ body: { title, contentFormat: 'markdown', content: body, publishStatus: 'public' },
160
+ });
161
+ console.log(chalk.green('\n ✓ Yayınlandı!'));
162
+ if (result.data?.url) console.log(chalk.cyan(` 🔗 ${result.data.url}\n`));
163
+ audit.log(audit.ACTIONS.INFO, { source: 'medium', action: 'publish', url: result.data?.url });
164
+ } catch (e) {
165
+ console.log(chalk.red(`\n ❌ Yayınlama başarısız: ${e.message}\n`));
166
+ }
167
+ }
168
+
169
+ function cmdList() {
170
+ const draftDir = path.join(os.homedir(), '.natureco', 'medium-drafts');
171
+ if (!fs.existsSync(draftDir)) {
172
+ console.log(chalk.gray('\n Henüz taslak yok.\n'));
173
+ return;
174
+ }
175
+ const files = fs.readdirSync(draftDir).sort().reverse();
176
+ console.log(chalk.cyan('\n 📚 Medium Taslakları\n'));
177
+ for (const f of files) {
178
+ const filePath = path.join(draftDir, f);
179
+ try {
180
+ const draft = JSON.parse(fs.readFileSync(filePath, 'utf8'));
181
+ console.log(` ${chalk.gray(f)}`);
182
+ console.log(` ${chalk.bold(draft.title)}`);
183
+ console.log(` ${chalk.gray(new Date(draft.createdAt).toLocaleString())}`);
184
+ } catch {}
185
+ }
186
+ console.log('');
187
+ }
188
+
189
+ async function medium(args) {
190
+ const [action, ...params] = args || [];
191
+ if (!action || action === 'help') {
192
+ console.log(chalk.yellow('\n Kullanım:'));
193
+ console.log(chalk.gray(' natureco medium draft <file.md> Taslak oluştur'));
194
+ console.log(chalk.gray(' natureco medium publish <file.md> Doğrudan yayınla'));
195
+ console.log(chalk.gray(' natureco medium list Taslaklar'));
196
+ console.log(chalk.gray('\n Token ayarla: ') + chalk.cyan('natureco config set mediumIntegrationToken <token>'));
197
+ console.log('');
198
+ return;
199
+ }
200
+ if (action === 'draft') return cmdDraft(params);
201
+ if (action === 'publish') return cmdPublish(params);
202
+ if (action === 'list') return cmdList();
203
+ console.log(chalk.red(`\n Bilinmeyen: ${action}\n`));
204
+ }
205
+
206
+ module.exports = medium;
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,156 @@
1
+ /**
2
+ * natureco naturehub — Nature Hub'a içerik yayınlama (Phase 6)
3
+ *
4
+ * natureco.me'nin topluluk akışına CLI'dan içerik gönder.
5
+ * Kullanım:
6
+ * natureco naturehub post <text> Yeni gönderi
7
+ * natureco naturehub list Son gönderiler
8
+ * natureco naturehub trending Trend olan konular
9
+ * natureco naturehub config Ayarları göster
10
+ *
11
+ * API endpoint: api.natureco.me/naturehub/* (placeholder, gerçek API Parton sağlayacak)
12
+ */
13
+
14
+ const chalk = require('chalk');
15
+ const https = require('https');
16
+ const { URL } = require('url');
17
+ const audit = require('../utils/audit');
18
+
19
+ const API_BASE = 'https://api.natureco.me';
20
+ const CONFIG_KEY = 'naturehub';
21
+
22
+ async function apiCall(path, options = {}) {
23
+ // Geliştirme aşamasında placeholder — gerçek API hazır olunca kullanılacak
24
+ // Şimdilik simüle edelim ve kullanıcıya rehberlik edelim
25
+ return new Promise((resolve, reject) => {
26
+ const url = new URL(path, API_BASE);
27
+ const reqOptions = {
28
+ hostname: url.hostname,
29
+ path: url.pathname + url.search,
30
+ method: options.method || 'GET',
31
+ headers: {
32
+ 'Content-Type': 'application/json',
33
+ 'User-Agent': 'natureco-cli/3.5',
34
+ ...(options.token ? { 'Authorization': `Bearer ${options.token}` } : {}),
35
+ ...options.headers,
36
+ },
37
+ timeout: 10000,
38
+ };
39
+ const req = https.request(reqOptions, (res) => {
40
+ let data = '';
41
+ res.on('data', (chunk) => data += chunk);
42
+ res.on('end', () => {
43
+ if (res.statusCode >= 200 && res.statusCode < 300) {
44
+ try { resolve(JSON.parse(data)); } catch { resolve(data); }
45
+ } else {
46
+ reject(new Error(`HTTP ${res.statusCode}: ${data.slice(0, 200)}`));
47
+ }
48
+ });
49
+ });
50
+ req.on('error', reject);
51
+ req.on('timeout', () => { req.destroy(); reject(new Error('Timeout')); });
52
+ if (options.body) req.write(JSON.stringify(options.body));
53
+ req.end();
54
+ });
55
+ }
56
+
57
+ async function getToken() {
58
+ const { getConfig } = require('../utils/config');
59
+ const cfg = getConfig();
60
+ return cfg?.naturehubToken || cfg?.apiKey || null;
61
+ }
62
+
63
+ async function cmdPost(args) {
64
+ const text = args.join(' ').trim();
65
+ if (!text) {
66
+ console.log(chalk.red('\n Kullanım: natureco naturehub post "<mesaj>"\n'));
67
+ return;
68
+ }
69
+ if (text.length > 500) {
70
+ console.log(chalk.yellow('\n ⚠️ Mesaj 500 karakteri aşıyor. Kısaltılacak.\n'));
71
+ }
72
+ const shortText = text.slice(0, 500);
73
+
74
+ console.log(chalk.cyan('\n 📤 Nature Hub\'a gönderiliyor...\n'));
75
+ console.log(chalk.gray(` "${shortText}"\n`));
76
+
77
+ const token = await getToken();
78
+ if (!token) {
79
+ console.log(chalk.yellow(' ⚠️ Nature Hub token tanımlı değil.\n'));
80
+ console.log(chalk.gray(' Ayarlamak için: ') + chalk.cyan('natureco config set naturehubToken <token>'));
81
+ console.log(chalk.gray(' Veya genel API key: ') + chalk.cyan('natureco login'));
82
+ console.log('');
83
+ console.log(chalk.gray(' Şimdilik yerel olarak kaydedildi.\n'));
84
+ saveLocal(shortText);
85
+ audit.log(audit.ACTIONS.INFO, { source: 'naturehub', action: 'post', local: true });
86
+ return;
87
+ }
88
+
89
+ try {
90
+ const result = await apiCall('/naturehub/posts', {
91
+ method: 'POST',
92
+ token,
93
+ body: { text: shortText, source: 'cli' },
94
+ });
95
+ console.log(chalk.green(' ✓ Gönderildi!\n'));
96
+ if (result.url) console.log(chalk.cyan(` 🔗 ${result.url}\n`));
97
+ audit.log(audit.ACTIONS.INFO, { source: 'naturehub', action: 'post', url: result.url });
98
+ } catch (e) {
99
+ console.log(chalk.yellow(` ⚠️ API henüz hazır değil: ${e.message}`));
100
+ console.log(chalk.gray(' Yerel olarak kaydedildi.\n'));
101
+ saveLocal(shortText);
102
+ }
103
+ }
104
+
105
+ function saveLocal(text) {
106
+ const fs = require('fs');
107
+ const path = require('path');
108
+ const os = require('os');
109
+ const file = path.join(os.homedir(), '.natureco', 'naturehub-pending.jsonl');
110
+ const dir = path.dirname(file);
111
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
112
+ fs.appendFileSync(file, JSON.stringify({ ts: new Date().toISOString(), text }) + '\n');
113
+ console.log(chalk.gray(` Kayıt: ${file}\n`));
114
+ }
115
+
116
+ async function cmdList() {
117
+ console.log(chalk.cyan('\n 🌍 Nature Hub — Son Gönderiler\n'));
118
+ console.log(chalk.gray(' ' + '─'.repeat(50)));
119
+ console.log(chalk.gray('\n Bu özellik api.natureco.me hazır olunca tam çalışacak.\n'));
120
+ console.log(chalk.gray(' Şimdilik tarayıcıdan ziyaret edin: ') + chalk.cyan('https://natureco.me/hub\n'));
121
+ }
122
+
123
+ async function cmdTrending() {
124
+ console.log(chalk.cyan('\n 🔥 Trend Konular\n'));
125
+ console.log(chalk.gray(' ' + '─'.repeat(50)));
126
+ console.log(chalk.gray('\n Bu özellik api.natureco.me hazır olunca tam çalışacak.\n'));
127
+ }
128
+
129
+ async function cmdConfig() {
130
+ const { getConfig } = require('../utils/config');
131
+ const cfg = getConfig();
132
+ console.log(chalk.cyan('\n ⚙️ Nature Hub Ayarları\n'));
133
+ console.log(chalk.gray(' Token: ') + (cfg.naturehubToken ? chalk.green('✓ ayarlı') : chalk.yellow('yok')));
134
+ console.log(chalk.gray('\n Ayarlamak için: ') + chalk.cyan('natureco config set naturehubToken <token>'));
135
+ console.log('');
136
+ }
137
+
138
+ async function naturehub(args) {
139
+ const [action, ...params] = args || [];
140
+ if (!action || action === 'help') {
141
+ console.log(chalk.yellow('\n Kullanım:'));
142
+ console.log(chalk.gray(' natureco naturehub post <text> Yeni gönderi'));
143
+ console.log(chalk.gray(' natureco naturehub list Son gönderiler'));
144
+ console.log(chalk.gray(' natureco naturehub trending Trend konular'));
145
+ console.log(chalk.gray(' natureco naturehub config Ayarlar'));
146
+ console.log('');
147
+ return;
148
+ }
149
+ if (action === 'post') return cmdPost(params);
150
+ if (action === 'list') return cmdList();
151
+ if (action === 'trending') return cmdTrending();
152
+ if (action === 'config') return cmdConfig();
153
+ console.log(chalk.red(`\n Bilinmeyen action: ${action}\n`));
154
+ }
155
+
156
+ module.exports = naturehub;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes