@team-semicolon/semo-cli 3.7.0 → 3.7.1
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/dist/index.js +0 -96
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2678,102 +2678,6 @@ program
|
|
|
2678
2678
|
}
|
|
2679
2679
|
console.log();
|
|
2680
2680
|
});
|
|
2681
|
-
// === doctor 명령어 ===
|
|
2682
|
-
program
|
|
2683
|
-
.command("doctor")
|
|
2684
|
-
.description("SEMO 및 MCP 설정 문제를 진단합니다")
|
|
2685
|
-
.action(() => {
|
|
2686
|
-
console.log(chalk_1.default.cyan.bold("\n🩺 SEMO 진단\n"));
|
|
2687
|
-
const cwd = process.cwd();
|
|
2688
|
-
let hasIssues = false;
|
|
2689
|
-
// 1. gh CLI 확인
|
|
2690
|
-
console.log(chalk_1.default.white.bold("GitHub CLI:"));
|
|
2691
|
-
try {
|
|
2692
|
-
const ghVersion = (0, child_process_1.execSync)("gh --version", { stdio: "pipe", encoding: "utf-8" }).split("\n")[0];
|
|
2693
|
-
console.log(chalk_1.default.green(` ✓ 설치됨 (${ghVersion.replace("gh version ", "")})`));
|
|
2694
|
-
// gh 인증 상태
|
|
2695
|
-
try {
|
|
2696
|
-
(0, child_process_1.execSync)("gh auth status", { stdio: "pipe" });
|
|
2697
|
-
console.log(chalk_1.default.green(" ✓ 인증됨"));
|
|
2698
|
-
}
|
|
2699
|
-
catch {
|
|
2700
|
-
console.log(chalk_1.default.red(" ✗ 인증 필요: gh auth login"));
|
|
2701
|
-
hasIssues = true;
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
catch {
|
|
2705
|
-
console.log(chalk_1.default.red(" ✗ 미설치: brew install gh"));
|
|
2706
|
-
hasIssues = true;
|
|
2707
|
-
}
|
|
2708
|
-
// 2. GitHub 토큰 확인
|
|
2709
|
-
console.log(chalk_1.default.white.bold("\nGitHub MCP 토큰:"));
|
|
2710
|
-
const ghToken = getGitHubTokenFromCLI();
|
|
2711
|
-
const envToken = process.env.GITHUB_PERSONAL_ACCESS_TOKEN;
|
|
2712
|
-
if (envToken) {
|
|
2713
|
-
console.log(chalk_1.default.green(" ✓ 환경변수 설정됨 (GITHUB_PERSONAL_ACCESS_TOKEN)"));
|
|
2714
|
-
}
|
|
2715
|
-
else if (ghToken) {
|
|
2716
|
-
console.log(chalk_1.default.yellow(" ⚠ gh CLI 토큰 있음 (환경변수 미설정)"));
|
|
2717
|
-
console.log(chalk_1.default.gray(" GitHub MCP 사용하려면:"));
|
|
2718
|
-
console.log(chalk_1.default.white(' export GITHUB_PERSONAL_ACCESS_TOKEN="$(gh auth token)"'));
|
|
2719
|
-
hasIssues = true;
|
|
2720
|
-
}
|
|
2721
|
-
else {
|
|
2722
|
-
console.log(chalk_1.default.red(" ✗ 토큰 없음"));
|
|
2723
|
-
console.log(chalk_1.default.gray(" 1. gh auth login 실행"));
|
|
2724
|
-
console.log(chalk_1.default.white(' 2. export GITHUB_PERSONAL_ACCESS_TOKEN="$(gh auth token)"'));
|
|
2725
|
-
hasIssues = true;
|
|
2726
|
-
}
|
|
2727
|
-
// 3. MCP 서버 등록 상태
|
|
2728
|
-
console.log(chalk_1.default.white.bold("\nMCP 서버:"));
|
|
2729
|
-
const requiredServers = ["semo-integrations", "github", "context7"];
|
|
2730
|
-
for (const server of requiredServers) {
|
|
2731
|
-
if (isMCPServerRegistered(server)) {
|
|
2732
|
-
console.log(chalk_1.default.green(` ✓ ${server}`));
|
|
2733
|
-
}
|
|
2734
|
-
else {
|
|
2735
|
-
console.log(chalk_1.default.yellow(` ⚠ ${server} 미등록`));
|
|
2736
|
-
hasIssues = true;
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
2739
|
-
// 4. settings.json 확인
|
|
2740
|
-
console.log(chalk_1.default.white.bold("\n설정 파일:"));
|
|
2741
|
-
const settingsPath = path.join(cwd, ".claude", "settings.json");
|
|
2742
|
-
if (fs.existsSync(settingsPath)) {
|
|
2743
|
-
console.log(chalk_1.default.green(" ✓ .claude/settings.json"));
|
|
2744
|
-
try {
|
|
2745
|
-
const settings = JSON.parse(fs.readFileSync(settingsPath, "utf-8"));
|
|
2746
|
-
if (settings.mcpServers?.github?.env?.GITHUB_PERSONAL_ACCESS_TOKEN) {
|
|
2747
|
-
console.log(chalk_1.default.green(" ✓ GitHub MCP 환경변수 설정됨"));
|
|
2748
|
-
}
|
|
2749
|
-
else {
|
|
2750
|
-
console.log(chalk_1.default.yellow(" ⚠ GitHub MCP 환경변수 누락"));
|
|
2751
|
-
hasIssues = true;
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
catch {
|
|
2755
|
-
console.log(chalk_1.default.yellow(" ⚠ settings.json 파싱 실패"));
|
|
2756
|
-
hasIssues = true;
|
|
2757
|
-
}
|
|
2758
|
-
}
|
|
2759
|
-
else {
|
|
2760
|
-
console.log(chalk_1.default.red(" ✗ .claude/settings.json 없음"));
|
|
2761
|
-
hasIssues = true;
|
|
2762
|
-
}
|
|
2763
|
-
// 결과
|
|
2764
|
-
console.log();
|
|
2765
|
-
if (hasIssues) {
|
|
2766
|
-
console.log(chalk_1.default.yellow.bold("⚠️ 일부 문제가 발견되었습니다."));
|
|
2767
|
-
console.log(chalk_1.default.gray("\nGitHub MCP 빠른 설정:"));
|
|
2768
|
-
console.log(chalk_1.default.white(' export GITHUB_PERSONAL_ACCESS_TOKEN="$(gh auth token)"'));
|
|
2769
|
-
console.log(chalk_1.default.gray("\n영구 설정 (셸 재시작 후 적용):"));
|
|
2770
|
-
console.log(chalk_1.default.white(' echo \'export GITHUB_PERSONAL_ACCESS_TOKEN="$(gh auth token)"\' >> ~/.zshrc'));
|
|
2771
|
-
}
|
|
2772
|
-
else {
|
|
2773
|
-
console.log(chalk_1.default.green.bold("✅ 모든 설정이 정상입니다."));
|
|
2774
|
-
}
|
|
2775
|
-
console.log();
|
|
2776
|
-
});
|
|
2777
2681
|
// === update 명령어 ===
|
|
2778
2682
|
program
|
|
2779
2683
|
.command("update")
|