From b8f12f34f78a10474fc234491184a46a8fd93c14 Mon Sep 17 00:00:00 2001 From: Reza Rezvani Date: Wed, 12 Nov 2025 11:45:57 +0100 Subject: [PATCH] fix(installers): Enable one-line installation from curl/web - Add automatic download from GitHub when files not present locally - Support both local and remote installation modes - Download v1.0.0 release tarball/zip automatically - Clean up temporary files after remote installation - Update both install.sh (macOS/Linux) and install.ps1 (Windows) Now the one-line install works correctly: curl -fsSL https://raw.githubusercontent.com/alirezarezvani/ClaudeForge/main/install.sh | bash Fixes #1 (if issue exists) --- install.ps1 | 38 +++++++++++++++++++++++++++++++++----- install.sh | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 10 deletions(-) diff --git a/install.ps1 b/install.ps1 index 135ebd6..e5b1184 100644 --- a/install.ps1 +++ b/install.ps1 @@ -41,12 +41,34 @@ Write-Host "║ ║" -ForegroundColor Blu Write-Host "╚════════════════════════════════════════╝" -ForegroundColor Blue Write-Host "" -# Check if running from correct directory +# Check if running from correct directory or need to download +$RemoteInstall = $false if (-not (Test-Path "skill") -or -not (Test-Path "command") -or -not (Test-Path "agent")) { - Write-Error-Custom "Installation files not found!" - Write-Info "Please run this script from the ClaudeForge repository root." - Write-Info "Usage: cd ClaudeForge; .\install.ps1" - exit 1 + Write-Info "Installing from GitHub..." + $RemoteInstall = $true + + # Create temporary directory + $TempDir = New-Item -ItemType Directory -Path ([System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.Guid]::NewGuid().ToString())) -Force + Set-Location $TempDir + + Write-Info "Downloading ClaudeForge v1.0.0..." + + # Download archive + $archiveUrl = "https://github.com/alirezarezvani/ClaudeForge/archive/refs/tags/v1.0.0.zip" + $archivePath = Join-Path $TempDir "claudeforge.zip" + + try { + Invoke-WebRequest -Uri $archiveUrl -OutFile $archivePath -UseBasicParsing + } catch { + Write-Error-Custom "Failed to download ClaudeForge. Please check your internet connection." + exit 1 + } + + Write-Info "Extracting files..." + Expand-Archive -Path $archivePath -DestinationPath $TempDir -Force + Set-Location (Join-Path $TempDir "ClaudeForge-1.0.0") + + Write-Success "Downloaded ClaudeForge successfully" } # Check for Claude Code installation @@ -234,3 +256,9 @@ Write-Host "" Write-Success "Thank you for installing ClaudeForge!" Write-Host "" + +# Cleanup temporary directory if remote install +if ($RemoteInstall) { + Set-Location $env:USERPROFILE + Remove-Item -Recurse -Force $TempDir -ErrorAction SilentlyContinue +} diff --git a/install.sh b/install.sh index f78a4cb..4e1949e 100755 --- a/install.sh +++ b/install.sh @@ -41,12 +41,33 @@ echo -e "${BLUE}║ ║${NC}" echo -e "${BLUE}╚════════════════════════════════════════╝${NC}" echo "" -# Check if running from correct directory +# Check if running from correct directory or need to download +REMOTE_INSTALL=false if [ ! -d "skill" ] || [ ! -d "command" ] || [ ! -d "agent" ]; then - print_error "Installation files not found!" - print_info "Please run this script from the ClaudeForge repository root." - print_info "Usage: cd ClaudeForge && ./install.sh" - exit 1 + print_info "Installing from GitHub..." + REMOTE_INSTALL=true + + # Create temporary directory + TEMP_DIR=$(mktemp -d) + cd "$TEMP_DIR" + + print_info "Downloading ClaudeForge v1.0.0..." + + # Download using curl or wget + if command -v curl &> /dev/null; then + curl -fsSL https://github.com/alirezarezvani/ClaudeForge/archive/refs/tags/v1.0.0.tar.gz -o claudeforge.tar.gz + elif command -v wget &> /dev/null; then + wget -q https://github.com/alirezarezvani/ClaudeForge/archive/refs/tags/v1.0.0.tar.gz -O claudeforge.tar.gz + else + print_error "Neither curl nor wget found. Please install one of them." + exit 1 + fi + + print_info "Extracting files..." + tar -xzf claudeforge.tar.gz + cd ClaudeForge-1.0.0 + + print_success "Downloaded ClaudeForge successfully" fi # Check for Claude Code installation @@ -211,3 +232,9 @@ echo "" print_success "Thank you for installing ClaudeForge!" echo "" + +# Cleanup temporary directory if remote install +if [ "$REMOTE_INSTALL" = true ]; then + cd "$HOME" + rm -rf "$TEMP_DIR" +fi