@tdsoft-tech/aikit 0.1.7 → 0.1.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/CHANGELOG.md +6 -4
- package/dist/cli.js +60 -16
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
|
-
- ✨ CLI tool detection và installation (v0.1.
|
|
6
|
+
- ✨ CLI tool detection và installation (v0.1.8)
|
|
7
7
|
- Auto-detect OpenCode, Claude CLI, và GitHub CLI
|
|
8
|
-
- Interactive prompt
|
|
8
|
+
- Interactive prompt với 3 options rõ ràng:
|
|
9
|
+
- `a` - Install tất cả missing CLI tools (default)
|
|
10
|
+
- `s` - Chọn từng tool cụ thể
|
|
11
|
+
- `n` - Skip CLI tool installation
|
|
9
12
|
- Hỗ trợ cài đặt cho: OpenCode, Claude CLI, GitHub CLI
|
|
10
13
|
- Display status cho từng CLI tool (installed/not installed + version)
|
|
11
|
-
-
|
|
12
|
-
- Phù hợp cho CI/CD hoặc automation scripts
|
|
14
|
+
- Cải thiện message để rõ ràng: "Select specific tools to install (use space to select, Enter to confirm)"
|
|
13
15
|
- ✨ New command `/analyze-figma` - Tự động phân tích Figma design và extract design tokens
|
|
14
16
|
- Không cần user phải viết prompt dài
|
|
15
17
|
- Tự động gọi @vision agent
|
package/dist/cli.js
CHANGED
|
@@ -4117,13 +4117,18 @@ var CliDetector = class {
|
|
|
4117
4117
|
try {
|
|
4118
4118
|
const opencodePath = process.platform === "win32" ? process.env.APPDATA || join12(homedir2(), "AppData", "Roaming") : join12(homedir2(), ".config");
|
|
4119
4119
|
const opencodeConfig = join12(opencodePath, "opencode", "opencode.json");
|
|
4120
|
-
|
|
4120
|
+
let installed = existsSync4(opencodeConfig);
|
|
4121
4121
|
let version;
|
|
4122
4122
|
if (installed) {
|
|
4123
4123
|
try {
|
|
4124
4124
|
execSync("opencode --version", { stdio: "ignore" });
|
|
4125
4125
|
version = "installed";
|
|
4126
|
-
} catch {
|
|
4126
|
+
} catch (error) {
|
|
4127
|
+
if (existsSync4(opencodeConfig)) {
|
|
4128
|
+
version = "installed (config exists)";
|
|
4129
|
+
} else {
|
|
4130
|
+
installed = false;
|
|
4131
|
+
}
|
|
4127
4132
|
}
|
|
4128
4133
|
}
|
|
4129
4134
|
return {
|
|
@@ -4218,7 +4223,7 @@ init_logger();
|
|
|
4218
4223
|
init_paths();
|
|
4219
4224
|
var program = new Command();
|
|
4220
4225
|
program.name("aikit").description("Open-source AI coding agent toolkit for OpenCode").version(getVersion());
|
|
4221
|
-
program.command("init").description("Initialize AIKit configuration").option("-g, --global", "Initialize global configuration").option("-p, --project", "Initialize project-level configuration").
|
|
4226
|
+
program.command("init").description("Initialize AIKit configuration").option("-g, --global", "Initialize global configuration").option("-p, --project", "Initialize project-level configuration").action(async (options) => {
|
|
4222
4227
|
const configDir = options.global ? paths.globalConfig() : paths.projectConfig();
|
|
4223
4228
|
console.log(chalk2.bold("\n\u{1F680} AIKit Setup\n"));
|
|
4224
4229
|
logger.info(`Initializing AIKit in ${configDir}...`);
|
|
@@ -4232,17 +4237,56 @@ program.command("init").description("Initialize AIKit configuration").option("-g
|
|
|
4232
4237
|
if (result.count > 0) {
|
|
4233
4238
|
logger.success(`\u2713 Synced ${result.count} skills`);
|
|
4234
4239
|
}
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4240
|
+
console.log(chalk2.bold("\n\u{1F50D} Checking CLI tools...\n"));
|
|
4241
|
+
const cliTools = await CliDetector.checkAll();
|
|
4242
|
+
const installableTools = CliDetector.filterInstallable(cliTools);
|
|
4243
|
+
for (const tool of cliTools) {
|
|
4244
|
+
const status = tool.isInstalled ? chalk2.green("\u2713 Installed") : chalk2.yellow("\u2717 Not installed");
|
|
4245
|
+
const version = tool.version ? chalk2.gray(` (${tool.version})`) : "";
|
|
4246
|
+
console.log(` ${status} ${chalk2.cyan(tool.displayName)}${version}`);
|
|
4247
|
+
}
|
|
4248
|
+
if (installableTools.length > 0) {
|
|
4249
|
+
console.log();
|
|
4250
|
+
const { action } = await inquirer.prompt([
|
|
4251
|
+
{
|
|
4252
|
+
type: "list",
|
|
4253
|
+
name: "action",
|
|
4254
|
+
message: "How would you like to proceed?",
|
|
4255
|
+
choices: [
|
|
4256
|
+
{
|
|
4257
|
+
name: "all",
|
|
4258
|
+
value: "all",
|
|
4259
|
+
short: "a",
|
|
4260
|
+
message: "Install all missing CLI tools"
|
|
4261
|
+
},
|
|
4262
|
+
{
|
|
4263
|
+
name: "select",
|
|
4264
|
+
value: "select",
|
|
4265
|
+
short: "s",
|
|
4266
|
+
message: "Select specific tools to install (use space to select, Enter to confirm)"
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
name: "skip",
|
|
4270
|
+
value: "skip",
|
|
4271
|
+
short: "n",
|
|
4272
|
+
message: "Skip CLI tool installation"
|
|
4273
|
+
}
|
|
4274
|
+
],
|
|
4275
|
+
default: "all"
|
|
4276
|
+
}
|
|
4277
|
+
]);
|
|
4278
|
+
if (action === "skip") {
|
|
4279
|
+
console.log();
|
|
4280
|
+
logger.info("Skipping CLI tool installation");
|
|
4281
|
+
} else if (action === "all") {
|
|
4282
|
+
console.log();
|
|
4283
|
+
logger.info(`Installing ${installableTools.length} CLI tool(s)...`);
|
|
4284
|
+
for (const tool of installableTools) {
|
|
4285
|
+
await installCliTool(tool);
|
|
4286
|
+
}
|
|
4245
4287
|
console.log();
|
|
4288
|
+
logger.success("\u2713 CLI tools installed");
|
|
4289
|
+
} else {
|
|
4246
4290
|
const { installTools } = await inquirer.prompt([
|
|
4247
4291
|
{
|
|
4248
4292
|
type: "checkbox",
|
|
@@ -4268,10 +4312,10 @@ program.command("init").description("Initialize AIKit configuration").option("-g
|
|
|
4268
4312
|
console.log();
|
|
4269
4313
|
logger.info("Skipping CLI tool installation");
|
|
4270
4314
|
}
|
|
4271
|
-
} else {
|
|
4272
|
-
console.log();
|
|
4273
|
-
logger.success("\u2713 All CLI tools already installed");
|
|
4274
4315
|
}
|
|
4316
|
+
} else {
|
|
4317
|
+
console.log();
|
|
4318
|
+
logger.success("\u2713 All CLI tools already installed");
|
|
4275
4319
|
}
|
|
4276
4320
|
const beads = new BeadsIntegration();
|
|
4277
4321
|
const beadsStatus = await beads.getStatus();
|