@kibibot/cli 1.0.4 → 1.0.5
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/README.md +1 -2
- package/dist/commands/config.js +2 -4
- package/dist/commands/llm.js +1 -1
- package/dist/lib/api.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ kibi skills # list all agent capabilities
|
|
|
110
110
|
|
|
111
111
|
kibi config get # show all config
|
|
112
112
|
kibi config get apiKey # show specific key
|
|
113
|
-
kibi config set
|
|
113
|
+
kibi config set apiKey kb_YOUR_KEY
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
## Global Flags
|
|
@@ -128,7 +128,6 @@ Config precedence (highest to lowest):
|
|
|
128
128
|
|
|
129
129
|
1. **Environment variable** — `KIBI_API_KEY`
|
|
130
130
|
2. **Config file** — `~/.kibi/config.json`
|
|
131
|
-
3. **Defaults** — API URL: `https://api.kibi.bot`, LLM URL: `https://llm.kibi.bot/v1`
|
|
132
131
|
|
|
133
132
|
## Requirements
|
|
134
133
|
|
package/dist/commands/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { readConfig, setConfigValue, CONFIG_PATH } from '../lib/config.js';
|
|
3
|
-
const VALID_KEYS = ['apiKey'
|
|
3
|
+
const VALID_KEYS = ['apiKey'];
|
|
4
4
|
function maskKey(key) {
|
|
5
5
|
if (key.length <= 8)
|
|
6
6
|
return '***';
|
|
@@ -35,13 +35,11 @@ export function registerConfig(program) {
|
|
|
35
35
|
console.log(chalk.dim('─'.repeat(40)));
|
|
36
36
|
console.log(` ${chalk.dim('File:')} ${CONFIG_PATH}`);
|
|
37
37
|
console.log(` ${chalk.dim('apiKey:')} ${config.apiKey ? maskKey(config.apiKey) : chalk.dim('(not set)')}`);
|
|
38
|
-
console.log(` ${chalk.dim('apiUrl:')} ${config.apiUrl || chalk.dim('(not set)')}`);
|
|
39
|
-
console.log(` ${chalk.dim('llmUrl:')} ${config.llmUrl || chalk.dim('(not set)')}`);
|
|
40
38
|
console.log();
|
|
41
39
|
});
|
|
42
40
|
configCmd
|
|
43
41
|
.command('set <key> <value>')
|
|
44
|
-
.description('Set a config value (apiKey
|
|
42
|
+
.description('Set a config value (apiKey)')
|
|
45
43
|
.action((key, value) => {
|
|
46
44
|
if (!VALID_KEYS.includes(key)) {
|
|
47
45
|
console.error(`Error: Unknown key '${key}'. Valid keys: ${VALID_KEYS.join(', ')}`);
|
package/dist/commands/llm.js
CHANGED
|
@@ -116,7 +116,7 @@ export function registerLlm(program) {
|
|
|
116
116
|
.action(async (target, opts, cmd) => {
|
|
117
117
|
const config = readConfig();
|
|
118
118
|
const apiKey = config.apiKey || process.env['KIBI_API_KEY'];
|
|
119
|
-
const llmUrl =
|
|
119
|
+
const llmUrl = 'https://llm.kibi.bot/v1';
|
|
120
120
|
if (!apiKey) {
|
|
121
121
|
console.error("Error: Not logged in. Run 'kibi login' first.");
|
|
122
122
|
process.exit(1);
|
package/dist/lib/api.js
CHANGED
|
@@ -68,8 +68,8 @@ async function request(path, opts = {}) {
|
|
|
68
68
|
const { method = 'GET', body, auth = true, baseLlm = false } = opts;
|
|
69
69
|
const config = readConfig();
|
|
70
70
|
const baseUrl = baseLlm
|
|
71
|
-
?
|
|
72
|
-
:
|
|
71
|
+
? 'https://llm.kibi.bot/v1'
|
|
72
|
+
: 'https://api.kibi.bot';
|
|
73
73
|
const url = `${baseUrl}${path}`;
|
|
74
74
|
const headers = {
|
|
75
75
|
'Accept': 'application/json',
|