@devries-cameron20 / composio Mirror · read-only / commits / 7af5d1a9a
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 23:15 UTC

fix install script

Rahul Tarak committed Jun 26, 2025 at 03:49 UTC 7af5d1a9a34656d9d02300b1950011d1ea976624
2 files changed +26 -7
.github/workflows/test-installation.yml
+3 -3
@@ -103,10 +103,10 @@ jobs:
103 if: inputs.version == 'latest' || inputs.version == ''
104 shell: bash
105 run: |
106 - echo "Testing installation with latest version..."
106 + echo "Testing installation with auto-detected latest CLI version..."
107
108 - # Test the install script with a default version since "latest" doesn't exist
109 - bash install.sh cli@0.1.24-2
108 + # Test the install script without version (it will auto-detect latest CLI release)
109 + bash install.sh
110
111 # Verify installation
112 source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
install.sh
+23 -4
@@ -108,12 +108,31 @@ exe_name=composio
108
109 # Determine version to install
110 if [[ $# = 0 ]]; then
111 - # Get latest version from GitHub API
112 - version=$(curl -s https://api.github.com/repos/ComposioHQ/composio/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
111 + info "Finding latest CLI release..."
112 +
113 + # Get the last 20 releases and find the latest one with CLI binaries
114 + releases_json=$(curl -s "https://api.github.com/repos/ComposioHQ/composio/releases?per_page=20")
115 + if [[ -z "$releases_json" ]]; then
116 + error "Failed to fetch releases from GitHub"
117 + fi
118 +
119 + version=""
120 + # Extract tag names and check each release for CLI binaries
121 + for tag in $(echo "$releases_json" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | head -20); do
122 + # Check if this release has CLI binaries by testing download URL
123 + test_url="$github_repo/releases/download/$tag/composio-$target.zip"
124 + if curl -s --head "$test_url" | grep -qE "(200 OK|302)"; then
125 + version="$tag"
126 + info "Found CLI release: $version"
127 + break
128 + fi
129 + done
130 +
131 if [[ -z "$version" ]]; then
114 - error "Failed to get latest version from GitHub"
132 + error "No CLI release found in the last 20 releases. Please specify a version manually."
133 fi
116 - composio_uri="$github_repo/releases/latest/download/composio-$target.zip"
134 +
135 + composio_uri="$github_repo/releases/download/$version/composio-$target.zip"
136 else
137 version=$1
138 composio_uri="$github_repo/releases/download/$version/composio-$target.zip"