mirror of
https://github.com/alirezarezvani/ClaudeForge.git
synced 2026-07-04 19:03:15 -04:00
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:
+33
-5
@@ -41,12 +41,34 @@ Write-Host "║ ║" -ForegroundColor Blu
|
|||||||
Write-Host "╚════════════════════════════════════════╝" -ForegroundColor Blue
|
Write-Host "╚════════════════════════════════════════╝" -ForegroundColor Blue
|
||||||
Write-Host ""
|
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")) {
|
if (-not (Test-Path "skill") -or -not (Test-Path "command") -or -not (Test-Path "agent")) {
|
||||||
Write-Error-Custom "Installation files not found!"
|
Write-Info "Installing from GitHub..."
|
||||||
Write-Info "Please run this script from the ClaudeForge repository root."
|
$RemoteInstall = $true
|
||||||
Write-Info "Usage: cd ClaudeForge; .\install.ps1"
|
|
||||||
exit 1
|
# 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
|
# Check for Claude Code installation
|
||||||
@@ -234,3 +256,9 @@ Write-Host ""
|
|||||||
|
|
||||||
Write-Success "Thank you for installing ClaudeForge!"
|
Write-Success "Thank you for installing ClaudeForge!"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
|
# Cleanup temporary directory if remote install
|
||||||
|
if ($RemoteInstall) {
|
||||||
|
Set-Location $env:USERPROFILE
|
||||||
|
Remove-Item -Recurse -Force $TempDir -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|||||||
+32
-5
@@ -41,12 +41,33 @@ echo -e "${BLUE}║ ║${NC}"
|
|||||||
echo -e "${BLUE}╚════════════════════════════════════════╝${NC}"
|
echo -e "${BLUE}╚════════════════════════════════════════╝${NC}"
|
||||||
echo ""
|
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
|
if [ ! -d "skill" ] || [ ! -d "command" ] || [ ! -d "agent" ]; then
|
||||||
print_error "Installation files not found!"
|
print_info "Installing from GitHub..."
|
||||||
print_info "Please run this script from the ClaudeForge repository root."
|
REMOTE_INSTALL=true
|
||||||
print_info "Usage: cd ClaudeForge && ./install.sh"
|
|
||||||
exit 1
|
# 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
|
fi
|
||||||
|
|
||||||
# Check for Claude Code installation
|
# Check for Claude Code installation
|
||||||
@@ -211,3 +232,9 @@ echo ""
|
|||||||
|
|
||||||
print_success "Thank you for installing ClaudeForge!"
|
print_success "Thank you for installing ClaudeForge!"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# Cleanup temporary directory if remote install
|
||||||
|
if [ "$REMOTE_INSTALL" = true ]; then
|
||||||
|
cd "$HOME"
|
||||||
|
rm -rf "$TEMP_DIR"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user