natureco-cli 5.20.4 → 5.22.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/CHANGELOG.md +779 -750
- package/README.md +608 -610
- package/bin/natureco.js +1099 -1095
- package/package.json +95 -94
- package/scripts/generate-qr.js +21 -0
- package/scripts/import-curated-skills-log.json +5 -0
- package/scripts/import-curated-skills.js +262 -0
- package/scripts/import-skills-log.json +167 -0
- package/scripts/import-skills.js +261 -0
- package/scripts/postinstall.js +125 -0
- package/src/commands/agent.js +280 -280
- package/src/commands/ask.js +4 -2
- package/src/commands/chat.js +0 -1
- package/src/commands/help.js +0 -2
- package/src/commands/naturehub.js +206 -373
- package/src/commands/repl.js +56 -63
- package/src/providers/mem0-memory.js +121 -121
- package/src/providers/supermemory-memory.js +117 -117
- package/src/tools/llm_task.js +150 -163
- package/src/tools/mac_alarm.js +199 -199
- package/src/tools/workflow.js +438 -439
- package/src/utils/api.js +1211 -1188
- package/src/utils/cost-tracker.js +361 -360
- package/src/utils/inquirer-wrapper.js +43 -31
- package/src/utils/paste-safe-input.js +346 -334
- package/src/utils/process-errors.js +129 -115
- package/src/utils/provider-detect.js +76 -72
- package/src/utils/skills.js +1 -1
- package/src/utils/system-prompt.js +141 -136
- package/src/utils/tools.js +324 -324
- package/README.md.bak +0 -565
- package/src/tools/http.js.bak +0 -78
package/bin/natureco.js
CHANGED
|
@@ -1,1095 +1,1099 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { Command } = require('commander');
|
|
4
|
-
const chalk = require('chalk');
|
|
5
|
-
const packageJson = require('../package.json');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
program
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
${chalk.cyan('
|
|
85
|
-
${chalk.cyan('
|
|
86
|
-
${chalk.cyan('
|
|
87
|
-
${chalk.cyan('
|
|
88
|
-
${chalk.cyan('
|
|
89
|
-
${chalk.cyan('
|
|
90
|
-
|
|
91
|
-
${chalk.
|
|
92
|
-
${chalk.cyan('
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
${chalk.cyan('
|
|
96
|
-
${chalk.cyan('
|
|
97
|
-
${chalk.cyan('
|
|
98
|
-
${chalk.cyan('
|
|
99
|
-
${chalk.cyan('
|
|
100
|
-
${chalk.cyan('
|
|
101
|
-
${chalk.cyan('
|
|
102
|
-
|
|
103
|
-
${chalk.
|
|
104
|
-
${chalk.cyan('
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
${chalk.cyan('
|
|
108
|
-
${chalk.cyan('
|
|
109
|
-
${chalk.cyan('
|
|
110
|
-
${chalk.cyan('
|
|
111
|
-
${chalk.cyan('
|
|
112
|
-
${chalk.cyan('
|
|
113
|
-
${chalk.cyan('
|
|
114
|
-
${chalk.cyan('
|
|
115
|
-
${chalk.cyan('
|
|
116
|
-
|
|
117
|
-
${chalk.
|
|
118
|
-
${chalk.cyan('
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
${chalk.cyan('
|
|
122
|
-
${chalk.cyan('
|
|
123
|
-
${chalk.cyan('
|
|
124
|
-
${chalk.cyan('
|
|
125
|
-
${chalk.cyan('
|
|
126
|
-
${chalk.cyan('
|
|
127
|
-
|
|
128
|
-
${chalk.
|
|
129
|
-
${chalk.cyan('
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
${chalk.cyan('
|
|
133
|
-
${chalk.cyan('
|
|
134
|
-
${chalk.cyan('
|
|
135
|
-
${chalk.cyan('
|
|
136
|
-
${chalk.cyan('
|
|
137
|
-
${chalk.cyan('
|
|
138
|
-
${chalk.cyan('
|
|
139
|
-
${chalk.cyan('
|
|
140
|
-
${chalk.cyan('
|
|
141
|
-
${chalk.cyan('
|
|
142
|
-
${chalk.cyan('
|
|
143
|
-
${chalk.cyan('
|
|
144
|
-
|
|
145
|
-
${chalk.
|
|
146
|
-
${chalk.cyan('
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
${chalk.cyan('
|
|
150
|
-
${chalk.cyan('
|
|
151
|
-
${chalk.cyan('
|
|
152
|
-
${chalk.cyan('
|
|
153
|
-
${chalk.cyan('
|
|
154
|
-
${chalk.cyan('
|
|
155
|
-
${chalk.cyan('
|
|
156
|
-
${chalk.cyan('
|
|
157
|
-
${chalk.cyan('
|
|
158
|
-
${chalk.cyan('
|
|
159
|
-
|
|
160
|
-
${chalk.
|
|
161
|
-
${chalk.cyan('
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
${chalk.cyan('
|
|
165
|
-
${chalk.cyan('
|
|
166
|
-
${chalk.cyan('
|
|
167
|
-
${chalk.cyan('
|
|
168
|
-
${chalk.cyan('
|
|
169
|
-
${chalk.cyan('
|
|
170
|
-
${chalk.cyan('
|
|
171
|
-
|
|
172
|
-
${chalk.
|
|
173
|
-
${chalk.cyan('
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
${chalk.cyan('
|
|
177
|
-
|
|
178
|
-
${chalk.
|
|
179
|
-
${chalk.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
${chalk.gray('$ natureco
|
|
183
|
-
${chalk.gray('$ natureco
|
|
184
|
-
${chalk.gray('$ natureco
|
|
185
|
-
${chalk.gray('$ natureco
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
.
|
|
216
|
-
.
|
|
217
|
-
.option('--
|
|
218
|
-
.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
.
|
|
228
|
-
.
|
|
229
|
-
.option('--
|
|
230
|
-
.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
.
|
|
265
|
-
.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
.
|
|
270
|
-
.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
.
|
|
308
|
-
.option('--
|
|
309
|
-
.
|
|
310
|
-
.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
gateway
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
.
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
.
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
.
|
|
725
|
-
.
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
//
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
const
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
return true;
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
if (opts.
|
|
1089
|
-
process.env.
|
|
1090
|
-
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { Command } = require('commander');
|
|
4
|
+
const chalk = require('chalk');
|
|
5
|
+
const packageJson = require('../package.json');
|
|
6
|
+
// Küresel çökme/EPIPE yakalayıcıları — ham Node stack yerine düzgün mesaj + audit log
|
|
7
|
+
require('../src/utils/process-errors').install();
|
|
8
|
+
const login = require('../src/commands/login');
|
|
9
|
+
const logout = require('../src/commands/logout');
|
|
10
|
+
const bots = require('../src/commands/bots');
|
|
11
|
+
const chat = require('../src/commands/chat');
|
|
12
|
+
const help = require('../src/commands/help');
|
|
13
|
+
const gateway = require('../src/commands/gateway');
|
|
14
|
+
const init = require('../src/commands/init');
|
|
15
|
+
const config = require('../src/commands/config');
|
|
16
|
+
const ask = require('../src/commands/ask');
|
|
17
|
+
const run = require('../src/commands/run');
|
|
18
|
+
const signal = require('../src/commands/signal');
|
|
19
|
+
const irc = require('../src/commands/irc');
|
|
20
|
+
const mattermost = require('../src/commands/mattermost');
|
|
21
|
+
const imessage = require('../src/commands/imessage');
|
|
22
|
+
const sms = require('../src/commands/sms');
|
|
23
|
+
const webhooks = require('../src/commands/webhooks');
|
|
24
|
+
const bonjour = require('../src/commands/bonjour');
|
|
25
|
+
const policy = require('../src/commands/policy');
|
|
26
|
+
const voice = require('../src/commands/voice');
|
|
27
|
+
const clickclack = require('../src/commands/clickclack');
|
|
28
|
+
const adminRpc = require('../src/commands/admin-rpc');
|
|
29
|
+
const ocPath = require('../src/commands/oc-path');
|
|
30
|
+
const workboard = require('../src/commands/workboard');
|
|
31
|
+
const threadOwnership = require('../src/commands/thread-ownership');
|
|
32
|
+
const devicePair = require('../src/commands/device-pair');
|
|
33
|
+
const openProse = require('../src/commands/open-prose');
|
|
34
|
+
const vydra = require('../src/commands/vydra');
|
|
35
|
+
// OpenClaw uyumlu komutlar
|
|
36
|
+
const agent = require('../src/commands/agent');
|
|
37
|
+
const approvals = require('../src/commands/approvals');
|
|
38
|
+
const backup = require('../src/commands/backup');
|
|
39
|
+
const audit = require('../src/commands/audit');
|
|
40
|
+
const cost = require('../src/commands/cost');
|
|
41
|
+
const naturehub = require('../src/commands/naturehub');
|
|
42
|
+
const medium = require('../src/commands/medium');
|
|
43
|
+
const seo = require('../src/commands/seo');
|
|
44
|
+
const xp = require('../src/commands/xp');
|
|
45
|
+
const team = require('../src/commands/team');
|
|
46
|
+
const repl = require('../src/commands/repl');
|
|
47
|
+
const capability = require('../src/commands/capability');
|
|
48
|
+
const commitments = require('../src/commands/commitments');
|
|
49
|
+
const completion = require('../src/commands/completion');
|
|
50
|
+
const configure = require('../src/commands/configure');
|
|
51
|
+
const crestodian = require('../src/commands/crestodian');
|
|
52
|
+
const daemon = require('../src/commands/daemon');
|
|
53
|
+
const devices = require('../src/commands/devices');
|
|
54
|
+
const directory = require('../src/commands/directory');
|
|
55
|
+
const dns = require('../src/commands/dns');
|
|
56
|
+
const docs = require('../src/commands/docs');
|
|
57
|
+
const execPolicy = require('../src/commands/exec-policy');
|
|
58
|
+
const health = require('../src/commands/health');
|
|
59
|
+
const infer = require('../src/commands/infer');
|
|
60
|
+
const node = require('../src/commands/node');
|
|
61
|
+
const nodes = require('../src/commands/nodes');
|
|
62
|
+
const onboard = require('../src/commands/onboard');
|
|
63
|
+
const proxy = require('../src/commands/proxy');
|
|
64
|
+
const qr = require('../src/commands/qr');
|
|
65
|
+
const sandbox = require('../src/commands/sandbox');
|
|
66
|
+
const secrets = require('../src/commands/secrets');
|
|
67
|
+
const system = require('../src/commands/system');
|
|
68
|
+
const terminal = require('../src/commands/terminal');
|
|
69
|
+
const transcripts = require('../src/commands/transcripts');
|
|
70
|
+
const wiki = require('../src/commands/wiki');
|
|
71
|
+
const browser = require('../src/commands/browser');
|
|
72
|
+
const tools = require('../src/commands/tools');
|
|
73
|
+
|
|
74
|
+
const program = new Command();
|
|
75
|
+
|
|
76
|
+
program
|
|
77
|
+
.name('natureco')
|
|
78
|
+
.description('NatureCo AI Bot Terminal Interface')
|
|
79
|
+
.version(packageJson.version)
|
|
80
|
+
.showSuggestionAfterError(true); // yazım hatasında "şunu mu demek istediniz?"
|
|
81
|
+
|
|
82
|
+
program.addHelpText('after', `
|
|
83
|
+
${chalk.yellow('🤖 AI & Chat')}
|
|
84
|
+
${chalk.cyan('chat')} AI sohbet başlat
|
|
85
|
+
${chalk.cyan('code')} Code agent — dosya oku, yaz, komut çalıştır
|
|
86
|
+
${chalk.cyan('ask')} Tek soru sor
|
|
87
|
+
${chalk.cyan('run')} Markdown script çalıştır
|
|
88
|
+
${chalk.cyan('bots')} Bot listesi
|
|
89
|
+
${chalk.cyan('agent')} One-shot agent (run|abort|tail|logs)
|
|
90
|
+
${chalk.cyan('agents')} Agent yönetimi (list|set|info|add|bindings|bind|unbind|set-identity)
|
|
91
|
+
${chalk.cyan('commitments')} Eylem taahhütleri (list|add|check|resolve|summary|pending|done)
|
|
92
|
+
${chalk.cyan('infer')} Yetenek/algılama (list|inspect|model|image|audio|tts|video|web|embedding|auth)
|
|
93
|
+
|
|
94
|
+
${chalk.yellow('⚙️ Kurulum & Ayarlar')}
|
|
95
|
+
${chalk.cyan('setup')} İlk kurulum (config|workspace|dirs|status)
|
|
96
|
+
${chalk.cyan('onboard')} Interaktif onboarding (gateway|auth|workspace|channels|skills|health|status)
|
|
97
|
+
${chalk.cyan('configure')} Interaktif yapılandırma (gateway|auth|channels|plugins|skills)
|
|
98
|
+
${chalk.cyan('login')} API key ile giriş
|
|
99
|
+
${chalk.cyan('logout')} Çıkış
|
|
100
|
+
${chalk.cyan('config')} Ayarlar (get|set|unset|list|file|schema|validate|backups|restore)
|
|
101
|
+
${chalk.cyan('doctor')} Sistem teşhis (run|list|check)
|
|
102
|
+
${chalk.cyan('update')} Güncelleme (run|status|wizard)
|
|
103
|
+
${chalk.cyan('init')} Proje başlatma
|
|
104
|
+
${chalk.cyan('completion')} Shell completion (bash|zsh|fish)
|
|
105
|
+
|
|
106
|
+
${chalk.yellow('🔌 Entegrasyonlar')}
|
|
107
|
+
${chalk.cyan('telegram')} Telegram bağlantısı
|
|
108
|
+
${chalk.cyan('whatsapp')} WhatsApp bağlantısı
|
|
109
|
+
${chalk.cyan('discord')} Discord bağlantısı
|
|
110
|
+
${chalk.cyan('slack')} Slack bağlantısı
|
|
111
|
+
${chalk.cyan('signal')} Signal bağlantısı
|
|
112
|
+
${chalk.cyan('irc')} IRC bağlantısı
|
|
113
|
+
${chalk.cyan('mattermost')} Mattermost bağlantısı
|
|
114
|
+
${chalk.cyan('imessage')} iMessage bağlantısı
|
|
115
|
+
${chalk.cyan('sms')} SMS (Twilio) bağlantısı
|
|
116
|
+
${chalk.cyan('channels')} Kanal yönetimi (list|status|add|remove|logs|login|logout|capabilities|resolve)
|
|
117
|
+
${chalk.cyan('message')} Cross-channel mesaj (send|broadcast|poll|react|read|edit|delete|search|pin|thread|sticker|role|moderation|event|timeout|kick|ban)
|
|
118
|
+
${chalk.cyan('gateway')} WebSocket gateway (start|stop|status|call|usage-cost|probe|discover|install|uninstall|health|restart|diagnostics|run)
|
|
119
|
+
|
|
120
|
+
${chalk.yellow('💻 Geliştirici Araçları')}
|
|
121
|
+
${chalk.cyan('git')} Git entegrasyonu
|
|
122
|
+
${chalk.cyan('mcp')} MCP sunucuları (serve|list|show|set|unset)
|
|
123
|
+
${chalk.cyan('skills')} Skill yönetimi (list|install|remove|update|create|search|browse|info|check)
|
|
124
|
+
${chalk.cyan('hooks')} Hook yönetimi (list|info|check|enable|disable|install|update)
|
|
125
|
+
${chalk.cyan('cron')} Zamanlanmış görevler (add|list|remove|get|edit|enable|disable|runs|run)
|
|
126
|
+
${chalk.cyan('sessions')} Oturum yönetimi (list|show|cleanup|prune)
|
|
127
|
+
${chalk.cyan('ultrareview')} Detaylı kod inceleme
|
|
128
|
+
${chalk.cyan('transcripts')} Transcript yönetimi (list|show|path|delete)
|
|
129
|
+
${chalk.cyan('wiki')} Wiki vault (status|init|ingest|compile|lint|search|get|apply|doctor|bridge import|obsidian)
|
|
130
|
+
|
|
131
|
+
${chalk.yellow('📊 Yönetim & Sistem')}
|
|
132
|
+
${chalk.cyan('dashboard')} Web kontrol paneli (open|status|url)
|
|
133
|
+
${chalk.cyan('memory')} Hafıza yönetimi (status|list|search|show|clear|index|export|import|semantic|wiki)
|
|
134
|
+
${chalk.cyan('logs')} Log yönetimi (tail|show|search|clear|path)
|
|
135
|
+
${chalk.cyan('status')} Sistem durumu (run|simple|usage)
|
|
136
|
+
${chalk.cyan('plugins')} Plugin yönetimi (list|install|uninstall|enable|disable|info|update|search|doctor|registry|marketplace)
|
|
137
|
+
${chalk.cyan('security')} Güvenlik denetimi (audit)
|
|
138
|
+
${chalk.cyan('reset')} Sıfırlama (config|workspace|all|list)
|
|
139
|
+
${chalk.cyan('uninstall')} Kaldırma (run|dry-run)
|
|
140
|
+
${chalk.cyan('system')} Sistem durumu/heartbeat/presence (status|heartbeat|presence)
|
|
141
|
+
${chalk.cyan('health')} Servis sağlık kontrolü (run|list|check)
|
|
142
|
+
${chalk.cyan('backup')} Yedekleme (create|list|restore|verify)
|
|
143
|
+
${chalk.cyan('secrets')} Gizli değerler (list|set|get|unset|audit|reload|configure|apply)
|
|
144
|
+
${chalk.cyan('approvals')} Onay politikası (add|pending|approve|reject)
|
|
145
|
+
${chalk.cyan('exec-policy')} Exec politikası (show|preset|set)
|
|
146
|
+
${chalk.cyan('workboard')} Görev/pano yönetimi
|
|
147
|
+
|
|
148
|
+
${chalk.yellow('🛰️ Ağ & Cihaz')}
|
|
149
|
+
${chalk.cyan('bonjour')} Ağ keşfi ve servis tarama
|
|
150
|
+
${chalk.cyan('dns')} Ağ keşfi — DNS (discover|resolve|setup)
|
|
151
|
+
${chalk.cyan('directory')} Dizin sorgulama (self|peers|search|register|remove)
|
|
152
|
+
${chalk.cyan('policy')} Workspace uyumluluk politikası
|
|
153
|
+
${chalk.cyan('voice')} Sesli sohbet yapılandırması
|
|
154
|
+
${chalk.cyan('clickclack')} Bildirim/beep kanalı
|
|
155
|
+
${chalk.cyan('admin-rpc')} HTTP admin RPC endpoint
|
|
156
|
+
${chalk.cyan('oc-path')} nc:// URI path handler
|
|
157
|
+
${chalk.cyan('thread-ownership')} Slack thread koordinasyonu
|
|
158
|
+
${chalk.cyan('device-pair')} Cihaz eşleştirme (QR kod)
|
|
159
|
+
${chalk.cyan('devices')} Cihaz yönetimi (list|pair|unpair|token|regenerate-token|rotate|revoke|clear)
|
|
160
|
+
${chalk.cyan('qr')} QR kod ile eşleştirme
|
|
161
|
+
${chalk.cyan('pairing')} Cihaz eşleştirme (list|approve|reject|generate)
|
|
162
|
+
|
|
163
|
+
${chalk.yellow('🔧 Altyapı')}
|
|
164
|
+
${chalk.cyan('daemon')} Gateway daemon (status|start|stop|restart)
|
|
165
|
+
${chalk.cyan('node')} Node host (run|status|install|uninstall|stop|restart)
|
|
166
|
+
${chalk.cyan('nodes')} Node network (list|pending|approve|reject|remove|rename|status|describe|invoke|notify|push|canvas|camera|screen|location)
|
|
167
|
+
${chalk.cyan('proxy')} Debug proxy (start|stop|status|run|coverage|sessions|query|blob|purge)
|
|
168
|
+
${chalk.cyan('sandbox')} Sandbox container (list|recreate|explain)
|
|
169
|
+
${chalk.cyan('capability')} Yetenek sorgulama (list|inspect)
|
|
170
|
+
${chalk.cyan('acp')} ACP endpoint (status|info)
|
|
171
|
+
${chalk.cyan('tui')} Terminal UI (start|local|status)
|
|
172
|
+
${chalk.cyan('path')} nc:// URI path yönetimi (resolve|find|set|validate|emit)
|
|
173
|
+
${chalk.cyan('clawbot')} Legacy clawbot (qr)
|
|
174
|
+
|
|
175
|
+
${chalk.yellow('📦 Medya & İçerik')}
|
|
176
|
+
${chalk.cyan('open-prose')} Prose skills bundle
|
|
177
|
+
${chalk.cyan('vydra')} Vydra medya sağlayıcı
|
|
178
|
+
${chalk.cyan('docs')} Dokümantasyon arama
|
|
179
|
+
${chalk.cyan('browser')} Browser automation (status|start|stop|tabs|open|close|navigate|screenshot|snapshot|click|type|press|resize|hover|drag|select|upload|fill|dialog|wait|evaluate|console|pdf|profiles|focus|reset-profile|create-profile|delete-profile)
|
|
180
|
+
|
|
181
|
+
${chalk.yellow('Örnekler:')}
|
|
182
|
+
${chalk.gray('$ natureco setup')} İlk kurulum
|
|
183
|
+
${chalk.gray('$ natureco onbord')} Onboarding
|
|
184
|
+
${chalk.gray('$ natureco chat')} Sohbet başlat
|
|
185
|
+
${chalk.gray('$ natureco code')} Code agent
|
|
186
|
+
${chalk.gray('$ natureco doctor')} Sistem kontrolü
|
|
187
|
+
${chalk.gray('$ natureco agent run "dosya oku"')} One-shot agent
|
|
188
|
+
${chalk.gray('$ natureco completion bash')} Shell completion
|
|
189
|
+
`);
|
|
190
|
+
|
|
191
|
+
program
|
|
192
|
+
.command('login')
|
|
193
|
+
.description('Login with your NatureCo API key')
|
|
194
|
+
.action(login);
|
|
195
|
+
|
|
196
|
+
program
|
|
197
|
+
.command('setup [action]')
|
|
198
|
+
.description('Run initial setup wizard (wizard|config|workspace|dirs|status)')
|
|
199
|
+
.action(async (action) => {
|
|
200
|
+
const setup = require('../src/commands/setup');
|
|
201
|
+
await setup(action ? [action] : []);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
program
|
|
205
|
+
.command('logout')
|
|
206
|
+
.description('Logout and remove stored credentials')
|
|
207
|
+
.action(logout);
|
|
208
|
+
|
|
209
|
+
program
|
|
210
|
+
.command('bots')
|
|
211
|
+
.description('List your AI bots')
|
|
212
|
+
.action(bots);
|
|
213
|
+
|
|
214
|
+
program
|
|
215
|
+
.command('chat [bot-name...]')
|
|
216
|
+
.description('Start interactive chat with a bot (uses default bot if not specified)')
|
|
217
|
+
.option('--resume [session-id]', 'Resume a previous session')
|
|
218
|
+
.option('--continue', 'son oturumu devam ettir')
|
|
219
|
+
.option('--list', 'geçmiş oturumları listele')
|
|
220
|
+
.option('--no-stream', 'streaming devre dışı')
|
|
221
|
+
.action((botNameParts, options) => {
|
|
222
|
+
const botName = Array.isArray(botNameParts) ? botNameParts.join(' ') : botNameParts;
|
|
223
|
+
chat(botName, options);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
program
|
|
227
|
+
.command('code [file]')
|
|
228
|
+
.description('Agentic coding modu v5 — Claude Code alternative (47 tools, TUI, auto tool selection)')
|
|
229
|
+
.option('--dir <path>', 'çalışma dizini', process.cwd())
|
|
230
|
+
.option('--no-stream', 'streaming devre dışı')
|
|
231
|
+
.option('--dry-run', 'değişiklikleri göster ama uygulama')
|
|
232
|
+
.option('--legacy', 'v2.23 eski code agent kullan')
|
|
233
|
+
.action((file, options) => {
|
|
234
|
+
if (options.legacy) {
|
|
235
|
+
const codeCmd = require('../src/commands/code');
|
|
236
|
+
codeCmd(file, options);
|
|
237
|
+
} else {
|
|
238
|
+
const codeV5 = require('../src/commands/code_v5');
|
|
239
|
+
codeV5(options.dir || (file ? path.dirname(path.resolve(file)) : null));
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
program
|
|
244
|
+
.command('init')
|
|
245
|
+
.description('Initialize NatureCo project in current directory')
|
|
246
|
+
.action(init);
|
|
247
|
+
|
|
248
|
+
program
|
|
249
|
+
.command('config <action> [key] [value...]')
|
|
250
|
+
.description('Manage configuration (get|set|unset|list|file|schema|validate|backups|restore)')
|
|
251
|
+
.action((action, key, value) => config([action, key, ...(value || [])]));
|
|
252
|
+
|
|
253
|
+
program
|
|
254
|
+
.command('skills [action] [params...]')
|
|
255
|
+
.description('Manage skills (list|install|remove|update|create|search|browse|info|check)')
|
|
256
|
+
.action((action, params) => {
|
|
257
|
+
const skillsCmd = require('../src/commands/skills');
|
|
258
|
+
skillsCmd([action, ...(params || [])]);
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
program
|
|
262
|
+
.command('ask <question>')
|
|
263
|
+
.description('Ask a single question to your default bot')
|
|
264
|
+
.option('--tools', 'araç kullanımını etkinleştir (varsayılan: kapalı — %90 daha az token)')
|
|
265
|
+
.action((question, options) => ask(question, options));
|
|
266
|
+
|
|
267
|
+
program
|
|
268
|
+
.command('run <script>')
|
|
269
|
+
.description('Run a markdown script file')
|
|
270
|
+
.action(run);
|
|
271
|
+
|
|
272
|
+
program
|
|
273
|
+
.command('mcp [action] [params...]')
|
|
274
|
+
.description('Manage MCP servers (list|add|remove|test|enable|disable|templates)')
|
|
275
|
+
.action((action, params) => {
|
|
276
|
+
const mcpCmd = require('../src/commands/mcp');
|
|
277
|
+
mcpCmd([action, ...(params || [])]);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
program
|
|
281
|
+
.command('update [action] [params...]')
|
|
282
|
+
.description('Update management (run|status|wizard)')
|
|
283
|
+
.action((action, params) => {
|
|
284
|
+
const updateCmd = require('../src/commands/update');
|
|
285
|
+
updateCmd([action, ...(params || [])]);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
program
|
|
289
|
+
.command('migrate')
|
|
290
|
+
.description('Migrate from other CLI tools (openclaw, claude-code, hermes)')
|
|
291
|
+
.option('--from <source>', 'Source CLI (openclaw, claude-code, hermes)', 'openclaw')
|
|
292
|
+
.option('--openclaw-dir <path>', 'OpenClaw directory path (default: ~/.openclaw)')
|
|
293
|
+
.action((options) => {
|
|
294
|
+
const migrateCmd = require('../src/commands/migrate');
|
|
295
|
+
migrateCmd(options);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
program
|
|
299
|
+
.command('commands [action] [params...]')
|
|
300
|
+
.description('Manage custom commands (list|create)')
|
|
301
|
+
.action((action, params) => {
|
|
302
|
+
const commandsCmd = require('../src/commands/commands');
|
|
303
|
+
commandsCmd(action, ...(params || []));
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
program
|
|
307
|
+
.command('cron <action>')
|
|
308
|
+
.option('--name <name>', 'Cron job adı')
|
|
309
|
+
.option('--schedule <schedule>', 'Cron schedule (örnek: "0 9 * * *")')
|
|
310
|
+
.option('--action <action>', 'Aksiyon: whatsapp veya telegram')
|
|
311
|
+
.option('--target <target>', 'Hedef numara veya chat ID')
|
|
312
|
+
.option('--prompt <prompt>', 'AI\'a gönderilecek prompt')
|
|
313
|
+
.description('Cron job yönetimi (add|list|remove|get|edit|enable|disable|runs|run)')
|
|
314
|
+
.action((action, options) => {
|
|
315
|
+
const cronCmd = require('../src/commands/cron');
|
|
316
|
+
cronCmd(action, options);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
program
|
|
320
|
+
.command('hooks [action] [params...]')
|
|
321
|
+
.description('Manage hooks (list|info|check|enable|disable|install|update)')
|
|
322
|
+
.action((action, params) => {
|
|
323
|
+
const hooksCmd = require('../src/commands/hooks');
|
|
324
|
+
hooksCmd([action, ...(params || [])]);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
program
|
|
328
|
+
.command('sessions [action] [params...]')
|
|
329
|
+
.description('Session management (list|show|cleanup|prune)')
|
|
330
|
+
.action((action, params) => {
|
|
331
|
+
const sessionsCmd = require('../src/commands/sessions');
|
|
332
|
+
sessionsCmd([action, ...(params || [])]);
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
program
|
|
336
|
+
.command('git <action>')
|
|
337
|
+
.description('Git integration (review|commit|pr|explain)')
|
|
338
|
+
.action((action) => {
|
|
339
|
+
const gitCmd = require('../src/commands/git');
|
|
340
|
+
gitCmd(action);
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
program
|
|
344
|
+
.command('tasks [action] [params...]')
|
|
345
|
+
.description('Manage background tasks (list|show|cancel|audit|maintenance|flow|summary|notify)')
|
|
346
|
+
.action((action, params) => {
|
|
347
|
+
const tasksCmd = require('../src/commands/tasks');
|
|
348
|
+
tasksCmd([action, ...(params || [])]);
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
program
|
|
352
|
+
.command('gateway [action]')
|
|
353
|
+
.description('WebSocket gateway (start|stop|status|call|usage-cost|probe|discover|install|uninstall|health|restart|diagnostics|run)')
|
|
354
|
+
.action((action) => {
|
|
355
|
+
if (action === 'stop' || action === 'status') {
|
|
356
|
+
const gatewayServerCmd = require('../src/commands/gateway-server');
|
|
357
|
+
gatewayServerCmd(action);
|
|
358
|
+
} else {
|
|
359
|
+
const args = process.argv.slice(3);
|
|
360
|
+
gateway(...args);
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
program
|
|
365
|
+
.command('ultrareview [file]')
|
|
366
|
+
.description('Ultra detailed code review')
|
|
367
|
+
.action((file) => {
|
|
368
|
+
const ultrareviewCmd = require('../src/commands/ultrareview');
|
|
369
|
+
ultrareviewCmd(file);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
program
|
|
373
|
+
.command('discord <action>')
|
|
374
|
+
.description('Discord integration (connect|disconnect|status)')
|
|
375
|
+
.action((action) => {
|
|
376
|
+
const discordCmd = require('../src/commands/discord');
|
|
377
|
+
discordCmd(action);
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
program
|
|
381
|
+
.command('slack <action>')
|
|
382
|
+
.description('Slack integration (connect|disconnect|status)')
|
|
383
|
+
.action((action) => {
|
|
384
|
+
const slackCmd = require('../src/commands/slack');
|
|
385
|
+
slackCmd(action);
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
program
|
|
389
|
+
.command('whatsapp <action> [number]')
|
|
390
|
+
.description('WhatsApp integration (connect|disconnect|status|allow)')
|
|
391
|
+
.action((action, number) => {
|
|
392
|
+
const whatsappCmd = require('../src/commands/whatsapp');
|
|
393
|
+
whatsappCmd(action, number);
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
program
|
|
397
|
+
.command('telegram <action> [chatId]')
|
|
398
|
+
.description('Telegram integration (connect|disconnect|status|allow)')
|
|
399
|
+
.action((action, chatId) => {
|
|
400
|
+
const telegramCmd = require('../src/commands/telegram');
|
|
401
|
+
telegramCmd(action, chatId);
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
program
|
|
405
|
+
.command('signal <action>')
|
|
406
|
+
.description('Signal integration (connect|disconnect|status)')
|
|
407
|
+
.action((action) => {
|
|
408
|
+
const signalCmd = require('../src/commands/signal');
|
|
409
|
+
signalCmd(action);
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
program
|
|
413
|
+
.command('irc <action>')
|
|
414
|
+
.description('IRC integration (connect|disconnect|status)')
|
|
415
|
+
.action((action) => {
|
|
416
|
+
const ircCmd = require('../src/commands/irc');
|
|
417
|
+
ircCmd(action);
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
program
|
|
421
|
+
.command('mattermost <action>')
|
|
422
|
+
.description('Mattermost integration (connect|disconnect|status)')
|
|
423
|
+
.action((action) => {
|
|
424
|
+
const mattermostCmd = require('../src/commands/mattermost');
|
|
425
|
+
mattermostCmd(action);
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
program
|
|
429
|
+
.command('imessage <action> [recipient] [message]')
|
|
430
|
+
.description('iMessage integration (connect|disconnect|status|probe|send)')
|
|
431
|
+
.action((action, recipient, message) => {
|
|
432
|
+
const imessageCmd = require('../src/commands/imessage');
|
|
433
|
+
imessageCmd(action, recipient, message);
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
program
|
|
437
|
+
.command('sms <action>')
|
|
438
|
+
.description('SMS/Twilio integration (connect|disconnect|status)')
|
|
439
|
+
.action((action) => {
|
|
440
|
+
const smsCmd = require('../src/commands/sms');
|
|
441
|
+
smsCmd(action);
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
program
|
|
445
|
+
.command('webhooks <action>')
|
|
446
|
+
.description('Webhook management (list|gmail)')
|
|
447
|
+
.action((action) => {
|
|
448
|
+
const webhooksCmd = require('../src/commands/webhooks');
|
|
449
|
+
webhooksCmd(process.argv.slice(3));
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
program
|
|
453
|
+
.command('message [action]')
|
|
454
|
+
.description('Unified cross-channel messaging (send|broadcast|poll|react|reactions|read|edit|delete|search|pin|unpin|pins|permissions|thread|emoji|sticker|role|channel|member|voice|event|timeout|kick|ban|moderation)')
|
|
455
|
+
.action((action) => {
|
|
456
|
+
const messageCmd = require('../src/commands/message');
|
|
457
|
+
const args = process.argv.slice(3);
|
|
458
|
+
messageCmd(args);
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
program
|
|
462
|
+
.command('dashboard [action]')
|
|
463
|
+
.description('Web Control UI (start|stop|status)')
|
|
464
|
+
.action((action) => {
|
|
465
|
+
const dashboardCmd = require('../src/commands/dashboard');
|
|
466
|
+
dashboardCmd(action);
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
program
|
|
470
|
+
.command('doctor')
|
|
471
|
+
.description('System diagnostics and health check')
|
|
472
|
+
.option('--fix', 'Automatically fix issues')
|
|
473
|
+
.action((options) => {
|
|
474
|
+
const doctorCmd = require('../src/commands/doctor');
|
|
475
|
+
const args = process.argv.slice(3);
|
|
476
|
+
doctorCmd(args);
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
program
|
|
480
|
+
.command('channels [action] [params...]')
|
|
481
|
+
.description('Manage connected channels (list|status|add|remove|logs|login|logout|capabilities|resolve)')
|
|
482
|
+
.action((action, params) => {
|
|
483
|
+
const channelsCmd = require('../src/commands/channels');
|
|
484
|
+
channelsCmd([action, ...(params || [])]);
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
program
|
|
488
|
+
.command('bonjour [action]')
|
|
489
|
+
.description('Network discovery (scan|discover|status) — find NatureCo services on LAN')
|
|
490
|
+
.action((action) => {
|
|
491
|
+
const bonjourCmd = require('../src/commands/bonjour');
|
|
492
|
+
const args = process.argv.slice(3);
|
|
493
|
+
bonjourCmd(args);
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
program
|
|
497
|
+
.command('policy [action]')
|
|
498
|
+
.description('Workspace policy checks (check|set|list|remove)')
|
|
499
|
+
.action((action) => {
|
|
500
|
+
const policyCmd = require('../src/commands/policy');
|
|
501
|
+
const args = process.argv.slice(3);
|
|
502
|
+
policyCmd(args);
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
program
|
|
506
|
+
.command('voice [action]')
|
|
507
|
+
.description('Voice configuration (status|providers|set) — manage TTS voice settings')
|
|
508
|
+
.action((action) => {
|
|
509
|
+
const voiceCmd = require('../src/commands/voice');
|
|
510
|
+
const args = process.argv.slice(3);
|
|
511
|
+
voiceCmd(args);
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
program
|
|
515
|
+
.command('clickclack [action]')
|
|
516
|
+
.description('ClickClack notification channel (status|test|enable|disable|listen|notify)')
|
|
517
|
+
.action((action) => {
|
|
518
|
+
const clickclackCmd = require('../src/commands/clickclack');
|
|
519
|
+
const args = process.argv.slice(3);
|
|
520
|
+
clickclackCmd(args);
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
program
|
|
524
|
+
.command('admin-rpc [action]')
|
|
525
|
+
.description('Admin HTTP RPC server (status|start|stop|call|methods)')
|
|
526
|
+
.action((action) => {
|
|
527
|
+
const args = process.argv.slice(3);
|
|
528
|
+
adminRpc(args);
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
program
|
|
532
|
+
.command('oc-path [action]')
|
|
533
|
+
.description('nc:// URI path handler (resolve|list|cat|ls)')
|
|
534
|
+
.action((action) => {
|
|
535
|
+
const args = process.argv.slice(3);
|
|
536
|
+
ocPath(args);
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
program
|
|
540
|
+
.command('workboard [action]')
|
|
541
|
+
.description('Work board (show|add|move|remove|clear|columns|export|import)')
|
|
542
|
+
.action((action) => {
|
|
543
|
+
const args = process.argv.slice(3);
|
|
544
|
+
workboard(args);
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
program
|
|
548
|
+
.command('thread-ownership [action]')
|
|
549
|
+
.description('Thread ownership (status|list|assign|release|check|agent)')
|
|
550
|
+
.action((action) => {
|
|
551
|
+
const args = process.argv.slice(3);
|
|
552
|
+
threadOwnership(args);
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
program
|
|
556
|
+
.command('device-pair [action]')
|
|
557
|
+
.description('Device pairing (list|request|approve|reject|remove|pairing-code|verify)')
|
|
558
|
+
.action((action) => {
|
|
559
|
+
const args = process.argv.slice(3);
|
|
560
|
+
devicePair(args);
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
program
|
|
564
|
+
.command('open-prose [action]')
|
|
565
|
+
.description('OpenProse skills bundle (list|info)')
|
|
566
|
+
.action((action) => {
|
|
567
|
+
const args = process.argv.slice(3);
|
|
568
|
+
openProse(args);
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
program
|
|
572
|
+
.command('vydra [action]')
|
|
573
|
+
.description('Vydra media provider (status|configure|test)')
|
|
574
|
+
.action((action) => {
|
|
575
|
+
const args = process.argv.slice(3);
|
|
576
|
+
vydra(args);
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
program
|
|
580
|
+
.command('models [action] [params...]')
|
|
581
|
+
.description('Manage AI models (list|set|scan|aliases|fallbacks|set-image|image-fallbacks)')
|
|
582
|
+
.allowUnknownOption()
|
|
583
|
+
.action((action, params) => {
|
|
584
|
+
const modelsCmd = require('../src/commands/models');
|
|
585
|
+
const allArgs = process.argv.slice(process.argv.indexOf('models') + 1);
|
|
586
|
+
modelsCmd(allArgs);
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
program
|
|
590
|
+
.command('audit [action] [params...]')
|
|
591
|
+
.description('Audit log görüntüleyici (today|stats|show|search|files|cleanup|tail)')
|
|
592
|
+
.action((action, params) => {
|
|
593
|
+
audit(action ? [action, ...(params || [])] : ['today']);
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
program
|
|
597
|
+
.command('cost [action] [params...]')
|
|
598
|
+
.description('Maliyet takibi (today|week|month|all|budget|set|model|prices)')
|
|
599
|
+
.action((action, params) => {
|
|
600
|
+
cost(action ? [action, ...(params || [])] : ['today']);
|
|
601
|
+
});
|
|
602
|
+
|
|
603
|
+
program
|
|
604
|
+
.command('naturehub [action] [params...]')
|
|
605
|
+
.description('Nature Hub\'a içerik yayınla (post|list|trending|config)')
|
|
606
|
+
.action((action, params) => {
|
|
607
|
+
naturehub(action ? [action, ...(params || [])] : []);
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
program
|
|
611
|
+
.command('medium [action] [params...]')
|
|
612
|
+
.description('Medium makale yayınla (draft|publish|list)')
|
|
613
|
+
.action((action, params) => {
|
|
614
|
+
medium(action ? [action, ...(params || [])] : []);
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
program
|
|
618
|
+
.command('seo [action] [params...]')
|
|
619
|
+
.description('SEO analizi (audit|meta|speed)')
|
|
620
|
+
.action((action, params) => {
|
|
621
|
+
seo(action ? [action, ...(params || [])] : []);
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
program
|
|
625
|
+
.command('xp [action]')
|
|
626
|
+
.description('NatureCo XP/Level sistemi')
|
|
627
|
+
.action((action) => {
|
|
628
|
+
xp(action ? [action] : []);
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
program
|
|
632
|
+
.command('tools [action] [name]')
|
|
633
|
+
.description('Tool registry (list|enable|disable)')
|
|
634
|
+
.action((action, name) => {
|
|
635
|
+
tools(action ? [action, name].filter(Boolean) : []);
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
program
|
|
639
|
+
.command('team [action] [params...]')
|
|
640
|
+
.description('Multi-agent orkestrasyon (list|status|spawn|parallel)')
|
|
641
|
+
.action((action, params) => {
|
|
642
|
+
team(action ? [action, ...(params || [])] : []);
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
program
|
|
646
|
+
.command('repl [options...]')
|
|
647
|
+
.description('İnteraktif REPL — bizim bu konuşmamız gibi sohbet modu')
|
|
648
|
+
.option('--resume [id]', 'Önceki oturumu yükle')
|
|
649
|
+
.action((options) => {
|
|
650
|
+
const resumeOpt = options.resume ? [options.resume === true ? 'last' : options.resume] : [];
|
|
651
|
+
repl(options._args || resumeOpt);
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
program
|
|
655
|
+
.command('memory [action] [params...]')
|
|
656
|
+
.description('Manage memory (status|list|search|show|clear|index|export|import|semantic|wiki)')
|
|
657
|
+
.action((action, params) => {
|
|
658
|
+
const memoryCmd = require('../src/commands/memory-cmd');
|
|
659
|
+
memoryCmd([action, ...(params || [])]);
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
program
|
|
663
|
+
.command('logs [action] [params...]')
|
|
664
|
+
.description('View and manage logs (tail|show|search|clear|path)')
|
|
665
|
+
.action((action, params) => {
|
|
666
|
+
const logsCmd = require('../src/commands/logs');
|
|
667
|
+
logsCmd([action, ...(params || [])]);
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
program
|
|
671
|
+
.command('status [action] [params...]')
|
|
672
|
+
.description('Show system status (run|simple|usage)')
|
|
673
|
+
.action((action, params) => {
|
|
674
|
+
const statusCmd = require('../src/commands/status');
|
|
675
|
+
statusCmd([action, ...(params || [])]);
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
program
|
|
679
|
+
.command('reset')
|
|
680
|
+
.description('Reset local config/state')
|
|
681
|
+
.option('--scope <scope>', 'Scope: config|memory|sessions|full', 'config')
|
|
682
|
+
.option('--yes, -y', 'Skip confirmation')
|
|
683
|
+
.action(() => {
|
|
684
|
+
const resetModule = require('../src/commands/reset');
|
|
685
|
+
const resetFn = resetModule.reset || resetModule;
|
|
686
|
+
resetFn(process.argv.slice(3));
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
program
|
|
690
|
+
.command('security [action]')
|
|
691
|
+
.description('Security audit (audit)')
|
|
692
|
+
.option('--fix', 'Auto-fix issues')
|
|
693
|
+
.option('--json', 'JSON output')
|
|
694
|
+
.action((action) => {
|
|
695
|
+
const securityCmd = require('../src/commands/security');
|
|
696
|
+
securityCmd(process.argv.slice(3));
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
program
|
|
700
|
+
.command('agents [action] [params...]')
|
|
701
|
+
.description('Manage agents/bots (list|set|info|add|bindings|bind|unbind|set-identity)')
|
|
702
|
+
.action((action, params) => {
|
|
703
|
+
const agentsCmd = require('../src/commands/agents');
|
|
704
|
+
agentsCmd([action, ...(params || [])]);
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
program
|
|
708
|
+
.command('plugins [action] [params...]')
|
|
709
|
+
.description('Manage plugins (list|install|uninstall|enable|disable|info|update|search|doctor|registry)')
|
|
710
|
+
.action((action, params) => {
|
|
711
|
+
const pluginsCmd = require('../src/commands/plugins');
|
|
712
|
+
pluginsCmd([action, ...(params || [])]);
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
program
|
|
716
|
+
.command('pairing [action] [params...]')
|
|
717
|
+
.description('Manage device pairings (list|approve|reject)')
|
|
718
|
+
.action((action, params) => {
|
|
719
|
+
const pairingCmd = require('../src/commands/pairing');
|
|
720
|
+
pairingCmd([action, ...(params || [])]);
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
program
|
|
724
|
+
.command('uninstall')
|
|
725
|
+
.description('Uninstall NatureCo CLI data')
|
|
726
|
+
.option('--all', 'Remove all data including config')
|
|
727
|
+
.option('--yes, -y', 'Skip confirmation')
|
|
728
|
+
.option('--dry-run', 'Preview actions without executing')
|
|
729
|
+
.action(() => {
|
|
730
|
+
const uninstallCmd = require('../src/commands/uninstall');
|
|
731
|
+
uninstallCmd(process.argv.slice(3));
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
// === OpenClaw uyumlu komutlar ===
|
|
735
|
+
|
|
736
|
+
program
|
|
737
|
+
.command('agent <action> [args...]')
|
|
738
|
+
.description('One-shot agent task (run|abort|tail|logs)')
|
|
739
|
+
.action((action, args) => {
|
|
740
|
+
agent([action, ...(args || [])]);
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
program
|
|
744
|
+
.command('approvals <action> [text...]')
|
|
745
|
+
.description('Exec approval policy (list|allow|deny|status)')
|
|
746
|
+
.action((action, text) => {
|
|
747
|
+
approvals([action, ...(text || [])]);
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
program
|
|
751
|
+
.command('backup <action>')
|
|
752
|
+
.description('Backup management (create|list|restore|verify)')
|
|
753
|
+
.action((action) => {
|
|
754
|
+
backup([action]);
|
|
755
|
+
});
|
|
756
|
+
|
|
757
|
+
program
|
|
758
|
+
.command('capability [action]')
|
|
759
|
+
.description('Query agent capabilities (list|infer)')
|
|
760
|
+
.action((action) => {
|
|
761
|
+
const args = process.argv.slice(3);
|
|
762
|
+
capability(args);
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
program
|
|
766
|
+
.command('commitments <action> [text...]')
|
|
767
|
+
.description('Manage action commitments (list|add|check|resolve|summary|pending|done)')
|
|
768
|
+
.action((action, text) => {
|
|
769
|
+
commitments([action, ...(text || [])]);
|
|
770
|
+
});
|
|
771
|
+
|
|
772
|
+
program
|
|
773
|
+
.command('completion <shell>')
|
|
774
|
+
.description('Generate shell completion script (bash|zsh|fish|powershell)')
|
|
775
|
+
.action((shell) => {
|
|
776
|
+
completion(shell);
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
program
|
|
780
|
+
.command('configure')
|
|
781
|
+
.description('Interactive configuration wizard')
|
|
782
|
+
.action(() => {
|
|
783
|
+
configure(process.argv.slice(3));
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
program
|
|
787
|
+
.command('crestodian [action]')
|
|
788
|
+
.description('Crestodian repair assistant (repair|analyze|plan)')
|
|
789
|
+
.action((action) => {
|
|
790
|
+
const args = process.argv.slice(3);
|
|
791
|
+
crestodian(args);
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
program
|
|
795
|
+
.command('daemon <action>')
|
|
796
|
+
.description('Gateway daemon management (status|start|stop|restart)')
|
|
797
|
+
.action((action) => {
|
|
798
|
+
daemon([action, ...process.argv.slice(4)]);
|
|
799
|
+
});
|
|
800
|
+
|
|
801
|
+
program
|
|
802
|
+
.command('devices [action]')
|
|
803
|
+
.description('Device management (list|pair|unpair|token|regenerate-token|rotate|revoke|clear)')
|
|
804
|
+
.action((action) => {
|
|
805
|
+
const args = process.argv.slice(3);
|
|
806
|
+
devices(args);
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
program
|
|
810
|
+
.command('directory <action>')
|
|
811
|
+
.description('Directory query (query|search)')
|
|
812
|
+
.action((action) => {
|
|
813
|
+
const args = process.argv.slice(3);
|
|
814
|
+
directory(args);
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
program
|
|
818
|
+
.command('dns <action>')
|
|
819
|
+
.description('Network DNS discovery (discover|resolve)')
|
|
820
|
+
.action((action) => {
|
|
821
|
+
const args = process.argv.slice(3);
|
|
822
|
+
dns(args);
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
program
|
|
826
|
+
.command('docs [query...]')
|
|
827
|
+
.description('Documentation search')
|
|
828
|
+
.action((query) => {
|
|
829
|
+
docs(query || []);
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
program
|
|
833
|
+
.command('exec-policy [action]')
|
|
834
|
+
.description('Exec policy management (show|preset|set)')
|
|
835
|
+
.action((action) => {
|
|
836
|
+
const args = process.argv.slice(3);
|
|
837
|
+
execPolicy(args);
|
|
838
|
+
});
|
|
839
|
+
|
|
840
|
+
program
|
|
841
|
+
.command('health [action]')
|
|
842
|
+
.description('Service health check')
|
|
843
|
+
.action((action) => {
|
|
844
|
+
const args = process.argv.slice(3);
|
|
845
|
+
health(args);
|
|
846
|
+
});
|
|
847
|
+
|
|
848
|
+
program
|
|
849
|
+
.command('infer [action]')
|
|
850
|
+
.description('Infer capabilities/models/media (models|media|capabilities|model run|auth|image|audio|tts|video|web|embedding)')
|
|
851
|
+
.action((action) => {
|
|
852
|
+
const args = process.argv.slice(3);
|
|
853
|
+
infer(args);
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
program
|
|
857
|
+
.command('node <action>')
|
|
858
|
+
.description('Node host management (run|status|install|uninstall|stop|restart)')
|
|
859
|
+
.action((action) => {
|
|
860
|
+
const args = process.argv.slice(3);
|
|
861
|
+
node(args);
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
program
|
|
865
|
+
.command('nodes [action]')
|
|
866
|
+
.description('Node network management (list|pending|approve|reject|remove|rename|status|describe|invoke|notify|push|canvas|camera|screen|location)')
|
|
867
|
+
.action((action) => {
|
|
868
|
+
const args = process.argv.slice(3);
|
|
869
|
+
nodes(args);
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
program
|
|
873
|
+
.command('onboard')
|
|
874
|
+
.description('Interactive onboarding wizard')
|
|
875
|
+
.action(() => {
|
|
876
|
+
onboard(process.argv.slice(3));
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
program
|
|
880
|
+
.command('proxy [action]')
|
|
881
|
+
.description('Debug proxy server (start|stop|status|run|coverage|sessions|query|blob|purge)')
|
|
882
|
+
.action((action) => {
|
|
883
|
+
const args = process.argv.slice(3);
|
|
884
|
+
proxy(args);
|
|
885
|
+
});
|
|
886
|
+
|
|
887
|
+
program
|
|
888
|
+
.command('qr [action]')
|
|
889
|
+
.description('QR code pairing (show|generate|verify)')
|
|
890
|
+
.action((action) => {
|
|
891
|
+
const args = process.argv.slice(3);
|
|
892
|
+
qr(args);
|
|
893
|
+
});
|
|
894
|
+
|
|
895
|
+
program
|
|
896
|
+
.command('sandbox <action>')
|
|
897
|
+
.description('Sandbox container management (list|create|destroy)')
|
|
898
|
+
.action((action) => {
|
|
899
|
+
sandbox([action]);
|
|
900
|
+
});
|
|
901
|
+
|
|
902
|
+
program
|
|
903
|
+
.command('secrets [action]')
|
|
904
|
+
.description('Secret value management (list|set|get|unset|audit|reload|configure|apply)')
|
|
905
|
+
.action((action) => {
|
|
906
|
+
const args = process.argv.slice(3);
|
|
907
|
+
secrets(args);
|
|
908
|
+
});
|
|
909
|
+
|
|
910
|
+
program
|
|
911
|
+
.command('system <action>')
|
|
912
|
+
.description('System status/heartbeat/presence (status|heartbeat|presence)')
|
|
913
|
+
.action((action) => {
|
|
914
|
+
system([action]);
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
program
|
|
918
|
+
.command('terminal <action> [text...]')
|
|
919
|
+
.description('Terminal session management (exec|connect|disconnect|list)')
|
|
920
|
+
.action((action, text) => {
|
|
921
|
+
terminal([action, ...(text || [])]);
|
|
922
|
+
});
|
|
923
|
+
|
|
924
|
+
program
|
|
925
|
+
.command('transcripts [action]')
|
|
926
|
+
.description('Transcript management (list|show|delete)')
|
|
927
|
+
.action((action) => {
|
|
928
|
+
const args = process.argv.slice(3);
|
|
929
|
+
transcripts(args);
|
|
930
|
+
});
|
|
931
|
+
|
|
932
|
+
program
|
|
933
|
+
.command('wiki [action] [params...]')
|
|
934
|
+
.description('Wiki/knowledge base (status|init|ingest|compile|lint|search|get|apply|doctor|bridge import|unsafe-local import|obsidian)')
|
|
935
|
+
.action((action, params) => {
|
|
936
|
+
wiki([action, ...(params || [])]);
|
|
937
|
+
});
|
|
938
|
+
|
|
939
|
+
program
|
|
940
|
+
.command('browser [action] [params...]')
|
|
941
|
+
.description('Browser automation (status|start|stop|tabs|open|close|navigate|screenshot|snapshot|click|type|press|resize|hover|drag|select|upload|fill|dialog|wait|evaluate|console|pdf|profiles|focus|reset-profile|create-profile|delete-profile)')
|
|
942
|
+
.action((action, params) => {
|
|
943
|
+
browser([action, ...(params || [])]);
|
|
944
|
+
});
|
|
945
|
+
|
|
946
|
+
program
|
|
947
|
+
.command('path [action] [params...]')
|
|
948
|
+
.description('nc:// URI path management (resolve|find|set|validate|emit)')
|
|
949
|
+
.action((action, params) => {
|
|
950
|
+
const pathCmd = require('../src/commands/path');
|
|
951
|
+
pathCmd([action, ...(params || [])]);
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
program
|
|
955
|
+
.command('clawbot [action] [params...]')
|
|
956
|
+
.description('Legacy clawbot namespace (qr)')
|
|
957
|
+
.action((action, params) => {
|
|
958
|
+
const clawbotCmd = require('../src/commands/clawbot');
|
|
959
|
+
clawbotCmd([action, ...(params || [])]);
|
|
960
|
+
});
|
|
961
|
+
|
|
962
|
+
// === OpenClaw uyumlu alias komutlar ===
|
|
963
|
+
|
|
964
|
+
program
|
|
965
|
+
.command('acp [file]')
|
|
966
|
+
.description('Alias for code command')
|
|
967
|
+
.action((file) => {
|
|
968
|
+
const codeCmd = require('../src/commands/code');
|
|
969
|
+
codeCmd(file, { dir: process.cwd() });
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
program
|
|
973
|
+
.command('web-fetch [url]')
|
|
974
|
+
.description('Fetch a URL and convert to markdown')
|
|
975
|
+
.action(async (url) => {
|
|
976
|
+
const webFetch = require('../src/commands/web-fetch');
|
|
977
|
+
await webFetch(url);
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
program
|
|
981
|
+
.command('help')
|
|
982
|
+
.description('Show help information')
|
|
983
|
+
.action(help);
|
|
984
|
+
|
|
985
|
+
// Yardım çıktısı için colors
|
|
986
|
+
program.configureHelp({
|
|
987
|
+
sortSubcommands: true,
|
|
988
|
+
showGlobalOptions: true,
|
|
989
|
+
});
|
|
990
|
+
|
|
991
|
+
// Global options
|
|
992
|
+
program
|
|
993
|
+
.option('--no-splash', 'Splash animasyonunu atla')
|
|
994
|
+
.option('--plain', 'Düz metin (renk ve animasyon yok)')
|
|
995
|
+
.option('--profile <name>', 'Farklı profil kullan (multi-account)')
|
|
996
|
+
.allowUnknownOption(); // kendi custom option'larımız için
|
|
997
|
+
|
|
998
|
+
// ════════════════════════════════════════════════════════════
|
|
999
|
+
// First-run akışı: setup yoksa otomatik wizard'a yönlendir
|
|
1000
|
+
// ════════════════════════════════════════════════════════════
|
|
1001
|
+
const path = require('path');
|
|
1002
|
+
const fs = require('fs');
|
|
1003
|
+
const os = require('os');
|
|
1004
|
+
const brand = require('../src/utils/branding');
|
|
1005
|
+
const tui = require('../src/utils/tui');
|
|
1006
|
+
tui.init();
|
|
1007
|
+
const { firstRunScreen } = brand;
|
|
1008
|
+
|
|
1009
|
+
const argv = process.argv.slice(2);
|
|
1010
|
+
|
|
1011
|
+
// Global option'ları filtrele — bunlar command değil
|
|
1012
|
+
const GLOBAL_FLAGS = ['--no-splash', '--plain', '--profile'];
|
|
1013
|
+
const realArgs = argv.filter(a => !GLOBAL_FLAGS.includes(a) && !a.startsWith('--profile='));
|
|
1014
|
+
const hasCommand = realArgs.length > 0;
|
|
1015
|
+
const CONFIG_DIR = path.join(os.homedir(), '.natureco');
|
|
1016
|
+
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
|
|
1017
|
+
|
|
1018
|
+
// Yardım/versiyon için asla first-run'a sokma
|
|
1019
|
+
const skipFirstRun = argv.includes('--help') || argv.includes('-h')
|
|
1020
|
+
|| argv.includes('--version') || argv.includes('-V')
|
|
1021
|
+
|| argv[0] === 'help' || argv[0] === 'setup' || argv[0] === 'update'
|
|
1022
|
+
|| argv[0] === 'doctor' || argv[0] === 'uninstall';
|
|
1023
|
+
|
|
1024
|
+
// --no-splash flag'i ile splash atlanabilsin
|
|
1025
|
+
const noSplash = argv.includes('--no-splash') || process.env.NATURECO_NO_SPLASH;
|
|
1026
|
+
|
|
1027
|
+
function needsFirstRun() {
|
|
1028
|
+
try {
|
|
1029
|
+
if (!fs.existsSync(CONFIG_FILE)) return true;
|
|
1030
|
+
const cfg = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
|
|
1031
|
+
return !cfg.setupCompleted;
|
|
1032
|
+
} catch {
|
|
1033
|
+
return true;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
async function handleNoArgs() {
|
|
1038
|
+
if (!hasCommand) {
|
|
1039
|
+
// Splash animasyonu (sadece TTY'de ve --no-splash yoksa)
|
|
1040
|
+
if (!noSplash && tui.CAPS.isTTY && !process.env.CI) {
|
|
1041
|
+
await tui.splash({
|
|
1042
|
+
title: 'NatureCo CLI',
|
|
1043
|
+
version: packageJson.version,
|
|
1044
|
+
subtitle: 'OpenClaw\'dan daha güvenli, daha hızlı, daha ucuz',
|
|
1045
|
+
duration: 1200,
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
if (!skipFirstRun && needsFirstRun()) {
|
|
1050
|
+
if (tui.CAPS.isTTY && !noSplash) {
|
|
1051
|
+
console.log('\n' + tui.C.amber(' ⌥ İlk kurulum hoş geldin! Hızlıca ayarlayalım.\n'));
|
|
1052
|
+
} else {
|
|
1053
|
+
console.log(firstRunScreen());
|
|
1054
|
+
}
|
|
1055
|
+
const setup = require('../src/commands/setup');
|
|
1056
|
+
await setup(['wizard']);
|
|
1057
|
+
console.log('\n');
|
|
1058
|
+
const userName = require('os').userInfo().username;
|
|
1059
|
+
console.log(tui.welcomeCard({
|
|
1060
|
+
version: packageJson.version,
|
|
1061
|
+
user: { name: userName },
|
|
1062
|
+
status: tui.C.green('✓ Aktif'),
|
|
1063
|
+
tips: brand.pickDailyTip(),
|
|
1064
|
+
}));
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
// Normal kullanım — welcome card
|
|
1068
|
+
const userName = require('os').userInfo().username;
|
|
1069
|
+
let loginStatus = 'ok';
|
|
1070
|
+
try {
|
|
1071
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
1072
|
+
const cfg = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
|
|
1073
|
+
if (!cfg.providerApiKey && !cfg.apiKey) loginStatus = 'needed';
|
|
1074
|
+
} else {
|
|
1075
|
+
loginStatus = 'needed';
|
|
1076
|
+
}
|
|
1077
|
+
} catch { loginStatus = 'unknown'; }
|
|
1078
|
+
console.log('\n' + tui.welcomeCard({
|
|
1079
|
+
version: packageJson.version,
|
|
1080
|
+
user: { name: userName },
|
|
1081
|
+
status: loginStatus === 'ok' ? tui.C.green('✓ Aktif') : tui.C.amber('⚠ API key gerekli'),
|
|
1082
|
+
tips: brand.pickDailyTip(),
|
|
1083
|
+
}));
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
// Global option'ları filtrele (--no-splash, --plain, --profile) ve parse et
|
|
1087
|
+
const opts = program.opts();
|
|
1088
|
+
if (opts.profile) {
|
|
1089
|
+
process.env.NATURECO_PROFILE = opts.profile;
|
|
1090
|
+
// TODO: profile dizinini değiştir
|
|
1091
|
+
}
|
|
1092
|
+
if (opts.plain) {
|
|
1093
|
+
process.env.FORCE_COLOR = '0';
|
|
1094
|
+
process.env.NATURECO_NO_SPLASH = '1';
|
|
1095
|
+
}
|
|
1096
|
+
program.parse(process.argv);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
handleNoArgs();
|