@naarang/ccc 2.0.0-beta.1 → 2.0.0-beta.5

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.
@@ -1,15 +1,26 @@
1
1
  # CCC - Code Chat Connect Installer for Windows
2
2
  # https://github.com/naarang/ccc
3
3
  #
4
- # Usage: irm https://getc3.app/install.ps1 | iex
4
+ # Usage:
5
+ # irm https://getc3.app/install.ps1 | iex # Install stable
6
+ # $env:CCC_CHANNEL='beta'; irm https://getc3.app/install.ps1 | iex # Install beta
7
+ # $env:CCC_CHANNEL='alpha'; irm https://getc3.app/install.ps1 | iex # Install alpha
5
8
 
6
9
  $ErrorActionPreference = "Stop"
7
10
 
8
11
  # Configuration
9
- $GITHUB_REPO = "naarang/ccc"
10
- $INSTALL_DIR = if ($env:CCC_INSTALL_DIR) { $env:CCC_INSTALL_DIR } else { "$env:USERPROFILE\.ccc" }
12
+ # Public releases repository (binaries are published here for public access)
13
+ $GITHUB_REPO = "vishal-android-freak/ccc-releases"
14
+ $INSTALL_DIR = if ($env:CCC_INSTALL_DIR) { $env:CCC_INSTALL_DIR } else { "$env:USERPROFILE\.local" }
11
15
  $BIN_DIR = "$INSTALL_DIR\bin"
12
16
 
