Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
## macOS Distribution

### DMG Installer
- Download `chaseai-${{ needs.check-version.outputs.version }}-macos.dmg`
- Download `chase-ai-${{ needs.check-version.outputs.version }}-macos.dmg`
- Mount the DMG and drag ChaseAI to Applications folder
- Verify checksum: `shasum -a 256 -c checksums.sha256`

Expand All @@ -218,7 +218,7 @@ jobs:

### Homebrew Installation
```bash
brew tap chaseai/chaseai
brew tap mitriyweb/chaseai
brew install chaseai
```

Expand Down Expand Up @@ -277,8 +277,8 @@ jobs:
cat > homebrew-tap/Formula/chaseai.rb << 'EOF'
class Chaseai < Formula
desc "Local control and orchestration system for AI agents"
homepage "https://github.com/chaseai/chaseai"
url "https://github.com/chaseai/chaseai/releases/download/v#{version}/chaseai-#{version}-macos.dmg"
homepage "https://github.com/Mitriyweb/ChaseAI"
url "https://github.com/Mitriyweb/ChaseAI/releases/download/v#{version}/chase-ai-#{version}-macos.dmg"
sha256 "${{ steps.checksum.outputs.sha256 }}"
version "${{ needs.check-version.outputs.version }}"

Expand Down
6 changes: 3 additions & 3 deletions docs/installation-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Homebrew provides easy installation and updates via the command line.
1. **Add the ChaseAI Tap**

```bash
brew tap chaseai/chaseai
brew tap mitriyweb/chaseai
```

2. **Install ChaseAI**
Expand Down Expand Up @@ -143,7 +143,7 @@ The ChaseAI tap has not been added to your Homebrew installation.
Add the tap and try again:

```bash
brew tap chaseai/chaseai
brew tap mitriyweb/chaseai
brew install chaseai
```

Expand Down Expand Up @@ -181,7 +181,7 @@ If you have an older version and `brew upgrade` doesn't work:
```bash
# Remove and reinstall
brew uninstall chaseai
brew tap --repair chaseai/chaseai
brew tap --repair mitriyweb/chaseai
brew install chaseai
```

Expand Down
4 changes: 2 additions & 2 deletions homebrew-chaseai/Formula/chaseai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

class Chaseai < Formula
desc "Local control and orchestration system for AI agents"
homepage "https://github.com/chaseai/chaseai"
url "https://github.com/chaseai/chaseai/releases/download/v0.1.0/chase-ai-0.1.0-macos.dmg"
homepage "https://github.com/Mitriyweb/ChaseAI"
url "https://github.com/Mitriyweb/ChaseAI/releases/download/v#{version}/chase-ai-#{version}-macos.dmg"
sha256 "0000000000000000000000000000000000000000000000000000000000000000"
version "0.1.0"

Expand Down
61 changes: 42 additions & 19 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,28 @@ fi

echo " Latest version: $LATEST_RELEASE"

# Try to download tar.gz archive
# Try to download tar.gz archive (preferred for script-based install)
ARCHIVE_URL="https://github.com/$REPO/releases/download/v$LATEST_RELEASE/chase-ai-$LATEST_RELEASE-macos.tar.gz"
ARCHIVE_FILE="/tmp/chase-ai-$LATEST_RELEASE.tar.gz"

echo "📦 Downloading ChaseAI $LATEST_RELEASE..."
if ! curl -L -o "$ARCHIVE_FILE" "$ARCHIVE_URL"; then
echo -e "${RED}❌ Error: Failed to download ChaseAI${NC}"
exit 1
if ! curl -sL -f -o "$ARCHIVE_FILE" "$ARCHIVE_URL"; then
echo -e "${YELLOW}⚠ Warning: Failed to download tar.gz, trying DMG fallback...${NC}"
DMG_URL="https://github.com/$REPO/releases/download/v$LATEST_RELEASE/chase-ai-$LATEST_RELEASE-macos.dmg"
ARCHIVE_FILE="/tmp/chase-ai-$LATEST_RELEASE.dmg"
if ! curl -sL -f -o "$ARCHIVE_FILE" "$DMG_URL"; then
echo -e "${RED}❌ Error: Failed to download both tar.gz and DMG${NC}"
exit 1
fi
IS_DMG=true
else
IS_DMG=false
fi

