@lgcyaxi/oh-my-claude 1.0.0 → 1.0.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/CHANGELOG.md +31 -0
- package/README.md +28 -11
- package/README.zh-CN.md +28 -11
- package/bin/oh-my-claude.js +4 -2
- package/changelog/v1.0.0.md +28 -0
- package/changelog/v1.0.1.md +28 -0
- package/dist/cli.js +94 -2
- package/dist/index-5ars1tn4.js +7348 -0
- package/dist/index.js +11 -1
- package/dist/mcp/server.js +138 -17
- package/package.json +3 -3
- package/src/agents/document-writer.ts +5 -0
- package/src/agents/explore.ts +5 -0
- package/src/agents/frontend-ui-ux.ts +5 -0
- package/src/agents/librarian.ts +5 -0
- package/src/agents/oracle.ts +5 -0
- package/src/agents/types.ts +11 -0
- package/src/cli.ts +126 -1
- package/src/config/loader.ts +73 -0
- package/src/config/schema.ts +25 -2
- package/src/generators/agent-generator.ts +17 -1
- package/src/mcp/background-agent-server/server.ts +6 -2
- package/src/mcp/background-agent-server/task-manager.ts +30 -4
- package/src/providers/router.ts +28 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
Individual version changelogs are available in the [changelog/](./changelog/) directory.
|
|
9
|
+
|
|
10
|
+
## [1.0.1] - 2025-01-15
|
|
11
|
+
|
|
12
|
+
See [changelog/v1.0.1.md](./changelog/v1.0.1.md) for details.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Self-update command (`update`)
|
|
16
|
+
- Automatic fallback to Claude models when API keys not configured
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Windows ESM path compatibility
|
|
20
|
+
|
|
21
|
+
## [1.0.0] - 2025-01-15
|
|
22
|
+
|
|
23
|
+
See [changelog/v1.0.0.md](./changelog/v1.0.0.md) for details.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Initial release
|
|
27
|
+
- Multi-provider MCP server (DeepSeek, ZhiPu GLM, MiniMax)
|
|
28
|
+
- Specialized agent workflows
|
|
29
|
+
- Slash commands and CLI tools
|
|
30
|
+
- Planning system with Prometheus
|
|
31
|
+
- Hook integration
|
package/README.md
CHANGED
|
@@ -101,17 +101,29 @@ npx @lgcyaxi/oh-my-claude doctor --detail
|
|
|
101
101
|
|
|
102
102
|
## Agent Workflows
|
|
103
103
|
|
|
104
|
-
| Agent | Provider | Model | Role |
|
|
105
|
-
|
|
106
|
-
| **Sisyphus** | Claude (Task tool) | claude-opus-4-5 | Primary orchestrator |
|
|
107
|
-
| **Claude-Reviewer** | Claude (Task tool) | claude-sonnet-4-5 | Code review, QA |
|
|
108
|
-
| **Claude-Scout** | Claude (Task tool) | claude-haiku-4-5 | Fast exploration |
|
|
109
|
-
| **Prometheus** | Claude (Task tool) | claude-opus-4-5 | Strategic planning |
|
|
110
|
-
| **Oracle** | DeepSeek (MCP) | deepseek-reasoner | Deep reasoning |
|
|
111
|
-
| **Librarian** | ZhiPu (MCP) | glm-4.7 | External research |
|
|
112
|
-
| **Explore** | DeepSeek (MCP) | deepseek-chat | Codebase search |
|
|
113
|
-
| **Frontend-UI-UX** | ZhiPu (MCP) | glm-4v-flash | Visual/UI design |
|
|
114
|
-
| **Document-Writer** | MiniMax (MCP) | MiniMax-M2.1 | Documentation |
|
|
104
|
+
| Agent | Provider | Model | Role | Fallback |
|
|
105
|
+
|-------|----------|-------|------|----------|
|
|
106
|
+
| **Sisyphus** | Claude (Task tool) | claude-opus-4-5 | Primary orchestrator | - |
|
|
107
|
+
| **Claude-Reviewer** | Claude (Task tool) | claude-sonnet-4-5 | Code review, QA | - |
|
|
108
|
+
| **Claude-Scout** | Claude (Task tool) | claude-haiku-4-5 | Fast exploration | - |
|
|
109
|
+
| **Prometheus** | Claude (Task tool) | claude-opus-4-5 | Strategic planning | - |
|
|
110
|
+
| **Oracle** | DeepSeek (MCP) | deepseek-reasoner | Deep reasoning | claude-opus-4-5 |
|
|
111
|
+
| **Librarian** | ZhiPu (MCP) | glm-4.7 | External research | claude-sonnet-4-5 |
|
|
112
|
+
| **Explore** | DeepSeek (MCP) | deepseek-chat | Codebase search | claude-haiku-4-5 |
|
|
113
|
+
| **Frontend-UI-UX** | ZhiPu (MCP) | glm-4v-flash | Visual/UI design | claude-sonnet-4-5 |
|
|
114
|
+
| **Document-Writer** | MiniMax (MCP) | MiniMax-M2.1 | Documentation | claude-sonnet-4-5 |
|
|
115
|
+
|
|
116
|
+
### Automatic Fallback
|
|
117
|
+
|
|
118
|
+
MCP agents automatically fall back to Claude models when the provider's API key is not configured:
|
|
119
|
+
|
|
120
|
+
- **Oracle** → `claude-opus-4-5` (preserves deep reasoning capability)
|
|
121
|
+
- **Librarian** → `claude-sonnet-4-5` (balanced research capability)
|
|
122
|
+
- **Explore** → `claude-haiku-4-5` (fast search operations)
|
|
123
|
+
- **Frontend-UI-UX** → `claude-sonnet-4-5` (quality visual design)
|
|
124
|
+
- **Document-Writer** → `claude-sonnet-4-5` (quality documentation)
|
|
125
|
+
|
|
126
|
+
This allows oh-my-claude to work with Claude Code's subscription even without external API keys.
|
|
115
127
|
|
|
116
128
|
## Official MCP Servers
|
|
117
129
|
|
|
@@ -134,6 +146,11 @@ npx @lgcyaxi/oh-my-claude install # Install oh-my-claude
|
|
|
134
146
|
npx @lgcyaxi/oh-my-claude install --force # Force reinstall
|
|
135
147
|
npx @lgcyaxi/oh-my-claude install --skip-mcp # Skip MCP server setup
|
|
136
148
|
|
|
149
|
+
# Update
|
|
150
|
+
npx @lgcyaxi/oh-my-claude update # Update to latest version
|
|
151
|
+
npx @lgcyaxi/oh-my-claude update --check # Check for updates only
|
|
152
|
+
npx @lgcyaxi/oh-my-claude update --force # Force reinstall latest
|
|
153
|
+
|
|
137
154
|
# Status & Diagnostics
|
|
138
155
|
npx @lgcyaxi/oh-my-claude status # Check installation status
|
|
139
156
|
npx @lgcyaxi/oh-my-claude doctor # Diagnose configuration
|
package/README.zh-CN.md
CHANGED
|
@@ -101,17 +101,29 @@ npx @lgcyaxi/oh-my-claude doctor --detail
|
|
|
101
101
|
|
|
102
102
|
## 智能体工作流
|
|
103
103
|
|
|
104
|
-
| 智能体 | 供应商 | 模型 | 角色 |
|
|
105
|
-
|
|
106
|
-
| **Sisyphus** | Claude(Task 工具)| claude-opus-4-5 | 主编排器 |
|
|
107
|
-
| **Claude-Reviewer** | Claude(Task 工具)| claude-sonnet-4-5 | 代码审查、质量保证 |
|
|
108
|
-
| **Claude-Scout** | Claude(Task 工具)| claude-haiku-4-5 | 快速探索 |
|
|
109
|
-
| **Prometheus** | Claude(Task 工具)| claude-opus-4-5 | 战略规划 |
|
|
110
|
-
| **Oracle** | DeepSeek(MCP)| deepseek-reasoner | 深度推理 |
|
|
111
|
-
| **Librarian** | 智谱(MCP)| glm-4.7 | 外部研究 |
|
|
112
|
-
| **Explore** | DeepSeek(MCP)| deepseek-chat | 代码库搜索 |
|
|
113
|
-
| **Frontend-UI-UX** | 智谱(MCP)| glm-4v-flash | 视觉/UI 设计 |
|
|
114
|
-
| **Document-Writer** | MiniMax(MCP)| MiniMax-M2.1 | 文档编写 |
|
|
104
|
+
| 智能体 | 供应商 | 模型 | 角色 | 降级模型 |
|
|
105
|
+
|--------|--------|------|------|----------|
|
|
106
|
+
| **Sisyphus** | Claude(Task 工具)| claude-opus-4-5 | 主编排器 | - |
|
|
107
|
+
| **Claude-Reviewer** | Claude(Task 工具)| claude-sonnet-4-5 | 代码审查、质量保证 | - |
|
|
108
|
+
| **Claude-Scout** | Claude(Task 工具)| claude-haiku-4-5 | 快速探索 | - |
|
|
109
|
+
| **Prometheus** | Claude(Task 工具)| claude-opus-4-5 | 战略规划 | - |
|
|
110
|
+
| **Oracle** | DeepSeek(MCP)| deepseek-reasoner | 深度推理 | claude-opus-4-5 |
|
|
111
|
+
| **Librarian** | 智谱(MCP)| glm-4.7 | 外部研究 | claude-sonnet-4-5 |
|
|
112
|
+
| **Explore** | DeepSeek(MCP)| deepseek-chat | 代码库搜索 | claude-haiku-4-5 |
|
|
113
|
+
| **Frontend-UI-UX** | 智谱(MCP)| glm-4v-flash | 视觉/UI 设计 | claude-sonnet-4-5 |
|
|
114
|
+
| **Document-Writer** | MiniMax(MCP)| MiniMax-M2.1 | 文档编写 | claude-sonnet-4-5 |
|
|
115
|
+
|
|
116
|
+
### 自动降级
|
|
117
|
+
|
|
118
|
+
当供应商的 API 密钥未配置时,MCP 智能体会自动降级到 Claude 模型:
|
|
119
|
+
|
|
120
|
+
- **Oracle** → `claude-opus-4-5`(保持深度推理能力)
|
|
121
|
+
- **Librarian** → `claude-sonnet-4-5`(平衡的研究能力)
|
|
122
|
+
- **Explore** → `claude-haiku-4-5`(快速搜索操作)
|
|
123
|
+
- **Frontend-UI-UX** → `claude-sonnet-4-5`(优质视觉设计)
|
|
124
|
+
- **Document-Writer** → `claude-sonnet-4-5`(优质文档编写)
|
|
125
|
+
|
|
126
|
+
这使得 oh-my-claude 即使没有外部 API 密钥也能通过 Claude Code 订阅正常工作。
|
|
115
127
|
|
|
116
128
|
## 官方 MCP 服务
|
|
117
129
|
|
|
@@ -134,6 +146,11 @@ npx @lgcyaxi/oh-my-claude install # 安装 oh-my-claude
|
|
|
134
146
|
npx @lgcyaxi/oh-my-claude install --force # 强制重新安装
|
|
135
147
|
npx @lgcyaxi/oh-my-claude install --skip-mcp # 跳过 MCP 服务设置
|
|
136
148
|
|
|
149
|
+
# 更新
|
|
150
|
+
npx @lgcyaxi/oh-my-claude update # 更新到最新版本
|
|
151
|
+
npx @lgcyaxi/oh-my-claude update --check # 仅检查更新
|
|
152
|
+
npx @lgcyaxi/oh-my-claude update --force # 强制重新安装最新版
|
|
153
|
+
|
|
137
154
|
# 状态和诊断
|
|
138
155
|
npx @lgcyaxi/oh-my-claude status # 检查安装状态
|
|
139
156
|
npx @lgcyaxi/oh-my-claude doctor # 诊断配置
|
package/bin/oh-my-claude.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { join, dirname } from "node:path";
|
|
11
|
-
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
12
12
|
|
|
13
13
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
14
|
const distCli = join(__dirname, "..", "dist", "cli.js");
|
|
@@ -17,7 +17,9 @@ const srcCli = join(__dirname, "..", "src", "cli.ts");
|
|
|
17
17
|
async function main() {
|
|
18
18
|
if (existsSync(distCli)) {
|
|
19
19
|
// Use compiled version
|
|
20
|
-
|
|
20
|
+
// Convert to file:// URL for Windows compatibility
|
|
21
|
+
const distCliUrl = pathToFileURL(distCli).href;
|
|
22
|
+
await import(distCliUrl);
|
|
21
23
|
} else if (existsSync(srcCli)) {
|
|
22
24
|
// Fall back to source (requires Bun)
|
|
23
25
|
const { spawn } = await import("node:child_process");
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# v1.0.0 - 2025-01-15
|
|
2
|
+
|
|
3
|
+
Initial release of oh-my-claude.
|
|
4
|
+
|
|
5
|
+
## Added
|
|
6
|
+
|
|
7
|
+
- **Multi-provider MCP server** supporting DeepSeek, ZhiPu GLM, and MiniMax via Anthropic-compatible APIs
|
|
8
|
+
- **Specialized agent workflows**:
|
|
9
|
+
- Sisyphus - Primary orchestrator (Claude Opus 4.5)
|
|
10
|
+
- Claude-Reviewer - Code review and QA (Claude Sonnet 4.5)
|
|
11
|
+
- Claude-Scout - Fast exploration (Claude Haiku 4.5)
|
|
12
|
+
- Prometheus - Strategic planning (Claude Opus 4.5)
|
|
13
|
+
- Oracle - Deep reasoning (DeepSeek reasoner)
|
|
14
|
+
- Librarian - External research (ZhiPu GLM)
|
|
15
|
+
- Explore - Codebase search (DeepSeek chat)
|
|
16
|
+
- Frontend-UI-UX - Visual/UI design (ZhiPu GLM-4v)
|
|
17
|
+
- Document-Writer - Documentation (MiniMax)
|
|
18
|
+
- **Slash commands**:
|
|
19
|
+
- Agent commands: `/omc-sisyphus`, `/omc-oracle`, `/omc-librarian`, `/omc-reviewer`, `/omc-scout`, `/omc-explore`, `/omc-plan`, `/omc-start-work`
|
|
20
|
+
- Quick actions: `/omcx-commit`, `/omcx-implement`, `/omcx-refactor`, `/omcx-docs`
|
|
21
|
+
- **CLI commands**:
|
|
22
|
+
- `install` - Install oh-my-claude into Claude Code
|
|
23
|
+
- `uninstall` - Remove oh-my-claude
|
|
24
|
+
- `status` - Check installation status
|
|
25
|
+
- `doctor` - Diagnose configuration with detailed component status
|
|
26
|
+
- `setup-mcp` - Install official MCP servers (Sequential Thinking, MiniMax, GLM)
|
|
27
|
+
- **Hook integration** for code quality checks and todo tracking
|
|
28
|
+
- **Concurrent execution** with per-provider rate limiting
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# v1.0.1 - 2025-01-15
|
|
2
|
+
|
|
3
|
+
Patch release with Windows fix, self-update command, and automatic fallback support.
|
|
4
|
+
|
|
5
|
+
## Added
|
|
6
|
+
|
|
7
|
+
- **Self-update command**: `npx @lgcyaxi/oh-my-claude update`
|
|
8
|
+
- Check current vs latest version from npm registry
|
|
9
|
+
- `--check` option to only check for updates without installing
|
|
10
|
+
- `--force` option to force reinstall even if already on latest version
|
|
11
|
+
- Automatically clears npx cache and runs install with @latest tag
|
|
12
|
+
|
|
13
|
+
- **Automatic fallback to Claude models**: MCP agents now automatically fall back to Claude models via Task tool when their provider's API key is not configured:
|
|
14
|
+
| Agent | Primary Provider | Fallback Model |
|
|
15
|
+
|-------|-----------------|----------------|
|
|
16
|
+
| Oracle | DeepSeek | claude-opus-4-5 |
|
|
17
|
+
| Librarian | ZhiPu | claude-sonnet-4-5 |
|
|
18
|
+
| Explore | DeepSeek | claude-haiku-4-5 |
|
|
19
|
+
| Frontend-UI-UX | ZhiPu | claude-sonnet-4-5 |
|
|
20
|
+
| Document-Writer | MiniMax | claude-sonnet-4-5 |
|
|
21
|
+
|
|
22
|
+
This allows oh-my-claude to work with Claude Code's subscription even without external API keys.
|
|
23
|
+
|
|
24
|
+
## Fixed
|
|
25
|
+
|
|
26
|
+
- **Windows compatibility**: Fixed `ERR_UNSUPPORTED_ESM_URL_SCHEME` error on Windows
|
|
27
|
+
- Used `pathToFileURL()` for dynamic imports in bin/oh-my-claude.js
|
|
28
|
+
- Converts paths like `C:\...` to proper `file:///C:/...` URLs
|
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
install,
|
|
9
9
|
loadConfig,
|
|
10
10
|
uninstall
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-5ars1tn4.js";
|
|
12
12
|
|
|
13
13
|
// node_modules/commander/lib/error.js
|
|
14
14
|
var require_error = __commonJS((exports) => {
|
|
@@ -2120,7 +2120,7 @@ var {
|
|
|
2120
2120
|
} = import__.default;
|
|
2121
2121
|
|
|
2122
2122
|
// src/cli.ts
|
|
2123
|
-
program.name("oh-my-claude").description("Multi-agent orchestration plugin for Claude Code").version("0.1
|
|
2123
|
+
program.name("oh-my-claude").description("Multi-agent orchestration plugin for Claude Code").version("1.0.1");
|
|
2124
2124
|
program.command("install").description("Install oh-my-claude into Claude Code").option("--skip-agents", "Skip agent file generation").option("--skip-hooks", "Skip hooks installation").option("--skip-mcp", "Skip MCP server installation").option("--force", "Force overwrite existing files").action(async (options) => {
|
|
2125
2125
|
console.log(`Installing oh-my-claude...
|
|
2126
2126
|
`);
|
|
@@ -2404,6 +2404,98 @@ ${header("Recommendations:")}`);
|
|
|
2404
2404
|
${dimText("Tip: Run 'oh-my-claude doctor --detail' for detailed component status")}`);
|
|
2405
2405
|
}
|
|
2406
2406
|
});
|
|
2407
|
+
program.command("update").description("Update oh-my-claude to the latest version").option("--check", "Only check for updates without installing").option("--force", "Force update even if already on latest version").action(async (options) => {
|
|
2408
|
+
const { execSync } = __require("node:child_process");
|
|
2409
|
+
const { readFileSync, existsSync } = __require("node:fs");
|
|
2410
|
+
const { join } = __require("node:path");
|
|
2411
|
+
const { homedir } = __require("node:os");
|
|
2412
|
+
const useColor = process.stdout.isTTY;
|
|
2413
|
+
const c = {
|
|
2414
|
+
reset: useColor ? "\x1B[0m" : "",
|
|
2415
|
+
bold: useColor ? "\x1B[1m" : "",
|
|
2416
|
+
dim: useColor ? "\x1B[2m" : "",
|
|
2417
|
+
green: useColor ? "\x1B[32m" : "",
|
|
2418
|
+
red: useColor ? "\x1B[31m" : "",
|
|
2419
|
+
yellow: useColor ? "\x1B[33m" : "",
|
|
2420
|
+
cyan: useColor ? "\x1B[36m" : "",
|
|
2421
|
+
magenta: useColor ? "\x1B[35m" : ""
|
|
2422
|
+
};
|
|
2423
|
+
const ok = (text) => `${c.green}✓${c.reset} ${text}`;
|
|
2424
|
+
const fail = (text) => `${c.red}✗${c.reset} ${text}`;
|
|
2425
|
+
const warn = (text) => `${c.yellow}⚠${c.reset} ${text}`;
|
|
2426
|
+
const header = (text) => `${c.cyan}${c.bold}${text}${c.reset}`;
|
|
2427
|
+
const dimText = (text) => `${c.dim}${text}${c.reset}`;
|
|
2428
|
+
const PACKAGE_NAME = "@lgcyaxi/oh-my-claude";
|
|
2429
|
+
console.log(`${c.bold}${c.magenta}oh-my-claude Update${c.reset}
|
|
2430
|
+
`);
|
|
2431
|
+
let currentVersion = "unknown";
|
|
2432
|
+
try {
|
|
2433
|
+
const installDir = join(homedir(), ".claude", "oh-my-claude");
|
|
2434
|
+
const localPkgPath = join(installDir, "package.json");
|
|
2435
|
+
if (existsSync(localPkgPath)) {
|
|
2436
|
+
const pkg = JSON.parse(readFileSync(localPkgPath, "utf-8"));
|
|
2437
|
+
currentVersion = pkg.version;
|
|
2438
|
+
} else {
|
|
2439
|
+
currentVersion = program.version() || "unknown";
|
|
2440
|
+
}
|
|
2441
|
+
} catch (error) {
|
|
2442
|
+
currentVersion = program.version() || "unknown";
|
|
2443
|
+
}
|
|
2444
|
+
console.log(`Current version: ${c.cyan}${currentVersion}${c.reset}`);
|
|
2445
|
+
let latestVersion = "unknown";
|
|
2446
|
+
try {
|
|
2447
|
+
console.log(`${dimText("Checking npm registry for latest version...")}`);
|
|
2448
|
+
const npmInfo = execSync(`npm view ${PACKAGE_NAME} version 2>/dev/null`, {
|
|
2449
|
+
encoding: "utf-8"
|
|
2450
|
+
}).trim();
|
|
2451
|
+
latestVersion = npmInfo;
|
|
2452
|
+
console.log(`Latest version: ${c.cyan}${latestVersion}${c.reset}
|
|
2453
|
+
`);
|
|
2454
|
+
} catch (error) {
|
|
2455
|
+
console.log(`${fail("Failed to fetch latest version from npm")}`);
|
|
2456
|
+
console.log(`${dimText("Check your internet connection or try again later")}
|
|
2457
|
+
`);
|
|
2458
|
+
process.exit(1);
|
|
2459
|
+
}
|
|
2460
|
+
const isUpToDate = currentVersion === latestVersion;
|
|
2461
|
+
const needsUpdate = !isUpToDate || options.force;
|
|
2462
|
+
if (isUpToDate && !options.force) {
|
|
2463
|
+
console.log(ok("You are already on the latest version!"));
|
|
2464
|
+
process.exit(0);
|
|
2465
|
+
}
|
|
2466
|
+
if (options.check) {
|
|
2467
|
+
if (needsUpdate) {
|
|
2468
|
+
console.log(warn(`Update available: ${currentVersion} → ${latestVersion}`));
|
|
2469
|
+
console.log(`
|
|
2470
|
+
Run ${c.cyan}npx ${PACKAGE_NAME} update${c.reset} to update.`);
|
|
2471
|
+
}
|
|
2472
|
+
process.exit(0);
|
|
2473
|
+
}
|
|
2474
|
+
console.log(header(`Updating oh-my-claude...
|
|
2475
|
+
`));
|
|
2476
|
+
try {
|
|
2477
|
+
console.log(`${dimText("Clearing npx cache...")}`);
|
|
2478
|
+
try {
|
|
2479
|
+
execSync(`npx --yes clear-npx-cache 2>/dev/null || true`, { stdio: "pipe" });
|
|
2480
|
+
} catch {}
|
|
2481
|
+
console.log(`${dimText("Downloading latest version...")}`);
|
|
2482
|
+
const updateCmd = `npx --yes ${PACKAGE_NAME}@latest install --force`;
|
|
2483
|
+
console.log(`${dimText(`Running: ${updateCmd}`)}
|
|
2484
|
+
`);
|
|
2485
|
+
execSync(updateCmd, { stdio: "inherit" });
|
|
2486
|
+
console.log(`
|
|
2487
|
+
${ok("Update complete!")}`);
|
|
2488
|
+
console.log(`Updated from ${c.yellow}${currentVersion}${c.reset} to ${c.green}${latestVersion}${c.reset}`);
|
|
2489
|
+
console.log(`
|
|
2490
|
+
${dimText("View changelog at: https://github.com/lgcyaxi/oh-my-claude/blob/main/CHANGELOG.md")}`);
|
|
2491
|
+
} catch (error) {
|
|
2492
|
+
console.log(`
|
|
2493
|
+
${fail("Update failed")}`);
|
|
2494
|
+
console.log(`${dimText("Try running manually:")}`);
|
|
2495
|
+
console.log(` ${c.cyan}npx ${PACKAGE_NAME}@latest install --force${c.reset}`);
|
|
2496
|
+
process.exit(1);
|
|
2497
|
+
}
|
|
2498
|
+
});
|
|
2407
2499
|
program.command("setup-mcp").description("Install official MCP servers (MiniMax, GLM/ZhiPu)").option("--minimax", "Install MiniMax MCP only").option("--glm", "Install GLM/ZhiPu MCPs only").option("--thinking", "Install Sequential Thinking MCP only").option("--list", "List available MCP servers").action(async (options) => {
|
|
2408
2500
|
const { execSync, spawnSync } = __require("node:child_process");
|
|
2409
2501
|
const useColor = process.stdout.isTTY;
|