lc-cli 0.1.3

LLM Client - A fast Rust-based LLM CLI tool with provider management and chat sessions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
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
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
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
{
  "lc": {
    "description": "LLM Client - A fast Rust-based LLM CLI tool",
    "options": [
      "-p, --provider <PROVIDER>",
      "-m, --model <MODEL>",
      "-s, --system <SYSTEM_PROMPT>",
      "--max-tokens <MAX_TOKENS>",
      "--temperature <TEMPERATURE>",
      "-a, --attach <ATTACHMENTS>",
      "-t, --tools <TOOLS>",
      "-v, --vectordb <VECTORDB>",
      "-d, --debug",
      "-c, --continue",
      "--cid <CHAT_ID>",
      "-h, --help",
      "-V, --version"
    ],
    "commands": {
      "providers": {
        "description": "Provider management (alias: p)",
        "commands": {
          "add": {
            "description": "Add a new provider (alias: a)",
            "arguments": [
              "<NAME>",
              "<URL>"
            ],
            "options": [
              "-m, --models-path <MODELS_PATH>",
              "-c, --chat-path <CHAT_PATH>",
              "-h, --help"
            ]
          },
          "update": {
            "description": "Update an existing provider (alias: u)",
            "arguments": [
              "<NAME>",
              "<URL>"
            ],
            "options": [
              "-h, --help"
            ]
          },
          "remove": {
            "description": "Remove a provider (alias: r)",
            "arguments": [
              "<NAME>"
            ],
            "options": [
              "-h, --help"
            ]
          },
          "list": {
            "description": "List all providers (alias: l)",
            "options": [
              "-h, --help"
            ]
          },
          "models": {
            "description": "List available models for a provider (alias: m)",
            "arguments": [
              "<NAME>"
            ],
            "options": [
              "-r, --refresh",
              "-h, --help"
            ]
          },
          "headers": {
            "description": "Manage custom headers for a provider (alias: h)",
            "commands": {
              "add": {
                "description": "Add a custom header (alias: a)",
                "arguments": [
                  "<NAME>",
                  "<VALUE>"
                ],
                "options": [
                  "-h, --help"
                ]
              }
            },
            "arguments": [
              "<PROVIDER>"
            ],
            "options": ["-h, --help"]
          },
          "token-url": {
            "description": "Set token URL for a provider (alias: t)",
            "arguments": [
              "<PROVIDER>",
              "<URL>"
            ],
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "keys": {
        "description": "API key management (alias: k)",
        "commands": {
          "add": {
            "description": "Add API key for a provider (alias: a)",
            "arguments": [
              "<NAME>"
            ],
            "options": ["-h, --help"]
          },
          "list": {
            "description": "List providers with API keys (alias: l)",
            "options": ["-h, --help"]
          },
          "get": {
            "description": "Get API key for a provider (alias: g)",
            "arguments": [
              "<NAME>"
            ],
            "options": ["-h, --help"]
          },
          "remove": {
            "description": "Remove API key for a provider (alias: r)",
            "arguments": [
              "<NAME>"
            ],
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "logs": {
        "description": "Log management (alias: l)",
        "commands": {
          "show": {
            "description": "Show all logs (alias: sh)",
            "options": [
              "--minimal",
              "-h, --help"
            ]
          },
          "stats": {
            "description": "Show database statistics (alias: s)",
            "options": ["-h, --help"]
          },
          "purge": {
            "description": "Purge all logs (alias: p)",
            "options": [
              "--yes",
              "-h, --help"
            ]
          },
          "recent": {
            "description": "Show recent logs (alias: r)",
            "commands": {
              "answer": {
                "description": "Get last answer from LLM (alias: a)",
                "options": ["-h, --help"]
              },
              "question": {
                "description": "Get last question/prompt asked to LLM (alias: q)",
                "options": ["-h, --help"]
              },
              "model": {
                "description": "Get model used in last interaction (alias: m)",
                "options": ["-h, --help"]
              },
              "session": {
                "description": "Get session ID of last interaction (alias: s)",
                "options": ["-h, --help"]
              }
            },
            "options": [
              "-c, --count <COUNT>",
              "-h, --help"
            ]
          },
          "current": {
            "description": "Show current session logs (alias: c)",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "config": {
        "description": "Configuration management (alias: co)",
        "commands": {
          "set": {
            "description": "Set configuration values (alias: s)",
            "commands": {
              "provider": {
                "description": "Set default provider (alias: p)",
                "options": ["-h, --help"]
              },
              "model": {
                "description": "Set default model (alias: m)",
                "options": ["-h, --help"]
              },
              "system-prompt": {
                "description": "Set system prompt (alias: s)",
                "options": ["-h, --help"]
              },
              "max-tokens": {
                "description": "Set max tokens (alias: mt)",
                "options": ["-h, --help"]
              },
              "temperature": {
                "description": "Set temperature (alias: te)",
                "options": ["-h, --help"]
              }
            },
            "options": ["-h, --help"]
          },
          "get": {
            "description": "Get configuration values (alias: g)",
            "commands": {
              "provider": {
                "description": "Get default provider (alias: p)",
                "options": ["-h, --help"]
              },
              "model": {
                "description": "Get default model (alias: m)",
                "options": ["-h, --help"]
              },
              "system-prompt": {
                "description": "Get system prompt (alias: s)",
                "options": ["-h, --help"]
              },
              "max-tokens": {
                "description": "Get max tokens (alias: mt)",
                "options": ["-h, --help"]
              },
              "temperature": {
                "description": "Get temperature (alias: te)",
                "options": ["-h, --help"]
              }
            },
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "models": {
        "description": "Global models management (alias: m)",
        "commands": {
          "refresh": {
            "description": "Refresh the models cache (alias: r)",
            "options": ["-h, --help"]
          },
          "info": {
            "description": "Show cache information (alias: i)",
            "options": ["-h, --help"]
          },
          "dump": {
            "description": "Dump raw /models responses to JSON files (alias: d)",
            "options": ["-h, --help"]
          },
          "embed": {
            "description": "List embedding models (alias: e)",
            "options": ["-h, --help"]
          }
        },
        "options": [
          "-q, --query <QUERY>",
          "--tools",
          "--reasoning",
          "--vision",
          "--audio",
          "--code",
          "--ctx <CONTEXT_LENGTH>",
          "--input <INPUT_LENGTH>",
          "--output <OUTPUT_LENGTH>",
          "--input-price <INPUT_PRICE>",
          "--output-price <OUTPUT_PRICE>",
          "-h, --help"
        ]
      },
      "alias": {
        "description": "Model alias management (alias: a)",
        "commands": {
          "add": {
            "description": "Add a new alias (alias: a)",
            "arguments": [
              "<NAME>",
              "<TARGET>"
            ],
            "options": ["-h, --help"]
          },
          "delete": {
            "description": "Remove an alias (alias: d)",
            "arguments": [
              "<NAME>"
            ],
            "options": ["-h, --help"]
          },
          "list": {
            "description": "List all aliases (alias: l)",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "templates": {
        "description": "Template management (alias: t)",
        "commands": {
          "add": {
            "description": "Add a new template (alias: a)",
            "arguments": [
              "<NAME>"
            ],
            "options": ["-h, --help"]
          },
          "delete": {
            "description": "Remove a template (alias: d)",
            "arguments": [
              "<NAME>"
            ],
            "options": ["-h, --help"]
          },
          "list": {
            "description": "List all templates (alias: l)",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "proxy": {
        "description": "Proxy server (alias: pr)",
        "options": [
          {
            "name": "-p, --port <PORT>",
            "description": "Port to listen on",
            "default": "6789"
          },
          {
            "name": "-h, --host <HOST>",
            "description": "Host to bind to",
            "default": "127.0.0.1"
          },
          {
            "name": "--provider <PROVIDER>",
            "description": "Filter by provider"
          },
          {
            "name": "-m, --model <MODEL>",
            "description": "Filter by specific model (can be provider:model or alias)"
          },
          {
            "name": "-k, --key <API_KEY>",
            "description": "API key for authentication"
          },
          {
            "name": "-g, --generate-key",
            "description": "Generate a random API key"
          },
          {
            "name": "-h, --help",
            "description": "Print help"
          }
        ]
      },
      "mcp": {
        "description": "MCP server management",
        "commands": {
          "add": {
            "description": "Add a new MCP server (alias: a)",
            "arguments": [
              "<NAME>",
              "<COMMAND_OR_URL>"
            ],
            "options": [
              {
                "name": "--type <SERVER_TYPE>",
                "description": "MCP server type",
                "values": ["stdio", "sse", "streamable"]
              },
              {
                "name": "-e, --env <ENV>",
                "description": "Environment variables (can be specified multiple times as KEY=VALUE)"
              },
              "-h, --help"
            ]
          },
          "delete": {
            "description": "Delete an MCP server configuration (alias: d)",
            "options": ["-h, --help"]
          },
          "list": {
            "description": "List all configured MCP servers (alias: l)",
            "options": ["-h, --help"]
          },
          "start": {
            "description": "Start an MCP server (alias: s)",
            "options": ["-h, --help"]
          },
          "stop": {
            "description": "Stop an MCP server (alias: st)",
            "options": ["-h, --help"]
          },
          "ps": {
            "description": "List running MCP servers (alias: running)",
            "options": ["-h, --help"]
          },
          "functions": {
            "description": "List functions exposed by a running MCP server (alias: f)",
            "options": ["-h, --help"]
          },
          "invoke": {
            "description": "Invoke a function from a running MCP server (alias: i)",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "embed": {
        "description": "Generate embeddings for text (alias: e)",
        "arguments": ["[TEXT]"],
        "options": [
          "-m, --model <MODEL>",
          "-p, --provider <PROVIDER>",
          "-v, --vectordb <DATABASE>",
          "-f, --files <FILES>",
          "-d, --debug",
          "-h, --help"
        ]
      },
      "similar": {
        "description": "Find similar text using vector similarity (alias: s)",
        "arguments": ["<QUERY>"],
        "options": [
          {
            "name": "-m, --model <MODEL>",
            "description": "Model to use for embeddings (optional if database has existing model)"
          },
          {
            "name": "-p, --provider <PROVIDER>",
            "description": "Provider to use for embeddings (optional if database has existing model)"
          },
          {
            "name": "-v, --vectordb <DATABASE>",
            "description": "Vector database name to search"
          },
          {
            "name": "-l, --limit <LIMIT>",
            "description": "Number of similar results to return",
            "default": "5"
          },
          "-h, --help"
        ]
      },
      "vectors": {
        "description": "Vector database management (alias: v)",
        "commands": {
          "list": {
            "description": "List all vector databases (alias: l)",
            "options": ["-h, --help"]
          },
          "delete": {
            "description": "Delete a vector database (alias: d)",
            "options": ["-h, --help"]
          },
          "info": {
            "description": "Show information about a vector database (alias: i)",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "web-chat-proxy": {
        "description": "Web chat proxy for non-OpenAI compatible services (alias: w)",
        "commands": {
          "providers": {
            "description": "List supported providers (alias: p)",
            "options": ["-h, --help"]
          },
          "start": {
            "description": "Start proxy server for a provider (alias: s)",
            "arguments": ["<PROVIDER>"],
            "options": [
              {
                "name": "-p, --port <PORT>",
                "description": "Port to listen on",
                "default": "8080"
              },
              {
                "name": "--host <HOST>",
                "description": "Host to bind to",
                "default": "127.0.0.1"
              },
              {
                "name": "-k, --key <KEY>",
                "description": "API key for authentication"
              },
              {
                "name": "-g, --generate-key",
                "description": "Generate a random API key"
              },
              {
                "name": "-d, --daemon",
                "description": "Run in daemon mode (background)"
              },
              "-h, --help"
            ]
          },
          "stop": {
            "description": "Stop proxy server for a provider",
            "options": ["-h, --help"]
          },
          "list": {
            "description": "List running proxy servers (alias: ps)",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      },
      "sync": {
        "description": "Sync configuration files to/from cloud providers (alias: sy)",
        "commands": {
          "providers": {
            "description": "List supported cloud providers (alias: p)",
            "options": ["-h, --help"]
          },
          "configure": {
            "description": "Configure cloud provider settings (alias: c)",
            "arguments": ["<PROVIDER>"],
            "commands": {
              "setup": {
                "description": "Set up provider configuration (alias: s)",
                "options": ["-h, --help"]
              },
              "show": {
                "description": "Show current provider configuration (alias: sh)",
                "options": ["-h, --help"]
              },
              "remove": {
                "description": "Remove provider configuration (alias: r)",
                "options": ["-h, --help"]
              }
            },
            "options": ["-h, --help"]
          },
          "to": {
            "description": "Sync configuration to cloud provider",
            "options": ["-h, --help"]
          },
          "from": {
            "description": "Sync configuration from cloud provider",
            "options": ["-h, --help"]
          }
        },
        "options": ["-h, --help"]
      }
    }
  }
}