17
+ # Channel selection (stable, beta, alpha) - set via CCC_CHANNEL env var
18
+ $Channel = if ($env:CCC_CHANNEL) { $env:CCC_CHANNEL.ToLower() } else { "stable" }
19
+ if ($Channel -notin @("stable", "beta", "alpha")) {
20
+ Write-Host "Invalid channel: $Channel. Using 'stable'." -ForegroundColor Yellow
21
+ $Channel = "stable"
22
+ }
23
+
13
24
  function Write-ColorOutput($ForegroundColor) {
14
25
  $fc = $host.UI.RawUI.ForegroundColor
15
26
  $host.UI.RawUI.ForegroundColor = $ForegroundColor
@@ -55,17 +66,35 @@ function Detect-Platform {
55
66
  }
56
67
 
57
68
  function Get-LatestVersion {
58
- Write-Host "Fetching latest version..." -ForegroundColor Blue
69
+ Write-Host "Fetching latest $Channel version..." -ForegroundColor Blue
59
70
 
60
71
  try {
61
- $response = Invoke-RestMethod -Uri "https://api.github.com/repos/$GITHUB_REPO/releases/latest" -Method Get
62
- $script:VERSION = $response.tag_name -replace '^v', ''
72
+ if ($Channel -eq "stable") {
73
+ # For stable, use /releases/latest (excludes prereleases)
74
+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/$GITHUB_REPO/releases/latest" -Method Get
75
+ $script:VERSION = $response.tag_name -replace '^v', ''
76
+ }
77
+ else {
78
+ # For beta/alpha, fetch all releases and find matching prerelease
79
+ $releases = Invoke-RestMethod -Uri "https://api.github.com/repos/$GITHUB_REPO/releases?per_page=20" -Method Get
80
+ $matchingRelease = $releases | Where-Object {
81
+ $_.prerelease -eq $true -and $_.tag_name -match $Channel
82
+ } | Select-Object -First 1
83
+
84
+ if ($null -eq $matchingRelease) {
85
+ throw "No $Channel release found"
86
+ }
87
+ $script:VERSION = $matchingRelease.tag_name -replace '^v', ''
88
+ }
89
+
63
90
  Write-Host "Latest version: " -ForegroundColor Green -NoNewline
64
- Write-Host $VERSION
91
+ Write-Host "$VERSION ($Channel)"
65
92
  }
66
93
  catch {
67
- Write-Host "Error: Could not determine latest version" -ForegroundColor Red
68
- Write-Host "Please check your internet connection or try again later."
94
+ Write-Host "Error: Could not find a $Channel release" -ForegroundColor Red
95
+ if ($Channel -eq "stable") {
96
+ Write-Host "No stable release available yet. Try: .\install.ps1 -Channel beta"
97
+ }
69
98
  exit 1
70
99
  }
71
100
  }
@@ -102,14 +131,11 @@ function Setup-Path {
102
131
  $currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
103
132
 
104
133
  if ($currentPath -notlike "*$BIN_DIR*") {
105
- # Add to user PATH
106
- $newPath = "$BIN_DIR;$currentPath"
107
- [Environment]::SetEnvironmentVariable("Path", $newPath, "User")
108
-
109
- # Update current session
134
+ $script:PATH_IN_ENV = $false
135
+ # Update current session only (don't modify user PATH automatically)
110
136
  $env:Path = "$BIN_DIR;$env:Path"
111
-
112
- Write-Host "Added CCC to PATH" -ForegroundColor Green
137
+ } else {
138
+ $script:PATH_IN_ENV = $true
113
139
  }
114
140
  }
115
141
 
@@ -138,7 +164,22 @@ function Verify-Installation {
138
164
  Write-Host "ccc --help" -ForegroundColor White -NoNewline
139
165
  Write-Host " for usage information."
140
166
  Write-Host ""
141
- Write-Host "Note: You may need to restart your terminal for PATH changes to take effect." -ForegroundColor Yellow
167
+
168
+ # Show PATH instructions if not already in PATH
169
+ if (-not $script:PATH_IN_ENV) {
170
+ Write-Host "Note: " -ForegroundColor Yellow -NoNewline
171
+ Write-Host "~\.local\bin is not in your PATH" -ForegroundColor Yellow
172
+ Write-Host ""
173
+ Write-Host "Add it to your PATH by running one of the following commands:" -ForegroundColor White
174
+ Write-Host ""
175
+ Write-Host " # Add to user PATH permanently (recommended):" -ForegroundColor Cyan
176
+ Write-Host " [Environment]::SetEnvironmentVariable('Path', `"`$env:USERPROFILE\.local\bin;`$([Environment]::GetEnvironmentVariable('Path', 'User'))`", 'User')" -ForegroundColor Gray
177
+ Write-Host ""
178
+ Write-Host " # Or add to current session only:" -ForegroundColor Cyan
179
+ Write-Host " `$env:Path = `"`$env:USERPROFILE\.local\bin;`$env:Path`"" -ForegroundColor Gray
180
+ Write-Host ""
181
+ Write-Host "Then restart your terminal for the changes to take effect." -ForegroundColor Yellow
182
+ }
142
183
  }
143
184
  else {
144
185
  Write-Host "Installation failed. Please try again." -ForegroundColor Red
@@ -1,197 +1,265 @@
1
- #!/bin/bash
2
- # CCC - Code Chat Connect Installer
3
- # https://github.com/naarang/ccc
4
- #
5
- # Usage: curl -fsSL https://getc3.app/install.sh | bash
6
-
7
- set -e
8
-
9
- # Colors
10
- RED='\033[0;31m'
11
- GREEN='\033[0;32m'
12
- YELLOW='\033[1;33m'
13
- BLUE='\033[0;34m'
14
- CYAN='\033[0;36m'
15
- NC='\033[0m'
16
- BOLD='\033[1m'
17
-
18
- # Configuration
19
- GITHUB_REPO="naarang/ccc"
20
- INSTALL_DIR="${CCC_INSTALL_DIR:-$HOME/.ccc}"
21
- BIN_DIR="$INSTALL_DIR/bin"
22
-
23
- # Print banner
24
- print_banner() {
25
- echo -e "${CYAN}"
26
- echo ' ____ ____ ____ '
27
- echo ' / ___/ ___/ ___|'
28
- echo ' | | | | | | '
29
- echo ' | |__| |__| |___ '
30
- echo ' \____\____\____|'
31
- echo -e "${NC}"
32
- echo -e "${BOLD}Code Chat Connect${NC} - Control Claude Code from your mobile"
33
- echo ""
34
- }
35
-
36
- # Detect OS and architecture
37
- detect_platform() {
38
- OS="$(uname -s)"
39
- ARCH="$(uname -m)"
40
-
41
- case "$OS" in
42
- Linux*)
43
- PLATFORM="linux"
44
- ;;
45
- Darwin*)
46
- PLATFORM="darwin"
47
- ;;
48
- MINGW*|MSYS*|CYGWIN*)
49
- echo -e "${RED}Error: Please use install.ps1 for Windows${NC}"
50
- echo "Run: irm https://getc3.app/install.ps1 | iex"
51
- exit 1
52
- ;;
53
- *)
54
- echo -e "${RED}Error: Unsupported operating system: $OS${NC}"
55
- exit 1
56
- ;;
57
- esac
58
-
59
- case "$ARCH" in
60
- x86_64|amd64)
61
- ARCH="x64"
62
- ;;
63
- arm64|aarch64)
64
- ARCH="arm64"
65
- ;;
66
- *)
67
- echo -e "${RED}Error: Unsupported architecture: $ARCH${NC}"
68
- exit 1
69
- ;;
70
- esac
71
-
72
- BINARY_NAME="ccc-${PLATFORM}-${ARCH}"
73
- echo -e "${BLUE}Detected platform:${NC} ${PLATFORM}-${ARCH}"
74
- }
75
-
76
- # Get latest release version
77
- get_latest_version() {
78
- echo -e "${BLUE}Fetching latest version...${NC}"
79
-
80
- # Try GitHub API first
81
- if command -v curl &> /dev/null; then
82
- VERSION=$(curl -fsSL "https://api.github.com/repos/${GITHUB_REPO}/releases/latest" 2>/dev/null | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' || echo "")
83
- fi
84
-
85
- if [ -z "$VERSION" ]; then
86
- echo -e "${RED}Error: Could not determine latest version${NC}"
87
- echo "Please check your internet connection or try again later."
88
- exit 1
89
- fi
90
-
91
- # Remove 'v' prefix if present
92
- VERSION="${VERSION#v}"
93
- echo -e "${GREEN}Latest version:${NC} ${VERSION}"
94
- }
95
-
96
- # Download binary
97
- download_binary() {
98
- echo -e "${BLUE}Downloading CCC ${VERSION} for ${PLATFORM}-${ARCH}...${NC}"
99
-
100
- # Create directories
101
- mkdir -p "$BIN_DIR"
102
-
103
- DOWNLOAD_URL="https://github.com/${GITHUB_REPO}/releases/download/v${VERSION}/${BINARY_NAME}"
104
- BINARY_PATH="$BIN_DIR/ccc"
105
-
106
- # Download with progress
107
- if command -v curl &> /dev/null; then
108
- curl -fSL --progress-bar "$DOWNLOAD_URL" -o "$BINARY_PATH"
109
- elif command -v wget &> /dev/null; then
110
- wget -q --show-progress "$DOWNLOAD_URL" -O "$BINARY_PATH"
111
- else
112
- echo -e "${RED}Error: curl or wget is required${NC}"
113
- exit 1
114
- fi
115
-
116
- # Make executable
117
- chmod +x "$BINARY_PATH"
118
-
119
- echo -e "${GREEN}Downloaded to:${NC} $BINARY_PATH"
120
- }
121
-
122
- # Setup PATH
123
- setup_path() {
124
- # Determine shell config file
125
- SHELL_CONFIG=""
126
- SHELL_NAME="$(basename "$SHELL")"
127
-
128
- case "$SHELL_NAME" in
129
- zsh)
130
- SHELL_CONFIG="$HOME/.zshrc"
131
- ;;
132
- bash)
133
- if [ -f "$HOME/.bashrc" ]; then
134
- SHELL_CONFIG="$HOME/.bashrc"
135
- elif [ -f "$HOME/.bash_profile" ]; then
136
- SHELL_CONFIG="$HOME/.bash_profile"
137
- fi
138
- ;;
139
- fish)
140
- SHELL_CONFIG="$HOME/.config/fish/config.fish"
141
- ;;
142
- esac
143
-
144
- # Check if already in PATH
145
- if echo "$PATH" | grep -q "$BIN_DIR"; then
146
- return 0
147
- fi
148
-
149
- # Add to shell config if found
150
- if [ -n "$SHELL_CONFIG" ] && [ -f "$SHELL_CONFIG" ]; then
151
- if ! grep -q "CCC_INSTALL" "$SHELL_CONFIG" 2>/dev/null; then
152
- echo "" >> "$SHELL_CONFIG"
153
- echo "# CCC - Code Chat Connect" >> "$SHELL_CONFIG"
154
- echo 'export CCC_INSTALL="$HOME/.ccc"' >> "$SHELL_CONFIG"
155
- echo 'export PATH="$CCC_INSTALL/bin:$PATH"' >> "$SHELL_CONFIG"
156
- echo -e "${GREEN}Added CCC to PATH in ${SHELL_CONFIG}${NC}"
157
- fi
158
- fi
159
-
160
- # Export for current session
161
- export PATH="$BIN_DIR:$PATH"
162
- }
163
-
164
- # Verify installation
165
- verify_installation() {
166
- if [ -x "$BIN_DIR/ccc" ]; then
167
- CCC_VERSION=$("$BIN_DIR/ccc" --version 2>/dev/null || echo "unknown")
168
- echo ""
169
- echo -e "${GREEN}${BOLD}Installation complete!${NC}"
170
- echo -e "${CYAN}Version:${NC} $CCC_VERSION"
171
- echo -e "${CYAN}Location:${NC} $BIN_DIR/ccc"
172
- echo ""
173
- echo -e "Run ${BOLD}ccc${NC} to start the server."
174
- echo -e "Run ${BOLD}ccc --help${NC} for usage information."
175
- echo ""
176
-
177
- if ! command -v ccc &> /dev/null; then
178
- echo -e "${YELLOW}Note: Restart your terminal or run:${NC}"
179
- echo -e " source ${SHELL_CONFIG:-~/.bashrc}"
180
- fi
181
- else
182
- echo -e "${RED}Installation failed. Please try again.${NC}"
183
- exit 1
184
- fi
185
- }
186
-
187
- # Main
188
- main() {
189
- print_banner
190
- detect_platform
191
- get_latest_version
192
- download_binary
193
- setup_path
194
- verify_installation
195
- }
196
-
197
- main "$@"
1
+ #!/bin/bash
2
+ # CCC - Code Chat Connect Installer
3
+ # https://github.com/naarang/ccc
4
+ #
5
+ # Usage: curl -fsSL https://getc3.app/install.sh | bash
6
+
7
+ set -e
8
+
9
+ # Colors
10
+ RED='\033[0;31m'
11
+ GREEN='\033[0;32m'
12
+ YELLOW='\033[1;33m'
13
+ BLUE='\033[0;34m'
14
+ CYAN='\033[0;36m'
15
+ NC='\033[0m'
16
+ BOLD='\033[1m'
17
+
18
+ # Configuration
19
+ # Public releases repository (binaries are published here for public access)
20
+ GITHUB_REPO="vishal-android-freak/ccc-releases"
21
+ INSTALL_DIR="${CCC_INSTALL_DIR:-$HOME/.local}"
22
+ BIN_DIR="$INSTALL_DIR/bin"
23
+ CHANNEL="stable"
24
+
25
+ # Parse arguments
26
+ parse_args() {
27
+ while [[ $# -gt 0 ]]; do
28
+ case $1 in
29
+ --beta)
30
+ CHANNEL="beta"
31
+ shift
32
+ ;;
33
+ --alpha)
34
+ CHANNEL="alpha"
35
+ shift
36
+ ;;
37
+ --help|-h)
38
+ echo "Usage: install.sh [OPTIONS]"
39
+ echo ""
40
+ echo "Options:"
41
+ echo " --beta Install latest beta release"
42
+ echo " --alpha Install latest alpha release"
43
+ echo " --help Show this help message"
44
+ exit 0
45
+ ;;
46
+ *)
47
+ echo -e "${RED}Unknown option: $1${NC}"
48
+ echo "Use --help for usage information"
49
+ exit 1
50
+ ;;
51
+ esac
52
+ done
53
+ }
54
+
55
+ # Print banner
56
+ print_banner() {
57
+ echo -e "${CYAN}"
58
+ echo ' ____ ____ ____ '
59
+ echo ' / ___/ ___/ ___|'
60
+ echo ' | | | | | | '
61
+ echo ' | |__| |__| |___ '
62
+ echo ' \____\____\____|'
63
+ echo -e "${NC}"
64
+ echo -e "${BOLD}Code Chat Connect${NC} - Control Claude Code from your mobile"
65
+ echo ""
66
+ }
67
+
68
+ # Detect OS and architecture
69
+ detect_platform() {
70
+ OS="$(uname -s)"
71
+ ARCH="$(uname -m)"
72
+
73
+ case "$OS" in
74
+ Linux*)
75
+ PLATFORM="linux"
76
+ ;;
77
+ Darwin*)
78
+ PLATFORM="darwin"
79
+ ;;
80
+ MINGW*|MSYS*|CYGWIN*)
81
+ echo -e "${RED}Error: Please use install.ps1 for Windows${NC}"
82
+ echo "Run: irm https://getc3.app/install.ps1 | iex"
83
+ exit 1
84
+ ;;
85
+ *)
86
+ echo -e "${RED}Error: Unsupported operating system: $OS${NC}"
87
+ exit 1
88
+ ;;
89
+ esac
90
+
91
+ case "$ARCH" in
92
+ x86_64|amd64)
93
+ ARCH="x64"
94
+ ;;
95
+ arm64|aarch64)
96
+ ARCH="arm64"
97
+ ;;
98
+ *)
99
+ echo -e "${RED}Error: Unsupported architecture: $ARCH${NC}"
100
+ exit 1
101
+ ;;
102
+ esac
103
+
104
+ BINARY_NAME="ccc-${PLATFORM}-${ARCH}"
105
+ echo -e "${BLUE}Detected platform:${NC} ${PLATFORM}-${ARCH}"
106
+ }
107
+
108
+ # Get latest release version
109
+ get_latest_version() {
110
+ echo -e "${BLUE}Fetching latest ${CHANNEL} version...${NC}"
111
+
112
+ if command -v curl &> /dev/null; then
113
+ if [ "$CHANNEL" = "stable" ]; then
114
+ # For stable, use /releases/latest (excludes prereleases)
115
+ VERSION=$(curl -fsSL "https://api.github.com/repos/${GITHUB_REPO}/releases/latest" 2>/dev/null | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' || echo "")
116
+ else
117
+ # For beta/alpha, fetch all releases and find matching prerelease
118
+ RELEASES=$(curl -fsSL "https://api.github.com/repos/${GITHUB_REPO}/releases?per_page=20" 2>/dev/null)
119
+ if [ "$CHANNEL" = "beta" ]; then
120
+ VERSION=$(echo "$RELEASES" | grep '"tag_name"' | grep -E 'beta' | head -1 | sed -E 's/.*"([^"]+)".*/\1/' || echo "")
121
+ elif [ "$CHANNEL" = "alpha" ]; then
122
+ VERSION=$(echo "$RELEASES" | grep '"tag_name"' | grep -E 'alpha' | head -1 | sed -E 's/.*"([^"]+)".*/\1/' || echo "")
123
+ fi
124
+ fi
125
+ fi
126
+
127
+ if [ -z "$VERSION" ]; then
128
+ echo -e "${RED}Error: Could not find a ${CHANNEL} release${NC}"
129
+ if [ "$CHANNEL" = "stable" ]; then
130
+ echo "No stable release available yet. Try --beta for the latest beta release."
131
+ fi
132
+ exit 1
133
+ fi
134
+
135
+ # Remove 'v' prefix if present
136
+ VERSION="${VERSION#v}"
137
+ echo -e "${GREEN}Latest version:${NC} ${VERSION} (${CHANNEL})"
138
+ }
139
+
140
+ # Download binary
141
+ download_binary() {
142
+ echo -e "${BLUE}Downloading CCC ${VERSION} for ${PLATFORM}-${ARCH}...${NC}"
143
+
144
+ # Create directories
145
+ mkdir -p "$BIN_DIR"
146
+
147
+ DOWNLOAD_URL="https://github.com/${GITHUB_REPO}/releases/download/v${VERSION}/${BINARY_NAME}"
148
+ BINARY_PATH="$BIN_DIR/ccc"
149
+
150
+ # Download silently (progress bars don't work well when piped through bash)
151
+ if command -v curl &> /dev/null; then
152
+ if ! curl -fsSL "$DOWNLOAD_URL" -o "$BINARY_PATH"; then
153
+ echo -e "${RED}Error: Download failed${NC}"
154
+ exit 1
155
+ fi
156
+ elif command -v wget &> /dev/null; then
157
+ if ! wget -q "$DOWNLOAD_URL" -O "$BINARY_PATH"; then
158
+ echo -e "${RED}Error: Download failed${NC}"
159
+ exit 1
160
+ fi
161
+ else
162
+ echo -e "${RED}Error: curl or wget is required${NC}"
163
+ exit 1
164
+ fi
165
+
166
+ # Make executable
167
+ chmod +x "$BINARY_PATH"
168
+
169
+ echo -e "${GREEN}Downloaded to:${NC} $BINARY_PATH"
170
+ }
171
+
172
+ # Setup PATH
173
+ setup_path() {
174
+ # Determine shell config file
175
+ SHELL_CONFIG=""
176
+ SHELL_NAME="$(basename "$SHELL")"
177
+
178
+ case "$SHELL_NAME" in
179
+ zsh)
180
+ SHELL_CONFIG="$HOME/.zshrc"
181
+ ;;
182
+ bash)
183
+ if [ -f "$HOME/.bashrc" ]; then
184
+ SHELL_CONFIG="$HOME/.bashrc"
185
+ elif [ -f "$HOME/.bash_profile" ]; then
186
+ SHELL_CONFIG="$HOME/.bash_profile"
187
+ fi
188
+ ;;
189
+ fish)
190
+ SHELL_CONFIG="$HOME/.config/fish/config.fish"
191
+ ;;
192
+ esac
193
+
194
+ # Check if already in PATH
195
+ if echo "$PATH" | grep -q "$BIN_DIR"; then
196
+ PATH_IN_ENV=true
197
+ return 0
198
+ fi
199
+
200
+ PATH_IN_ENV=false
201
+
202
+ # Export for current session
203
+ export PATH="$BIN_DIR:$PATH"
204
+ }
205
+
206
+ # Verify installation
207
+ verify_installation() {
208
+ if [ -x "$BIN_DIR/ccc" ]; then
209
+ CCC_VERSION=$("$BIN_DIR/ccc" --version 2>/dev/null || echo "unknown")
210
+ echo ""
211
+ echo -e "${GREEN}${BOLD}Installation complete!${NC}"
212
+ echo -e "${CYAN}Version:${NC} $CCC_VERSION"
213
+ echo -e "${CYAN}Location:${NC} $BIN_DIR/ccc"
214
+ echo ""
215
+ echo -e "Run ${BOLD}ccc${NC} to start the server."
216
+ echo -e "Run ${BOLD}ccc --help${NC} for usage information."
217
+ echo ""
218
+
219
+ # Show PATH instructions if not already in PATH
220
+ if [ "$PATH_IN_ENV" = "false" ]; then
221
+ echo -e "${YELLOW}${BOLD}Note:${NC} ${YELLOW}~/.local/bin is not in your PATH${NC}"
222
+ echo ""
223
+ echo -e "Add it to your PATH by running one of the following commands:"
224
+ echo ""
225
+
226
+ SHELL_NAME="$(basename "$SHELL")"
227
+ case "$SHELL_NAME" in
228
+ zsh)
229
+ echo -e " ${CYAN}# For zsh (add to ~/.zshrc):${NC}"
230
+ echo -e " echo 'export PATH=\"\$HOME/.local/bin:\$PATH\"' >> ~/.zshrc && source ~/.zshrc"
231
+ ;;
232
+ bash)
233
+ echo -e " ${CYAN}# For bash (add to ~/.bashrc):${NC}"
234
+ echo -e " echo 'export PATH=\"\$HOME/.local/bin:\$PATH\"' >> ~/.bashrc && source ~/.bashrc"
235
+ ;;
236
+ fish)
237
+ echo -e " ${CYAN}# For fish:${NC}"
238
+ echo -e " fish_add_path ~/.local/bin"
239
+ ;;
240
+ *)
241
+ echo -e " ${CYAN}# Add to your shell profile:${NC}"
242
+ echo -e " export PATH=\"\$HOME/.local/bin:\$PATH\""
243
+ ;;
244
+ esac
245
+ echo ""
246
+ echo -e "Or restart your terminal after adding the path."
247
+ fi
248
+ else
249
+ echo -e "${RED}Installation failed. Please try again.${NC}"
250
+ exit 1
251
+ fi
252
+ }
253
+
254
+ # Main
255
+ main() {
256
+ parse_args "$@"
257
+ print_banner
258
+ detect_platform
259
+ get_latest_version
260
+ download_binary
261
+ setup_path
262
+ verify_installation
263
+ }
264
+
265
+ main "$@"