Skip to content

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

fix install script

Rahul Tarak7af5d1a9a346
diff --git a/.github/workflows/test-installation.yml b/.github/workflows/test-installation.yml
index 250e1336d..124e539d7 100644
--- a/.github/workflows/test-installation.yml
+++ b/.github/workflows/test-installation.yml
@@ -103,10 +103,10 @@ jobs:
if: inputs.version == 'latest' || inputs.version == ''
shell: bash
run: |
- echo "Testing installation with latest version..."
+ echo "Testing installation with auto-detected latest CLI version..."
- # Test the install script with a default version since "latest" doesn't exist
- bash install.sh [email protected]
+ # Test the install script without version (it will auto-detect latest CLI release)
+ bash install.sh
# Verify installation
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
diff --git a/install.sh b/install.sh
index dae012d69..2c87992fa 100644
--- a/install.sh
+++ b/install.sh
@@ -108,12 +108,31 @@ exe_name=composio
# Determine version to install
if [[ $# = 0 ]]; then
- # Get latest version from GitHub API
- version=$(curl -s https://api.github.com/repos/ComposioHQ/composio/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
+ info "Finding latest CLI release..."
+
+ # Get the last 20 releases and find the latest one with CLI binaries
+ releases_json=$(curl -s "https://api.github.com/repos/ComposioHQ/composio/releases?per_page=20")
+ if [[ -z "$releases_json" ]]; then
+ error "Failed to fetch releases from GitHub"
+ fi
+
+ version=""
+ # Extract tag names and check each release for CLI binaries
+ for tag in $(echo "$releases_json" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | head -20); do
+ # Check if this release has CLI binaries by testing download URL
+ test_url="$github_repo/releases/download/$tag/composio-$target.zip"
+ if curl -s --head "$test_url" | grep -qE "(200 OK|302)"; then
+ version="$tag"
+ info "Found CLI release: $version"
+ break
+ fi
+ done
+
if [[ -z "$version" ]]; then
- error "Failed to get latest version from GitHub"
+ error "No CLI release found in the last 20 releases. Please specify a version manually."
fi
- composio_uri="$github_repo/releases/latest/download/composio-$target.zip"
+
+ composio_uri="$github_repo/releases/download/$version/composio-$target.zip"
else
version=$1
composio_uri="$github_repo/releases/download/$version/composio-$target.zip"