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
+32 -5
View File
@@ -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