# Verify file is not empty
if [ ! -s "$ARCHIVE_FILE" ]; then
echo -e "${RED}❌ Error: Downloaded file is empty${NC}"
# Verify file is not empty and not a 404 page
FILE_SIZE=$(stat -f%z "$ARCHIVE_FILE" 2>/dev/null || stat -c%s "$ARCHIVE_FILE" 2>/dev/null || echo "0")
if [ "$FILE_SIZE" -lt 1000 ]; then
echo -e "${RED}❌ Error: Downloaded file is too small ($FILE_SIZE bytes). It might be a 404 page.${NC}"
rm -f "$ARCHIVE_FILE"
exit 1
fi
Expand All @@ -59,11 +68,11 @@ CHECKSUMS_FILE="/tmp/checksums.sha256"
if curl -s -f "$CHECKSUMS_URL" > "$CHECKSUMS_FILE" 2>/dev/null && [ -s "$CHECKSUMS_FILE" ]; then
echo "🔐 Verifying checksum..."

# Extract the expected checksum for our archive file
EXPECTED_CHECKSUM=$(grep "chase-ai-$LATEST_RELEASE-macos.tar.gz" "$CHECKSUMS_FILE" | awk '{print $1}')
FILENAME=$(basename "$ARCHIVE_FILE")
EXPECTED_CHECKSUM=$(grep "$FILENAME" "$CHECKSUMS_FILE" | awk '{print $1}')

if [ -z "$EXPECTED_CHECKSUM" ]; then
echo -e "${YELLOW}⚠ Warning: Could not find checksum for archive file${NC}"
echo -e "${YELLOW}⚠ Warning: Could not find checksum for $FILENAME in checksums.sha256${NC}"
else
# Calculate actual checksum
ACTUAL_CHECKSUM=$(shasum -a 256 "$ARCHIVE_FILE" | awk '{print $1}')
Expand All @@ -79,26 +88,40 @@ if curl -s -f "$CHECKSUMS_URL" > "$CHECKSUMS_FILE" 2>/dev/null && [ -s "$CHECKSU
fi
fi
else
echo -e "${YELLOW}⚠ Warning: Could not download checksums file, skipping verification${NC}"
echo -e "${YELLOW}⚠ Warning: Could not download checksums.sha256 file, skipping verification${NC}"
fi

# Extract archive
echo "📂 Extracting archive..."
TEMP_DIR=$(mktemp -d)
tar -xzf "$ARCHIVE_FILE" -C "$TEMP_DIR"
# Extract and install
echo "📂 Installing..."
MOUNT_POINT=$(mktemp -d)

if [ "$IS_DMG" = true ]; then
echo " Mounting DMG..."
hdiutil attach "$ARCHIVE_FILE" -mountpoint "$MOUNT_POINT" -nobrowse
SOURCE_PATH="$MOUNT_POINT/$APP_NAME"
else
echo " Extracting archive..."
tar -xzf "$ARCHIVE_FILE" -C "$MOUNT_POINT"
SOURCE_PATH="$MOUNT_POINT/$APP_NAME"
fi

# Copy app to Applications
echo "📋 Installing ChaseAI to $INSTALL_DIR..."
echo "📋 Copying to $INSTALL_DIR..."
if [ -d "$INSTALL_DIR/$APP_NAME" ]; then
echo " Removing existing installation..."
rm -rf "$INSTALL_DIR/$APP_NAME"
fi

cp -r "$TEMP_DIR/$APP_NAME" "$INSTALL_DIR/"
cp -r "$SOURCE_PATH" "$INSTALL_DIR/"

# Cleanup
if [ "$IS_DMG" = true ]; then
echo " Unmounting DMG..."
hdiutil detach "$MOUNT_POINT"
fi

# Clean up
rm -f "$ARCHIVE_FILE"
rm -rf "$TEMP_DIR"
rm -rf "$MOUNT_POINT"

# Verify installation
if [ -d "$INSTALL_DIR/$APP_NAME" ]; then
Expand Down