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)
This commit is contained in:
Reza Rezvani
2025-11-12 11:45:57 +01:00
parent 37422c1667
commit b8f12f34f7
2 changed files with 65 additions and 10 deletions
+33 -5
View File
@@ -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
}