@kibibot/cli 1.0.7 → 1.0.9

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 CHANGED
@@ -61,6 +61,7 @@ kibi token create
61
61
  # Headless
62
62
  kibi token create --name "MyToken" --symbol MTK --chain base
63
63
  kibi token create --name "Moon" --symbol MOON --chain solana --description "To the moon"
64
+ kibi token create --name "Moon" --symbol MOON --chain base --image-url https://example.com/moon.png
64
65
  kibi token create --name "Test" --symbol TST --chain base --no-wait # return job ID immediately
65
66
 
66
67
  # Check deployment status
@@ -111,6 +112,8 @@ kibi skills # list all agent capabilities
111
112
  kibi config get # show all config
112
113
  kibi config get apiKey # show specific key
113
114
  kibi config set apiKey kb_YOUR_KEY
115
+
116
+ kibi about # version, links, branding
114
117
  ```
115
118
 
116
119
  ## Global Flags
@@ -0,0 +1,5 @@
1
+ /**
2
+ * kibi about — branded info card
3
+ */
4
+ import { Command } from 'commander';
5
+ export declare function registerAbout(program: Command): void;
@@ -0,0 +1,51 @@
1
+ import chalk from 'chalk';
2
+ import { readFileSync } from 'node:fs';
3
+ import { join, dirname } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ function getVersion() {
6
+ try {
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8'));
9
+ return pkg.version || 'unknown';
10
+ }
11
+ catch {
12
+ return 'unknown';
13
+ }
14
+ }
15
+ export function registerAbout(program) {
16
+ program
17
+ .command('about')
18
+ .description('About KibiBot CLI')
19
+ .action(() => {
20
+ const version = getVersion();
21
+ const W = 43; // inner width between ║ borders
22
+ function pad(text, displayWidth) {
23
+ // displayWidth accounts for emojis/wide chars taking 2 columns
24
+ const dw = displayWidth ?? text.length;
25
+ const padding = W - dw;
26
+ return text + ' '.repeat(Math.max(0, padding));
27
+ }
28
+ const lines = [
29
+ '',
30
+ ' K I B I B O T',
31
+ '',
32
+ ' Deploy tokens. Earn fees.',
33
+ ' Power your AI agent.',
34
+ '',
35
+ ` Version ${version}`,
36
+ ' Website kibi.bot',
37
+ ' Docs kibi.bot/docs/agent',
38
+ ' GitHub github.com/KibiAgent',
39
+ '',
40
+ ' Base · BSC · Solana',
41
+ '',
42
+ ];
43
+ console.log();
44
+ console.log(chalk.cyan(` ╔${'═'.repeat(W)}╗`));
45
+ for (const line of lines) {
46
+ console.log(chalk.cyan(' ║') + pad(line) + chalk.cyan('║'));
47
+ }
48
+ console.log(chalk.cyan(` ╚${'═'.repeat(W)}╝`));
49
+ console.log();
50
+ });
51
+ }
@@ -27,17 +27,51 @@ export function registerLogin(program) {
27
27
  }
28
28
  let apiKey = opts.apiKey;
29
29
  if (!apiKey) {
30
- // Interactive prompt
31
- const readline = await import('node:readline');
32
- const rl = readline.createInterface({
33
- input: process.stdin,
34
- output: process.stdout,
35
- });
30
+ // Interactive prompt with masked input
31
+ process.stdout.write('Enter your API key: ');
36
32
  apiKey = await new Promise((resolve) => {
37
- rl.question('Enter your API key: ', (answer) => {
38
- rl.close();
39
- resolve(answer.trim());
40
- });
33
+ let input = '';
34
+ const stdin = process.stdin;
35
+ const wasRaw = stdin.isRaw;
36
+ if (stdin.isTTY) {
37
+ stdin.setRawMode(true);
38
+ }
39
+ stdin.resume();
40
+ stdin.setEncoding('utf8');
41
+ const onData = (ch) => {
42
+ const c = ch.toString();
43
+ if (c === '\n' || c === '\r') {
44
+ // Enter
45
+ stdin.removeListener('data', onData);
46
+ if (stdin.isTTY)
47
+ stdin.setRawMode(wasRaw ?? false);
48
+ stdin.pause();
49
+ process.stdout.write('\n');
50
+ resolve(input.trim());
51
+ }
52
+ else if (c === '\u0003') {
53
+ // Ctrl+C
54
+ process.stdout.write('\n');
55
+ process.exit(0);
56
+ }
57
+ else if (c === '\u007f' || c === '\b') {
58
+ // Backspace
59
+ if (input.length > 0) {
60
+ input = input.slice(0, -1);
61
+ process.stdout.write('\b \b');
62
+ }
63
+ }
64
+ else if (c.length === 1 && c >= ' ') {
65
+ input += c;
66
+ process.stdout.write('*');
67
+ }
68
+ else if (c.length > 1) {
69
+ // Pasted text
70
+ input += c;
71
+ process.stdout.write('*'.repeat(c.length));
72
+ }
73
+ };
74
+ stdin.on('data', onData);
41
75
  });
42
76
  }
43
77
  if (!apiKey || !apiKey.startsWith('kb_')) {
@@ -42,6 +42,11 @@ export function registerToken(program) {
42
42
  symbol = await ask('Symbol: ');
43
43
  if (!chain)
44
44
  chain = await ask('Chain (base/bsc/solana): ');
45
+ if (!opts.imageUrl) {
46
+ const imgAnswer = await ask('Token image URL (optional, press Enter to skip): ');
47
+ if (imgAnswer)
48
+ opts.imageUrl = imgAnswer;
49
+ }
45
50
  rl.close();
46
51
  }
47
52
  // Validate chain
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ import { registerQuota } from './commands/quota.js';
19
19
  import { registerSkills } from './commands/skills.js';
20
20
  import { registerLlm } from './commands/llm.js';
21
21
  import { registerConfig } from './commands/config.js';
22
+ import { registerAbout } from './commands/about.js';
22
23
  // Read version from package.json
23
24
  const __filename = fileURLToPath(import.meta.url);
24
25
  const __dirname = dirname(__filename);
@@ -47,4 +48,5 @@ registerQuota(program);
47
48
  registerSkills(program);
48
49
  registerLlm(program);
49
50
  registerConfig(program);
51
+ registerAbout(program);
50
52
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kibibot/cli",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "KibiBot CLI — deploy tokens, check balances, and manage your AI agent from the terminal",
5
5
  "type": "module",
6
6
  "bin": {