aixxai 1.5.0 → 1.5.2

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
@@ -1,45 +1,45 @@
1
- # AIXX CLI
2
-
3
- > 让你的AI调用万物。一个命令,agent就能调用全世界的AI能力。
4
-
5
- ## 安装
6
-
7
- ```bash
8
- npx aixxai install
9
- ```
10
-
11
- 带推荐码安装(推荐人获分润):
12
-
13
- ```bash
14
- npx aixxai install zhangsan
15
- ```
16
-
17
- ## 命令
18
-
19
- | 命令 | 说明 |
20
- |---|---|
21
- | `aixx install [推荐码]` | 安装AIXX skill到本地agent |
22
- | `aixx config` | 查看当前配置 |
23
- | `aixx test` | 测试AIXX连通性+调用模型 |
24
- | `aixx --version` | 查看版本 |
25
- | `aixx --help` | 帮助 |
26
-
27
- ## 当前状态(1.4.0)
28
-
29
- - ✅ CLI代码完成,本地测试通过
30
- - ⏳ 待发布到npm(等注册)
31
- - ✅ 后端已部署:http://14.103.27.195:8080
32
- - ✅ 已接通:DeepSeek / GLM / Kimi
33
-
34
- ## 技术栈
35
-
36
- - Node.js (>=18) + ES Modules
37
- - 纯原生API,零运行时依赖
38
- - skill文件内嵌在包里(templates/),网络挂了也能装
39
-
40
- ## 文档
41
-
42
- 完整文档:https://gitee.com/kk0803/token-hub
43
-
44
- ---
45
- 维护者:龙龙(AIXX PM)| 2026-08-08
1
+ # AIXX CLI
2
+
3
+ > 让你的AI调用万物。一个命令,agent就能调用全世界的AI能力。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npx aixxai install
9
+ ```
10
+
11
+ 带推荐码安装(推荐人获分润):
12
+
13
+ ```bash
14
+ npx aixxai install zhangsan
15
+ ```
16
+
17
+ ## 命令
18
+
19
+ | 命令 | 说明 |
20
+ |---|---|
21
+ | `aixx install [推荐码]` | 安装AIXX skill到本地agent |
22
+ | `aixx config` | 查看当前配置 |
23
+ | `aixx test` | 测试AIXX连通性+调用模型 |
24
+ | `aixx --version` | 查看版本 |
25
+ | `aixx --help` | 帮助 |
26
+
27
+ ## 当前状态(1.4.0)
28
+
29
+ - ✅ CLI代码完成,本地测试通过
30
+ - ⏳ 待发布到npm(等注册)
31
+ - ✅ 后端已部署:http://14.103.27.195:8080
32
+ - ✅ 已接通:DeepSeek / GLM / Kimi
33
+
34
+ ## 技术栈
35
+
36
+ - Node.js (>=18) + ES Modules
37
+ - 纯原生API,零运行时依赖
38
+ - skill文件内嵌在包里(templates/),网络挂了也能装
39
+
40
+ ## 文档
41
+
42
+ 完整文档:https://gitee.com/kk0803/token-hub
43
+
44
+ ---
45
+ 维护者:龙龙(AIXX PM)| 2026-08-08
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aixxai",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "AIXX CLI - 让你的AI调用万物。安装:npx aixxai install",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,4 +31,4 @@
31
31
  "engines": {
32
32
  "node": ">=18"
33
33
  }
34
- }
34
+ }
@@ -1,147 +1,147 @@
1
- /**
2
- * AIXX CLI - balance 命令
3
- *
4
- * 查询当前账户余额、已用额度。
5
- *
6
- * 数据来源(New-API兼容接口):
7
- * 1. GET /v1/dashboard/billing/subscription → hard_limit_usd(总额度,美元)
8
- * 2. GET /v1/dashboard/billing/usage → 已用量(可能多种格式,做兜底)
9
- *
10
- * 展示时换算成人民币(按 1 USD ≈ 7 元,只是给用户一个直观感受)。
11
- * "还剩约N次对话":按每次对话约 ¥0.01 估算(最便宜的deepseek-chat单次几厘到几分)。
12
- */
13
-
14
- import { DEFAULT_BASE_URL } from '../../bin/aixx.js';
15
- import { loadApiKey, maskKey } from '../utils/env.js';
16
-
17
- // 美元→人民币换算(仅用于展示,给用户一个直观感受)
18
- const USD_TO_CNY = 7;
19
- // 估算单次对话成本(元),用于"还能聊多少次"
20
- const COST_PER_CHAT_CNY = 0.01;
21
- // 所有对外请求统一 15 秒超时
22
- const FETCH_TIMEOUT = 15000;
23
- // 网络/超时异常统一成友好提示
24
- function friendlyNetErr(err) {
25
- return err?.name === 'TimeoutError' || err?.name === 'AbortError'
26
- ? '连接超时,请检查网络'
27
- : err?.message || String(err);
28
- }
29
-
30
- /**
31
- * apiKey 读取统一走 src/utils/env.js 的 loadApiKey:
32
- * 环境变量 AIXX_API_KEY → ~/.aixx/config.json → ~/.aixx/account.json
33
- */
34
-
35
- export async function balance(subArgs) {
36
- console.log('╔══════════════════════════════════════════╗');
37
- console.log('║ AIXX 账户余额 ║');
38
- console.log('╚══════════════════════════════════════════╝\n');
39
-
40
- const apiKey = loadApiKey();
41
- const baseUrl = process.env.AIXX_BASE_URL || DEFAULT_BASE_URL;
42
-
43
- if (!apiKey) {
44
- console.error('❌ 未找到AIXX API Key');
45
- console.error(' 请先运行 npx aixxai install,或设置环境变量 AIXX_API_KEY');
46
- process.exit(1);
47
- }
48
-
49
- console.log(`使用Key: ${maskKey(apiKey)}`);
50
- console.log(`后端地址: ${baseUrl}\n`);
51
-
52
- // 1. 查总额度(subscription)
53
- let hardLimitUsd = 0;
54
- try {
55
- const resp = await fetch(`${baseUrl}/dashboard/billing/subscription`, {
56
- headers: { Authorization: `Bearer ${apiKey}` },
57
- signal: AbortSignal.timeout(FETCH_TIMEOUT),
58
- });
59
- if (!resp.ok) {
60
- if (resp.status === 401) {
61
- console.error('❌ API Key 无效(401),请重新 install 或检查 key');
62
- process.exit(1);
63
- }
64
- console.error(`❌ 查询余额失败: HTTP ${resp.status}`);
65
- process.exit(1);
66
- }
67
- const data = await resp.json();
68
- // New-API/OpenAI兼容:hard_limit_usd 是总额度
69
- hardLimitUsd =
70
- data.hard_limit_usd ??
71
- data.hard_limit ??
72
- data.data?.hard_limit_usd ??
73
- 0;
74
- } catch (err) {
75
- console.error(`❌ ${friendlyNetErr(err)}`);
76
- process.exit(1);
77
- }
78
-
79
- // 2. 查已用量(usage)
80
- // 不同后端字段不一样,尽量兜底
81
- let usedUsd = 0;
82
- try {
83
- // 用一个宽日期范围,确保能查到所有用量
84
- const today = new Date();
85
- const start = `${today.getFullYear()}-01-01`;
86
- const end = `${today.getFullYear()}-12-31`;
87
- const resp = await fetch(
88
- `${baseUrl}/dashboard/billing/usage?start_date=${start}&end_date=${end}`,
89
- {
90
- headers: { Authorization: `Bearer ${apiKey}` },
91
- signal: AbortSignal.timeout(FETCH_TIMEOUT),
92
- }
93
- );
94
- if (resp.ok) {
95
- const data = await resp.json();
96
- // 常见字段优先级
97
- usedUsd =
98
- data.total_usage ??
99
- data.total_cost ??
100
- data.data?.total_usage ??
101
- data.cumulative_usage ??
102
- 0;
103
- // New-API 的 total_usage 单位有时是"分(美元)",要除以100
104
- // 这里做个粗判断:如果usedUsd比hardLimit还大100倍,多半是没除100
105
- if (usedUsd > 0 && hardLimitUsd > 0 && usedUsd > hardLimitUsd * 50) {
106
- usedUsd = usedUsd / 100;
107
- }
108
- } else {
109
- // usage 接口挂了不影响主流程,总额度照常显示
110
- console.log(' (用量接口未返回数据,仅显示总额度)\n');
111
- }
112
- } catch (err) {
113
- console.log(' (用量查询失败,仅显示总额度)\n');
114
- }
115
-
116
- // 3. 计算并展示
117
- // New-API 的"无限额度"哨兵:hard_limit_usd >= 100000000(1亿)表示这个token不限额。
118
- // 直接显示真实数字(¥7亿)会吓到用户,所以单独走"无限额度"分支。
119
- const UNLIMITED_SENTINEL = 100000000;
120
- const isUnlimited = hardLimitUsd >= UNLIMITED_SENTINEL;
121
- const usedCny = usedUsd * USD_TO_CNY;
122
-
123
- console.log('────────────────────────────────────');
124
- if (isUnlimited) {
125
- // unlimited token(New-API对unlimited_quota=true的token返回1亿作为标记)
126
- // 实际是"按账户余额扣费",不是真的无限。账户余额是注册送的¥5起,用完就停。
127
- // billing接口拿不到真实账户余额(它对unlimited token只返回1亿标记),
128
- // 所以这里如实告知用户,引导去后台查精确余额。
129
- console.log(`💰 计费方式:按账户余额扣费(注册送¥5起,用完需充值)`);
130
- console.log(`📊 已用额度:¥${usedCny.toFixed(2)}`);
131
- console.log(`💡 精确余额请登录AIXX后台查看:${baseUrl.replace(/\/v1$/, '')}`);
132
- } else {
133
- // 正常有限额度
134
- const remainingUsd = Math.max(0, hardLimitUsd - usedUsd);
135
- const totalCny = hardLimitUsd * USD_TO_CNY;
136
- const remainingCny = remainingUsd * USD_TO_CNY;
137
- const approxChats = Math.floor(remainingCny / COST_PER_CHAT_CNY);
138
- console.log(`💰 当前余额:¥${remainingCny.toFixed(2)}(还剩约 ${approxChats.toLocaleString()} 次对话)`);
139
- console.log(`📊 已用额度:¥${usedCny.toFixed(2)}`);
140
- console.log(`💳 账户总额度:¥${totalCny.toFixed(2)}($${hardLimitUsd.toFixed(2)})`);
141
- }
142
- console.log('────────────────────────────────────');
143
- console.log('\n💡 提示:');
144
- console.log(' - 新用户注册送 ¥5 免费额度');
145
- console.log(' - deepseek-chat 最便宜,省着用能聊很久');
146
- console.log(' - 余额不足时运行 aixx recharge 查看充值方式\n');
147
- }
1
+ /**
2
+ * AIXX CLI - balance 命令
3
+ *
4
+ * 查询当前账户余额、已用额度。
5
+ *
6
+ * 数据来源(New-API兼容接口):
7
+ * 1. GET /v1/dashboard/billing/subscription → hard_limit_usd(总额度,美元)
8
+ * 2. GET /v1/dashboard/billing/usage → 已用量(可能多种格式,做兜底)
9
+ *
10
+ * 展示时换算成人民币(按 1 USD ≈ 7 元,只是给用户一个直观感受)。
11
+ * "还剩约N次对话":按每次对话约 ¥0.01 估算(最便宜的deepseek-chat单次几厘到几分)。
12
+ */
13
+
14
+ import { DEFAULT_BASE_URL } from '../../bin/aixx.js';
15
+ import { loadApiKey, maskKey } from '../utils/env.js';
16
+
17
+ // 美元→人民币换算(仅用于展示,给用户一个直观感受)
18
+ const USD_TO_CNY = 7;
19
+ // 估算单次对话成本(元),用于"还能聊多少次"
20
+ const COST_PER_CHAT_CNY = 0.01;
21
+ // 所有对外请求统一 15 秒超时
22
+ const FETCH_TIMEOUT = 15000;
23
+ // 网络/超时异常统一成友好提示
24
+ function friendlyNetErr(err) {
25
+ return err?.name === 'TimeoutError' || err?.name === 'AbortError'
26
+ ? '连接超时,请检查网络'
27
+ : err?.message || String(err);
28
+ }
29
+
30
+ /**
31
+ * apiKey 读取统一走 src/utils/env.js 的 loadApiKey:
32
+ * 环境变量 AIXX_API_KEY → ~/.aixx/config.json → ~/.aixx/account.json
33
+ */
34
+
35
+ export async function balance(subArgs) {
36
+ console.log('╔══════════════════════════════════════════╗');
37
+ console.log('║ AIXX 账户余额 ║');
38
+ console.log('╚══════════════════════════════════════════╝\n');
39
+
40
+ const apiKey = loadApiKey();
41
+ const baseUrl = process.env.AIXX_BASE_URL || DEFAULT_BASE_URL;
42
+
43
+ if (!apiKey) {
44
+ console.error('❌ 未找到AIXX API Key');
45
+ console.error(' 请先运行 npx aixxai install,或设置环境变量 AIXX_API_KEY');
46
+ process.exit(1);
47
+ }
48
+
49
+ console.log(`使用Key: ${maskKey(apiKey)}`);
50
+ console.log(`后端地址: ${baseUrl}\n`);
51
+
52
+ // 1. 查总额度(subscription)
53
+ let hardLimitUsd = 0;
54
+ try {
55
+ const resp = await fetch(`${baseUrl}/dashboard/billing/subscription`, {
56
+ headers: { Authorization: `Bearer ${apiKey}` },
57
+ signal: AbortSignal.timeout(FETCH_TIMEOUT),
58
+ });
59
+ if (!resp.ok) {
60
+ if (resp.status === 401) {
61
+ console.error('❌ API Key 无效(401),请重新 install 或检查 key');
62
+ process.exit(1);
63
+ }
64
+ console.error(`❌ 查询余额失败: HTTP ${resp.status}`);
65
+ process.exit(1);
66
+ }
67
+ const data = await resp.json();
68
+ // New-API/OpenAI兼容:hard_limit_usd 是总额度
69
+ hardLimitUsd =
70
+ data.hard_limit_usd ??
71
+ data.hard_limit ??
72
+ data.data?.hard_limit_usd ??
73
+ 0;
74
+ } catch (err) {
75
+ console.error(`❌ ${friendlyNetErr(err)}`);
76
+ process.exit(1);
77
+ }
78
+
79
+ // 2. 查已用量(usage)
80
+ // 不同后端字段不一样,尽量兜底
81
+ let usedUsd = 0;
82
+ try {
83
+ // 用一个宽日期范围,确保能查到所有用量
84
+ const today = new Date();
85
+ const start = `${today.getFullYear()}-01-01`;
86
+ const end = `${today.getFullYear()}-12-31`;
87
+ const resp = await fetch(
88
+ `${baseUrl}/dashboard/billing/usage?start_date=${start}&end_date=${end}`,
89
+ {
90
+ headers: { Authorization: `Bearer ${apiKey}` },
91
+ signal: AbortSignal.timeout(FETCH_TIMEOUT),
92
+ }
93
+ );
94
+ if (resp.ok) {
95
+ const data = await resp.json();
96
+ // 常见字段优先级
97
+ usedUsd =
98
+ data.total_usage ??
99
+ data.total_cost ??
100
+ data.data?.total_usage ??
101
+ data.cumulative_usage ??
102
+ 0;
103
+ // New-API 的 total_usage 单位有时是"分(美元)",要除以100
104
+ // 这里做个粗判断:如果usedUsd比hardLimit还大100倍,多半是没除100
105
+ if (usedUsd > 0 && hardLimitUsd > 0 && usedUsd > hardLimitUsd * 50) {
106
+ usedUsd = usedUsd / 100;
107
+ }
108
+ } else {
109
+ // usage 接口挂了不影响主流程,总额度照常显示
110
+ console.log(' (用量接口未返回数据,仅显示总额度)\n');
111
+ }
112
+ } catch (err) {
113
+ console.log(' (用量查询失败,仅显示总额度)\n');
114
+ }
115
+
116
+ // 3. 计算并展示
117
+ // New-API 的"无限额度"哨兵:hard_limit_usd >= 100000000(1亿)表示这个token不限额。
118
+ // 直接显示真实数字(¥7亿)会吓到用户,所以单独走"无限额度"分支。
119
+ const UNLIMITED_SENTINEL = 100000000;
120
+ const isUnlimited = hardLimitUsd >= UNLIMITED_SENTINEL;
121
+ const usedCny = usedUsd * USD_TO_CNY;
122
+
123
+ console.log('────────────────────────────────────');
124
+ if (isUnlimited) {
125
+ // unlimited token(New-API对unlimited_quota=true的token返回1亿作为标记)
126
+ // 实际是"按账户余额扣费",不是真的无限。账户余额是注册送的¥5起,用完就停。
127
+ // billing接口拿不到真实账户余额(它对unlimited token只返回1亿标记),
128
+ // 所以这里如实告知用户,引导去后台查精确余额。
129
+ console.log(`💰 计费方式:按账户余额扣费(注册送¥5起,用完需充值)`);
130
+ console.log(`📊 已用额度:¥${usedCny.toFixed(2)}`);
131
+ console.log(`💡 精确余额请登录AIXX后台查看:${baseUrl.replace(/\/v1$/, '')}`);
132
+ } else {
133
+ // 正常有限额度
134
+ const remainingUsd = Math.max(0, hardLimitUsd - usedUsd);
135
+ const totalCny = hardLimitUsd * USD_TO_CNY;
136
+ const remainingCny = remainingUsd * USD_TO_CNY;
137
+ const approxChats = Math.floor(remainingCny / COST_PER_CHAT_CNY);
138
+ console.log(`💰 当前余额:¥${remainingCny.toFixed(2)}(还剩约 ${approxChats.toLocaleString()} 次对话)`);
139
+ console.log(`📊 已用额度:¥${usedCny.toFixed(2)}`);
140
+ console.log(`💳 账户总额度:¥${totalCny.toFixed(2)}($${hardLimitUsd.toFixed(2)})`);
141
+ }
142
+ console.log('────────────────────────────────────');
143
+ console.log('\n💡 提示:');
144
+ console.log(' - 新用户注册送 ¥5 免费额度');
145
+ console.log(' - deepseek-chat 最便宜,省着用能聊很久');
146
+ console.log(' - 余额不足时运行 aixx recharge 查看充值方式\n');
147
+ }
@@ -1,68 +1,68 @@
1
- /**
2
- * AIXX CLI - config 命令
3
- * 查看或修改AIXX配置
4
- */
5
-
6
- import { existsSync, readFileSync } from 'fs';
7
- import { homedir } from 'os';
8
- import { join } from 'path';
9
- import { DEFAULT_BASE_URL } from '../../bin/aixx.js';
10
- import { loadApiKey, maskKey } from '../utils/env.js';
11
-
12
- export async function config(subArgs) {
13
- console.log('╔══════════════════════════════════════════╗');
14
- console.log('║ AIXX 配置 ║');
15
- console.log('╚══════════════════════════════════════════╝\n');
16
-
17
- // 统一配置链:环境变量 → ~/.aixx/config.json → ~/.aixx/account.json
18
- const apiKey = loadApiKey();
19
- const baseUrl = process.env.AIXX_BASE_URL || DEFAULT_BASE_URL;
20
-
21
- console.log('当前配置:');
22
- console.log(` AIXX_API_KEY : ${apiKey ? maskKey(apiKey) : '❌ 未配置'}`);
23
- console.log(` AIXX_BASE_URL: ${baseUrl}`);
24
-
25
- // 本地配置文件(key脱敏显示,绝不打印完整key)
26
- const configFile = join(homedir(), '.aixx', 'config.json');
27
- if (existsSync(configFile)) {
28
- console.log('\n本地配置文件:');
29
- try {
30
- const conf = JSON.parse(readFileSync(configFile, 'utf-8'));
31
- if (conf.AIXX_API_KEY) conf.AIXX_API_KEY = maskKey(conf.AIXX_API_KEY);
32
- console.log(` 位置: ${configFile}`);
33
- console.log(` 内容: ${JSON.stringify(conf, null, 2)}`);
34
- } catch (e) {
35
- console.log(` (配置文件解析失败: ${e.message})`);
36
- }
37
- }
38
-
39
- // 推荐码
40
- const refFile = join(homedir(), '.aixx', 'referral.json');
41
- if (existsSync(refFile)) {
42
- console.log('\n推荐归因:');
43
- try {
44
- const ref = JSON.parse(readFileSync(refFile, 'utf-8'));
45
- console.log(` 推荐码: ${ref.refCode}`);
46
- console.log(` 安装时间: ${ref.installedAt}`);
47
- } catch (e) {}
48
- }
49
-
50
- // skill位置
51
- const skillDirs = [
52
- join(homedir(), '.zcode', 'skills', 'aixx'),
53
- join(homedir(), '.agents', 'skills', 'aixx'),
54
- join(homedir(), '.claude', 'skills', 'aixx'),
55
- join(homedir(), '.aixx', 'skills', 'aixx'),
56
- ].filter(existsSync);
57
-
58
- console.log('\nskill安装位置:');
59
- if (skillDirs.length > 0) {
60
- skillDirs.forEach(d => console.log(` ✅ ${d}`));
61
- } else {
62
- console.log(' ❌ 未检测到已安装的skill(运行 aixx install 安装)');
63
- }
64
-
65
- console.log('\n修改配置:');
66
- console.log(' 重新运行: npx aixxai install');
67
- console.log(' (配置读取顺序:环境变量 AIXX_API_KEY → ~/.aixx/config.json → ~/.aixx/account.json)\n');
68
- }
1
+ /**
2
+ * AIXX CLI - config 命令
3
+ * 查看或修改AIXX配置
4
+ */
5
+
6
+ import { existsSync, readFileSync } from 'fs';
7
+ import { homedir } from 'os';
8
+ import { join } from 'path';
9
+ import { DEFAULT_BASE_URL } from '../../bin/aixx.js';
10
+ import { loadApiKey, maskKey } from '../utils/env.js';
11
+
12
+ export async function config(subArgs) {
13
+ console.log('╔══════════════════════════════════════════╗');
14
+ console.log('║ AIXX 配置 ║');
15
+ console.log('╚══════════════════════════════════════════╝\n');
16
+
17
+ // 统一配置链:环境变量 → ~/.aixx/config.json → ~/.aixx/account.json
18
+ const apiKey = loadApiKey();
19
+ const baseUrl = process.env.AIXX_BASE_URL || DEFAULT_BASE_URL;
20
+
21
+ console.log('当前配置:');
22
+ console.log(` AIXX_API_KEY : ${apiKey ? maskKey(apiKey) : '❌ 未配置'}`);
23
+ console.log(` AIXX_BASE_URL: ${baseUrl}`);
24
+
25
+ // 本地配置文件(key脱敏显示,绝不打印完整key)
26
+ const configFile = join(homedir(), '.aixx', 'config.json');
27
+ if (existsSync(configFile)) {
28
+ console.log('\n本地配置文件:');
29
+ try {
30
+ const conf = JSON.parse(readFileSync(configFile, 'utf-8'));
31
+ if (conf.AIXX_API_KEY) conf.AIXX_API_KEY = maskKey(conf.AIXX_API_KEY);
32
+ console.log(` 位置: ${configFile}`);
33
+ console.log(` 内容: ${JSON.stringify(conf, null, 2)}`);
34
+ } catch (e) {
35
+ console.log(` (配置文件解析失败: ${e.message})`);
36
+ }
37
+ }
38
+
39
+ // 推荐码
40
+ const refFile = join(homedir(), '.aixx', 'referral.json');
41
+ if (existsSync(refFile)) {
42
+ console.log('\n推荐归因:');
43
+ try {
44
+ const ref = JSON.parse(readFileSync(refFile, 'utf-8'));
45
+ console.log(` 推荐码: ${ref.refCode}`);
46
+ console.log(` 安装时间: ${ref.installedAt}`);
47
+ } catch (e) {}
48
+ }
49
+
50
+ // skill位置
51
+ const skillDirs = [
52
+ join(homedir(), '.zcode', 'skills', 'aixx'),
53
+ join(homedir(), '.agents', 'skills', 'aixx'),
54
+ join(homedir(), '.claude', 'skills', 'aixx'),
55
+ join(homedir(), '.aixx', 'skills', 'aixx'),
56
+ ].filter(existsSync);
57
+
58
+ console.log('\nskill安装位置:');
59
+ if (skillDirs.length > 0) {
60
+ skillDirs.forEach(d => console.log(` ✅ ${d}`));
61
+ } else {
62
+ console.log(' ❌ 未检测到已安装的skill(运行 aixx install 安装)');
63
+ }
64
+
65
+ console.log('\n修改配置:');
66
+ console.log(' 重新运行: npx aixxai install');
67
+ console.log(' (配置读取顺序:环境变量 AIXX_API_KEY → ~/.aixx/config.json → ~/.aixx/account.json)\n');
68
+ }
@@ -1,43 +1,43 @@
1
- /**
2
- * AIXX CLI - 帮助信息
3
- */
4
-
5
- export function showHelp(version) {
6
- console.log(`
7
- ╔══════════════════════════════════════════╗
8
- ║ AIXX CLI v${version} ║
9
- ║ 让你的AI调用万物 ║
10
- ╚══════════════════════════════════════════╝
11
-
12
- 用法:
13
- aixx install [推荐码] 安装AIXX skill到本地agent(含零配置)
14
- aixx install --yes 非交互安装(脚本/CI用,跳过确认)
15
- aixx config 配置或查看AIXX设置
16
- aixx test 测试AIXX是否可用
17
- aixx balance 查询账户余额(还剩多少钱)
18
- aixx models 列出可用模型(国产/海外分组)
19
- aixx recharge [金额] 充值引导(默认$5)
20
- aixx --version 查看版本
21
- aixx --help 显示此帮助
22
-
23
- 安装示例:
24
- npx aixxai install 普通安装(自动注册,送¥5额度)
25
- npx aixxai install zhangsan 通过张三的推荐码安装(张三获分润)
26
-
27
- 账户示例:
28
- aixx balance 查看余额
29
- aixx balance 20 (金额参数对balance无效,仅recharge用)
30
- aixx models 看有哪些模型可调
31
- aixx recharge 10 充 $10
32
-
33
- 关于AIXX:
34
- AIXX = "AI的谷歌"。装一个skill,agent就能调用全世界的AI能力。
35
- 永远不用碰key、参数、文档,一切通过对话。
36
-
37
- 文档:https://gitee.com/kk0803/token-hub
38
- `);
39
- }
40
-
41
- export function showVersion(version) {
42
- console.log(`AIXX CLI v${version}`);
43
- }
1
+ /**
2
+ * AIXX CLI - 帮助信息
3
+ */
4
+
5
+ export function showHelp(version) {
6
+ console.log(`
7
+ ╔══════════════════════════════════════════╗
8
+ ║ AIXX CLI v${version} ║
9
+ ║ 让你的AI调用万物 ║
10
+ ╚══════════════════════════════════════════╝
11
+
12
+ 用法:
13
+ aixx install [推荐码] 安装AIXX skill到本地agent(含零配置)
14
+ aixx install --yes 非交互安装(脚本/CI用,跳过确认)
15
+ aixx config 配置或查看AIXX设置
16
+ aixx test 测试AIXX是否可用
17
+ aixx balance 查询账户余额(还剩多少钱)
18
+ aixx models 列出可用模型(国产/海外分组)
19
+ aixx recharge [金额] 充值引导(默认$5)
20
+ aixx --version 查看版本
21
+ aixx --help 显示此帮助
22
+
23
+ 安装示例:
24
+ npx aixxai install 普通安装(自动注册,送¥5额度)
25
+ npx aixxai install zhangsan 通过张三的推荐码安装(张三获分润)
26
+
27
+ 账户示例:
28
+ aixx balance 查看余额
29
+ aixx balance 20 (金额参数对balance无效,仅recharge用)
30
+ aixx models 看有哪些模型可调
31
+ aixx recharge 10 充 $10
32
+
33
+ 关于AIXX:
34
+ AIXX = "AI的谷歌"。装一个skill,agent就能调用全世界的AI能力。
35
+ 永远不用碰key、参数、文档,一切通过对话。
36
+
37
+ 文档:https://gitee.com/kk0803/token-hub
38
+ `);
39
+ }
40
+
41
+ export function showVersion(version) {
42
+ console.log(`AIXX CLI v${version}`);
43
+ }