@tdsoft-tech/aikit 0.1.7 → 0.1.8

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 CHANGED
@@ -3,13 +3,15 @@
3
3
  ## [Unreleased]
4
4
 
5
5
  ### Added
6
- - ✨ CLI tool detection và installation (v0.1.5)
6
+ - ✨ CLI tool detection và installation (v0.1.8)
7
7
  - Auto-detect OpenCode, Claude CLI, và GitHub CLI
8
- - Interactive prompt để chọn cài đặt CLI tools chưa được install
8
+ - Interactive prompt với 3 options 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
- - 🆕 **NEW**: Option `--skip-cli-tools` để bỏ qua bước CLI tools detection
12
- - Phù hợp cho CI/CD hoặc automation scripts
14
+ - Cải thiện message để 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
@@ -4218,7 +4218,7 @@ init_logger();
4218
4218
  init_paths();
4219
4219
  var program = new Command();
4220
4220
  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").option("--skip-cli-tools", "Skip CLI tool detection and installation").action(async (options) => {
4221
+ program.command("init").description("Initialize AIKit configuration").option("-g, --global", "Initialize global configuration").option("-p, --project", "Initialize project-level configuration").action(async (options) => {
4222
4222
  const configDir = options.global ? paths.globalConfig() : paths.projectConfig();
4223
4223
  console.log(chalk2.bold("\n\u{1F680} AIKit Setup\n"));
4224
4224
  logger.info(`Initializing AIKit in ${configDir}...`);
@@ -4232,17 +4232,56 @@ program.command("init").description("Initialize AIKit configuration").option("-g
4232
4232
  if (result.count > 0) {
4233
4233
  logger.success(`\u2713 Synced ${result.count} skills`);
4234
4234
  }
4235
- if (!options.skipCliTools) {
4236
- console.log(chalk2.bold("\n\u{1F50D} Checking CLI tools...\n"));
4237
- const cliTools = await CliDetector.checkAll();
4238
- const installableTools = CliDetector.filterInstallable(cliTools);
4239
- for (const tool of cliTools) {
4240
- const status = tool.installed ? chalk2.green("\u2713 Installed") : chalk2.yellow("\u2717 Not installed");
4241
- const version = tool.version ? chalk2.gray(` (${tool.version})`) : "";
4242
- console.log(` ${status} ${chalk2.cyan(tool.displayName)}${version}`);
4243
- }
4244
- if (installableTools.length > 0) {
4235
+ console.log(chalk2.bold("\n\u{1F50D} Checking CLI tools...\n"));
4236
+ const cliTools = await CliDetector.checkAll();
4237
+ const installableTools = CliDetector.filterInstallable(cliTools);
4238
+ for (const tool of cliTools) {
4239
+ const status = tool.installed ? chalk2.green("\u2713 Installed") : chalk2.yellow("\u2717 Not installed");
4240
+ const version = tool.version ? chalk2.gray(` (${tool.version})`) : "";
4241
+ console.log(` ${status} ${chalk2.cyan(tool.displayName)}${version}`);
4242
+ }
4243
+ if (installableTools.length > 0) {
4244
+ console.log();
4245
+ const { action } = await inquirer.prompt([
4246
+ {
4247
+ type: "list",
4248
+ name: "action",
4249
+ message: "How would you like to proceed?",
4250
+ choices: [
4251
+ {
4252
+ name: "all",
4253
+ value: "all",
4254
+ short: "a",
4255
+ message: "Install all missing CLI tools"
4256
+ },
4257
+ {
4258
+ name: "select",
4259
+ value: "select",
4260
+ short: "s",
4261
+ message: "Select specific tools to install (use space to select, Enter to confirm)"
4262
+ },
4263
+ {
4264
+ name: "skip",
4265
+ value: "skip",
4266
+ short: "n",
4267
+ message: "Skip CLI tool installation"
4268
+ }
4269
+ ],
4270
+ default: "all"
4271
+ }
4272
+ ]);
4273
+ if (action === "skip") {
4274
+ console.log();
4275
+ logger.info("Skipping CLI tool installation");
4276
+ } else if (action === "all") {
4245
4277
  console.log();
4278
+ logger.info(`Installing ${installableTools.length} CLI tool(s)...`);
4279
+ for (const tool of installableTools) {
4280
+ await installCliTool(tool);
4281
+ }
4282
+ console.log();
4283
+ logger.success("\u2713 CLI tools installed");
4284
+ } else {
4246
4285
  const { installTools } = await inquirer.prompt([
4247
4286
  {
4248
4287
  type: "checkbox",
@@ -4268,10 +4307,10 @@ program.command("init").description("Initialize AIKit configuration").option("-g
4268
4307
  console.log();
4269
4308
  logger.info("Skipping CLI tool installation");
4270
4309
  }
4271
- } else {
4272
- console.log();
4273
- logger.success("\u2713 All CLI tools already installed");
4274
4310
  }
4311
+ } else {
4312
+ console.log();
4313
+ logger.success("\u2713 All CLI tools already installed");
4275
4314
  }
4276
4315
  const beads = new BeadsIntegration();
4277
4316
  const beadsStatus = await beads.getStatus();