mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-05 02:30:26 +08:00
引入模块化安装系统,支持可配置的工作流组合: 核心改进: - .claude-plugin/marketplace.json: 移除废弃模块引用,精简插件清单 - .gitignore: 添加 Python 开发环境忽略项(.venv, __pycache__, .coverage) - Makefile: 标记 make install 为 LEGACY,推荐使用 install.py - install.sh: codex-wrapper 安装脚本,添加到 PATH 新架构使用 config.json 控制模块启用/禁用,支持: - 选择性安装工作流(dev/bmad/requirements/essentials) - 声明式操作定义(merge_dir/copy_file/run_command) - 版本化配置管理 迁移路径: make install -> python3 install.py --install-dir ~/.claude 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.4 KiB
Bash
54 lines
1.4 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "⚠️ WARNING: install.sh is LEGACY and will be removed in future versions."
|
|
echo "Please use the new installation method:"
|
|
echo " python3 install.py --install-dir ~/.claude"
|
|
echo ""
|
|
echo "Continuing with legacy installation in 5 seconds..."
|
|
sleep 5
|
|
|
|
# Detect platform
|
|
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
ARCH=$(uname -m)
|
|
|
|
# Normalize architecture names
|
|
case "$ARCH" in
|
|
x86_64) ARCH="amd64" ;;
|
|
aarch64|arm64) ARCH="arm64" ;;
|
|
*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;
|
|
esac
|
|
|
|
# Build download URL
|
|
REPO="cexll/myclaude"
|
|
VERSION="latest"
|
|
BINARY_NAME="codex-wrapper-${OS}-${ARCH}"
|
|
URL="https://github.com/${REPO}/releases/${VERSION}/download/${BINARY_NAME}"
|
|
|
|
echo "Downloading codex-wrapper from ${URL}..."
|
|
if ! curl -fsSL "$URL" -o /tmp/codex-wrapper; then
|
|
echo "ERROR: failed to download binary" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$HOME/bin"
|
|
|
|
mv /tmp/codex-wrapper "$HOME/bin/codex-wrapper"
|
|
chmod +x "$HOME/bin/codex-wrapper"
|
|
|
|
if "$HOME/bin/codex-wrapper" --version >/dev/null 2>&1; then
|
|
echo "codex-wrapper installed successfully to ~/bin/codex-wrapper"
|
|
else
|
|
echo "ERROR: installation verification failed" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then
|
|
echo ""
|
|
echo "WARNING: ~/bin is not in your PATH"
|
|
echo "Add this line to your ~/.bashrc or ~/.zshrc:"
|
|
echo ""
|
|
echo " export PATH=\"\$HOME/bin:\$PATH\""
|
|
echo ""
|
|
fi
|