@jvittechs/jai1-cli 0.1.77 → 0.1.78
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/dist/cli.js +10 -10
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var NetworkError = class extends Jai1Error {
|
|
|
33
33
|
// package.json
|
|
34
34
|
var package_default = {
|
|
35
35
|
name: "@jvittechs/jai1-cli",
|
|
36
|
-
version: "0.1.
|
|
36
|
+
version: "0.1.78",
|
|
37
37
|
description: "A unified CLI tool for JV-IT TECHS developers to manage Jai1 Framework. Please contact TeamAI for usage instructions.",
|
|
38
38
|
type: "module",
|
|
39
39
|
bin: {
|
|
@@ -4391,13 +4391,13 @@ function createChatCommand() {
|
|
|
4391
4391
|
return cmd;
|
|
4392
4392
|
}
|
|
4393
4393
|
|
|
4394
|
-
// src/commands/
|
|
4394
|
+
// src/commands/openai-keys.ts
|
|
4395
4395
|
import { Command as Command12 } from "commander";
|
|
4396
4396
|
function maskKey2(key) {
|
|
4397
4397
|
if (key.length <= 8) return "****";
|
|
4398
4398
|
return key.slice(0, 8) + "****" + key.slice(-4);
|
|
4399
4399
|
}
|
|
4400
|
-
async function
|
|
4400
|
+
async function handleOpenAiKeysCommand(options) {
|
|
4401
4401
|
const configService = new ConfigService();
|
|
4402
4402
|
const config = await configService.load();
|
|
4403
4403
|
if (!config) {
|
|
@@ -4436,7 +4436,7 @@ async function handleApiKeysCommand(options) {
|
|
|
4436
4436
|
console.log(" - Use as drop-in replacement for OpenAI API");
|
|
4437
4437
|
console.log(" - Compatible with: OpenAI SDK, LangChain, LlamaIndex, etc.");
|
|
4438
4438
|
console.log(' - Run "jai1 chat" for interactive mode');
|
|
4439
|
-
console.log(' - Run "jai1
|
|
4439
|
+
console.log(' - Run "jai1 openai-keys --full" to show full API key');
|
|
4440
4440
|
} catch (error) {
|
|
4441
4441
|
console.error(
|
|
4442
4442
|
"\n\u274C Failed to fetch API info:",
|
|
@@ -4445,9 +4445,9 @@ async function handleApiKeysCommand(options) {
|
|
|
4445
4445
|
console.log('\n\u{1F4A1} Check your API URL and access key with "jai1 status"');
|
|
4446
4446
|
}
|
|
4447
4447
|
}
|
|
4448
|
-
function
|
|
4449
|
-
const cmd = new Command12("
|
|
4450
|
-
await
|
|
4448
|
+
function createOpenAiKeysCommand() {
|
|
4449
|
+
const cmd = new Command12("openai-keys").description("Show OpenAI-compatible API credentials and info").option("--full", "Show full API key (unmasked)").action(async (options) => {
|
|
4450
|
+
await handleOpenAiKeysCommand(options);
|
|
4451
4451
|
});
|
|
4452
4452
|
return cmd;
|
|
4453
4453
|
}
|
|
@@ -4513,7 +4513,7 @@ async function handleStatsCommand() {
|
|
|
4513
4513
|
});
|
|
4514
4514
|
}
|
|
4515
4515
|
console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");
|
|
4516
|
-
console.log('\n\u{1F4A1} M\u1EB9o: Ch\u1EA1y "jai1
|
|
4516
|
+
console.log('\n\u{1F4A1} M\u1EB9o: Ch\u1EA1y "jai1 openai-keys" \u0111\u1EC3 xem danh s\xE1ch model kh\u1EA3 d\u1EE5ng');
|
|
4517
4517
|
} catch (error) {
|
|
4518
4518
|
console.error(
|
|
4519
4519
|
"\n\u274C Kh\xF4ng th\u1EC3 l\u1EA5y th\u1ED1ng k\xEA:",
|
|
@@ -9172,7 +9172,7 @@ program.addCommand(createCheckCommand());
|
|
|
9172
9172
|
program.addCommand(createIdeCommand());
|
|
9173
9173
|
program.addCommand(createLearnCommand());
|
|
9174
9174
|
program.addCommand(createChatCommand());
|
|
9175
|
-
program.addCommand(
|
|
9175
|
+
program.addCommand(createOpenAiKeysCommand());
|
|
9176
9176
|
program.addCommand(createStatsCommand());
|
|
9177
9177
|
program.addCommand(createTranslateCommand());
|
|
9178
9178
|
program.addCommand(createUtilsCommand());
|
|
@@ -9215,7 +9215,7 @@ program.on("command:*", (operands) => {
|
|
|
9215
9215
|
console.error("");
|
|
9216
9216
|
console.error(" \u{1F916} LLM Proxy");
|
|
9217
9217
|
console.error(" chat Interactive AI chat");
|
|
9218
|
-
console.error("
|
|
9218
|
+
console.error(" openai-keys Show OpenAI-compatible API credentials");
|
|
9219
9219
|
console.error(" stats Show LLM usage statistics and limits");
|
|
9220
9220
|
console.error(" translate Translate text, files, or folders using AI");
|
|
9221
9221
|
console.error("");
|