-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·47 lines (38 loc) · 1.09 KB
/
install.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
set -euo pipefail
# Claude Code Model Switcher - Install Script
# Supported: macOS, Linux, WSL
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
log_info() { echo -e "${GREEN}[INFO]${NC} $*"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*" >&2; }
log_error() { echo -e "${RED}[ERROR]${NC} $*" >&2; exit 1; }
check_pip() {
if command -v pip3 &>/dev/null; then
echo "pip3"
elif command -v pip &>/dev/null; then
echo "pip"
else
log_error "pip not found. Please install Python and pip first."
fi
}
main() {
local pip
pip=$(check_pip)
log_info "Installing claude-code-multi via $pip..."
$pip install -U claude-code-multi
log_info "Installation complete!"
# Check PATH
if command -v ccm &>/dev/null; then
log_info "Run 'ccm --help' to get started."
else
log_warn "ccm command not found. Add this to your shell rc:"
echo ""
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
echo ""
echo "Then run: source ~/.zshrc (or ~/.bashrc)"
fi
}
main "$@"