"use strict";
const installer = require("../lib/hooks-installer");

try {
  const r = installer.install();
  console.log(`已安裝 ${r.events.length} 個 Claude Code hook 事件到 ${r.settingsPath}`);
  console.log(`hook 指令：${r.command}`);
  if (r.backupPath) console.log(`原設定備份：${r.backupPath}`);
  console.log("注意：已開啟的 Claude Code session 要重新啟動才會載入新的 hooks。");
} catch (err) {
  console.error(err.message || err);
  process.exitCode = 1;
}
