@devries-cameron20 / composio Mirror · read-only / commits / 5b8e7abdf
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, 05:45 UTC

feat(cli): add checksums, cross-compilation, and simplified install

- Add cross-compilation scripts (build-binary-cross.ts, build-all-binaries.ts) using Bun's --target flag, enabling all platforms to build from ubuntu-latest - Add package-binaries.ts and generate-checksums.ts for release artifact preparation - Restructure CI workflow into build + release jobs; release job aggregates artifacts and generates checksums.txt - Simplify install.sh: use git ls-remote refspec filter for version detection, add SHA-256 checksum verification with graceful fallback, use mktemp/trap for temp file cleanup, remove dead musl detection code - Add checksum verification to composio upgrade command via fetchChecksums and verifyChecksum helpers in upgrade-binary.ts

jkomyno committed Feb 27, 2026 at 18:19 UTC 5b8e7abdf3fc10ffcf5463ab87df95ca101fc140
10 files changed +735 -256
.github/workflows/build-cli-binaries.yml
+38 -34
@@ -13,24 +13,20 @@ permissions:
13 contents: write
14
15 jobs:
16 - build-binaries:
17 - name: Build CLI Binaries
16 + build:
17 + name: Build ${{ matrix.artifact }}
18 if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, '@composio/cli@') || startsWith(github.event.release.tag_name, 'v')
19 - runs-on: ${{ matrix.runner }}
19 + runs-on: ubuntu-latest
20 strategy:
21 matrix:
22 include:
23 - - runner: ubuntu-latest
24 - platform: linux-x64
23 + - target: bun-linux-x64
24 artifact: composio-linux-x64
26 - - runner: depot-ubuntu-24.04-arm
27 - platform: linux-aarch64
25 + - target: bun-linux-arm64
26 artifact: composio-linux-aarch64
29 - - runner: macos-15-intel # Intel Mac
30 - platform: darwin-x64
27 + - target: bun-darwin-x64
28 artifact: composio-darwin-x64
32 - - runner: macos-15 # Apple Silicon Mac
33 - platform: darwin-aarch64
29 + - target: bun-darwin-arm64
30 artifact: composio-darwin-aarch64
31
32 steps:
@@ -56,15 +52,9 @@ jobs:
52 - name: Build packages
53 run: pnpm build:packages
54
59 - - name: Build CLI binary
55 + - name: Cross-compile CLI binary
56 working-directory: ts/packages/cli
61 - run: |
62 - # Use the existing build:binary script which builds for current platform
63 - pnpm build:binary
64 -
65 - # Create binaries directory and copy/rename the binary
66 - mkdir -p dist/binaries
67 - cp dist/composio dist/binaries/${{ matrix.artifact }}
57 + run: pnpm build:binary:cross --target ${{ matrix.target }}
58
59 - name: Verify binary
60 working-directory: ts/packages/cli
@@ -73,6 +63,7 @@ jobs:
63 file dist/binaries/${{ matrix.artifact }}
64
65 - name: Test binary
66 + if: startsWith(matrix.target, 'bun-linux')
67 working-directory: ts/packages/cli
68 env:
69 COMPOSIO_USER_API_KEY: test-dummy-api-key-for-ci
@@ -83,33 +74,46 @@ jobs:
74 - name: Create archive
75 working-directory: ts/packages/cli/dist/binaries
76 run: |
86 - # Create subdirectory structure expected by install script
87 - # Use a temp directory name to avoid name collision with the binary file
77 temp_dir="archive-${{ matrix.artifact }}"
78 rm -rf "$temp_dir"
79 mkdir -p "$temp_dir/${{ matrix.artifact }}"
80 cp "${{ matrix.artifact }}" "$temp_dir/${{ matrix.artifact }}/composio"
81 cd "$temp_dir" && zip -r "../${{ matrix.artifact }}.zip" "${{ matrix.artifact }}"
82 cd .. && rm -r "$temp_dir"
94 - ls -la
83
96 - - name: Upload binary artifact
84 + - name: Upload artifact
85 uses: actions/upload-artifact@v6
86 with:
87 name: ${{ matrix.artifact }}
100 - path: |
101 - ts/packages/cli/dist/binaries/${{ matrix.artifact }}
102 - ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zip
88 + path: ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zip
89 retention-days: 7
90
105 - - name: Create Release
106 - if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
91 + release:
92 + name: Create Release
93 + needs: build
94 + runs-on: ubuntu-latest
95 + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
96 +
97 + steps:
98 + - name: Download all artifacts
99 + uses: actions/download-artifact@v6
100 + with:
101 + merge-multiple: true
102 +
103 + - name: Generate checksums
104 + run: sha256sum *.zip > checksums.txt
105 +
106 + - name: Display checksums
107 + run: cat checksums.txt
108 +
109 + - name: Create GitHub Release
110 uses: softprops/action-gh-release@v2
111 with:
112 tag_name: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}
113 name: ${{ github.event_name == 'workflow_dispatch' && format('CLI @composio/cli@{0} (Manual Build)', inputs.version) || github.event.release.tag_name }}
114 files: |
112 - ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zip
115 + *.zip
116 + checksums.txt
117 draft: false
118 prerelease: ${{ github.event_name == 'workflow_dispatch' || github.event.release.prerelease || contains(github.event.release.tag_name, 'alpha') || contains(github.event.release.tag_name, 'beta') || contains(github.event.release.tag_name, 'rc') }}
119 generate_release_notes: true
@@ -119,17 +123,17 @@ jobs:
123
124 test-installation:
125 name: Test Installation
122 - needs: build-binaries
123 - if: always() && !cancelled() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
126 + needs: release
127 + if: always() && !cancelled() && needs.release.result == 'success'
128 uses: ./.github/workflows/cli.test-installation.yml
129 with:
130 version: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}
131
132 create-install-instructions:
133 name: Create Install Instructions
130 - needs: build-binaries
134 + needs: release
135 runs-on: ubuntu-latest
132 - if: always() && !cancelled() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
136 + if: always() && !cancelled() && needs.release.result == 'success'
137
138 steps:
139 - name: Checkout
@@ -179,7 +183,7 @@ jobs:
183 ## Supported Platforms
184
185 - Linux x64
182 - - Linux ARM64
186 + - Linux ARM64
187 - macOS x64 (Intel)
188 - macOS ARM64 (Apple Silicon)
189
install.sh
+128 -222
@@ -1,241 +1,191 @@
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 -platform=$(uname -ms)
5 -
6 -# Check for unsupported platforms
7 -case $platform in
8 -'MINGW64'* | 'MSYS'* | 'CYGWIN'*)
9 - echo "Windows installation is not supported yet. Please use WSL or install via npm:"
10 - echo " npm install -g @composio/cli"
11 - exit 1
12 - ;;
13 -esac
4 +COMPOSIO_GITHUB_OWNER=${COMPOSIO_GITHUB_OWNER-"ComposioHQ"}
5 +COMPOSIO_GITHUB_REPO=${COMPOSIO_GITHUB_REPO-"composio"}
6 +COMPOSIO_GITHUB_URL=${COMPOSIO_GITHUB_URL-"https://github.com"}
7 +COMPOSIO_INSTALL_DIR=${COMPOSIO_INSTALL_DIR:-$HOME/.composio}
8
15 -# Reset
16 -Color_Off=''
9 +github_repo="$COMPOSIO_GITHUB_URL/$COMPOSIO_GITHUB_OWNER/$COMPOSIO_GITHUB_REPO"
10
18 -# Regular Colors
19 -Red=''
20 -Green=''
21 -Dim='' # White
11 +# --- Colors (only when interactive) ---
12
23 -# Bold
24 -Bold_White=''
25 -Bold_Green=''
13 +Color_Off='' Red='' Green='' Dim='' Bold_White='' Bold_Green=''
14
15 if [[ -t 1 ]]; then
28 - # Reset
29 - Color_Off='\033[0m' # Text Reset
30 -
31 - # Regular Colors
32 - Red='\033[0;31m' # Red
33 - Green='\033[0;32m' # Green
34 - Dim='\033[0;2m' # White
35 -
36 - # Bold
37 - Bold_Green='\033[1;32m' # Bold Green
38 - Bold_White='\033[1m' # Bold White
16 + Color_Off='\033[0m'
17 + Red='\033[0;31m'
18 + Green='\033[0;32m'
19 + Dim='\033[0;2m'
20 + Bold_Green='\033[1;32m'
21 + Bold_White='\033[1m'
22 fi
23
41 -error() {
42 - echo -e "${Red}error${Color_Off}:" "$@" >&2
43 - exit 1
44 -}
45 -
46 -info() {
47 - echo -e "${Dim}$@ ${Color_Off}"
48 -}
24 +error() { echo -e "${Red}error${Color_Off}:" "$@" >&2; exit 1; }
25 +warn() { echo -e "${Red}warning${Color_Off}:" "$@" >&2; }
26 +info() { echo -e "${Dim}$@${Color_Off}"; }
27 +info_bold() { echo -e "${Bold_White}$@${Color_Off}"; }
28 +success() { echo -e "${Green}$@${Color_Off}"; }
29
50 -info_bold() {
51 - echo -e "${Bold_White}$@ ${Color_Off}"
52 -}
53 -
54 -success() {
55 - echo -e "${Green}$@ ${Color_Off}"
30 +tildify() {
31 + if [[ $1 = $HOME/* ]]; then
32 + echo "~/${1#$HOME/}"
33 + else
34 + echo "$1"
35 + fi
36 }
37
58 -# Check for required tools
59 -command -v unzip >/dev/null ||
60 - error 'unzip is required to install Composio CLI'
38 +# --- Prerequisites ---
39
62 -command -v curl >/dev/null ||
63 - error 'curl is required to install Composio CLI'
40 +command -v curl >/dev/null || error 'curl is required to install Composio CLI'
41 +command -v unzip >/dev/null || error 'unzip is required to install Composio CLI'
42 +command -v git >/dev/null || error 'git is required to install Composio CLI'
43
44 if [[ $# -gt 1 ]]; then
66 - error 'Too many arguments, only 1 is allowed. You can specify a specific release tag to install. (e.g. "@composio/cli@0.1.24")'
45 + error 'Too many arguments. Usage: install.sh [version-tag] (e.g. "@composio/cli@0.1.32")'
46 fi
47
69 -# Determine platform and architecture
48 +# --- Platform detection ---
49 +
50 +platform=$(uname -ms)
51 +
52 case $platform in
71 -'Darwin x86_64')
72 - target=darwin-x64
73 - ;;
74 -'Darwin arm64')
75 - target=darwin-aarch64
76 - ;;
77 -'Linux aarch64' | 'Linux arm64')
78 - target=linux-aarch64
79 - ;;
80 -'Linux x86_64' | *)
81 - target=linux-x64
53 +'MINGW64'* | 'MSYS'* | 'CYGWIN'*)
54 + error 'Windows is not supported. Please use WSL or install via npm: npm install -g @composio/cli'
55 ;;
56 esac
57
85 -# Check for musl on Linux
86 -case "$target" in
87 -'linux'*)
88 - if [ -f /etc/alpine-release ]; then
89 - target="$target-musl"
90 - fi
91 - ;;
58 +case $platform in
59 +'Darwin x86_64') target=darwin-x64 ;;
60 +'Darwin arm64') target=darwin-aarch64 ;;
61 +'Linux aarch64' | 'Linux arm64')
62 + target=linux-aarch64 ;;
63 +'Linux x86_64') target=linux-x64 ;;
64 +*) error "Unsupported platform: $platform" ;;
65 esac
66
94 -# Special handling for Rosetta on macOS
67 +# Rosetta 2 detection on macOS
68 if [[ $target = darwin-x64 ]]; then
96 - # Is this process running in Rosetta?
97 - # redirect stderr to devnull to avoid error message when not running in Rosetta
69 if [[ $(sysctl -n sysctl.proc_translated 2>/dev/null) = 1 ]]; then
70 target=darwin-aarch64
100 - info "Your shell is running in Rosetta 2. Downloading Composio CLI for $target instead"
71 + info "Your shell is running in Rosetta 2. Downloading for $target instead"
72 fi
73 fi
74
104 -COMPOSIO_GITHUB_OWNER=${COMPOSIO_GITHUB_OWNER-"ComposioHQ"}
105 -COMPOSIO_GITHUB_REPO=${COMPOSIO_GITHUB_REPO-"composio"}
106 -COMPOSIO_GITHUB_URL=${COMPOSIO_GITHUB_URL-"https://github.com"}
107 -github_repo="$COMPOSIO_GITHUB_URL/$COMPOSIO_GITHUB_OWNER/$COMPOSIO_GITHUB_REPO"
108 -
109 -exe_name=composio
75 +# --- Version resolution ---
76
111 -# Determine version to install
77 if [[ $# = 0 ]]; then
78 info "Finding latest CLI release..."
114 -
115 - # Get the latest version tag using OS-specific grep patterns
116 - case $platform in
117 - 'Darwin'*)
118 - # BSD/MacOS: Use extended regex with -E
119 - version=$(git ls-remote --tags "$github_repo" \
120 - | awk '{print $2}' \
121 - | sed 's#^refs/tags/##' \
122 - | sed 's#\^{}$##' \
123 - | grep -E "^@composio/cli@\d+\.\d+\.\d+.*" \
124 - | sort -V \
125 - | tail -n1)
126 - ;;
127 - *)
128 - # Unix/Linux: Use Perl-compatible regex with -P
129 - version=$(git ls-remote --tags "$github_repo" \
130 - | awk '{print $2}' \
131 - | sed 's#^refs/tags/##' \
132 - | sed 's#\^{}$##' \
133 - | grep -P "^@composio/cli@\d+\.\d+\.\d+.*" \
134 - | sort -V \
135 - | tail -n1)
136 - ;;
137 - esac
138 -
79 +
80 + version=$(git ls-remote --tags "$github_repo" "@composio/cli@*" \
81 + | awk '{print $2}' \
82 + | sed 's#^refs/tags/##; s#\^{}$##' \
83 + | sort -V \
84 + | tail -1)
85 +
86 if [[ -z "$version" ]]; then
87 error "Failed to determine the latest version. Please specify a version manually."
88 fi
142 -
89 +
90 info "Found latest version: $version"
144 -
145 - composio_uri="$github_repo/releases/download/$version/composio-$target.zip"
91 else
92 version=$1
148 - composio_uri="$github_repo/releases/download/$version/composio-$target.zip"
93 fi
94
95 +# --- Download into temp directory ---
96 +
97 +tmpdir="$(mktemp -d)"
98 +trap 'rm -rf "$tmpdir"' EXIT
99 +
100 +archive_name="composio-$target.zip"
101 +archive_url="$github_repo/releases/download/$version/$archive_name"
102 +checksums_url="$github_repo/releases/download/$version/checksums.txt"
103 +
104 info "Installing Composio CLI $version for $target"
105
153 -COMPOSIO_INSTALL_DIR=${COMPOSIO_INSTALL_DIR:-$HOME/.composio}
154 -exe=$COMPOSIO_INSTALL_DIR/composio
106 +info "Downloading..."
107 +curl --fail --location --progress-bar --output "$tmpdir/$archive_name" "$archive_url" ||
108 + error "Failed to download from \"$archive_url\""
109 +
110 +# --- Checksum verification ---
111 +
112 +if curl --fail --silent --location --output "$tmpdir/checksums.txt" "$checksums_url" 2>/dev/null; then
113 + expected=$(grep "$archive_name" "$tmpdir/checksums.txt" | awk '{print $1}')
114
156 -if [[ ! -d $COMPOSIO_INSTALL_DIR ]]; then
157 - mkdir -p "$COMPOSIO_INSTALL_DIR" ||
158 - error "Failed to create install directory \"$COMPOSIO_INSTALL_DIR\""
115 + if [[ -n "$expected" ]]; then
116 + if command -v sha256sum &>/dev/null; then
117 + actual=$(sha256sum "$tmpdir/$archive_name" | awk '{print $1}')
118 + elif command -v shasum &>/dev/null; then
119 + actual=$(shasum -a 256 "$tmpdir/$archive_name" | awk '{print $1}')
120 + else
121 + actual=""
122 + warn "No SHA-256 utility found — skipping verification"
123 + fi
124 +
125 + if [[ -n "$actual" && "$expected" != "$actual" ]]; then
126 + error "Checksum mismatch for $archive_name\n Expected: $expected\n Actual: $actual"
127 + fi
128 +
129 + if [[ -n "$actual" ]]; then
130 + info "Checksum verified"
131 + fi
132 + else
133 + warn "No checksum entry found for $archive_name — skipping verification"
134 + fi
135 +else
136 + info "No checksums.txt in release — skipping verification"
137 fi
138
161 -# Download
162 -info "Downloading Composio CLI..."
163 -curl --fail --location --progress-bar --output "$exe.zip" "$composio_uri" ||
164 - error "Failed to download Composio CLI from \"$composio_uri\""
165 -
166 -# Extract
167 -info "Extracting Composio CLI..."
168 -unzip -oqd "$COMPOSIO_INSTALL_DIR" "$exe.zip" ||
169 - error 'Failed to extract Composio CLI'
170 -
171 -# Move binary to final location
172 -if [[ -f "$COMPOSIO_INSTALL_DIR/composio-$target/$exe_name" ]]; then
173 - mv "$COMPOSIO_INSTALL_DIR/composio-$target/$exe_name" "$exe" ||
174 - error 'Failed to move extracted binary to destination'
175 - rm -r "$COMPOSIO_INSTALL_DIR/composio-$target"
176 -elif [[ -f "$COMPOSIO_INSTALL_DIR/$exe_name" ]]; then
177 - mv "$COMPOSIO_INSTALL_DIR/$exe_name" "$exe" ||
178 - error 'Failed to move extracted binary to destination'
139 +# --- Extract and install ---
140 +
141 +info "Extracting..."
142 +unzip -oqd "$tmpdir" "$tmpdir/$archive_name" ||
143 + error 'Failed to extract archive'
144 +
145 +mkdir -p "$COMPOSIO_INSTALL_DIR" ||
146 + error "Failed to create install directory \"$COMPOSIO_INSTALL_DIR\""
147 +
148 +exe="$COMPOSIO_INSTALL_DIR/composio"
149 +
150 +# Handle nested directory structure (composio-<target>/composio)
151 +if [[ -f "$tmpdir/composio-$target/composio" ]]; then
152 + mv "$tmpdir/composio-$target/composio" "$exe"
153 +elif [[ -f "$tmpdir/composio" ]]; then
154 + mv "$tmpdir/composio" "$exe"
155 else
156 error 'Binary not found in extracted archive'
157 fi
158
159 chmod +x "$exe" ||
184 - error 'Failed to set permissions on Composio CLI executable'
160 + error 'Failed to set permissions on executable'
161
186 -rm "$exe.zip"
162 +success "Composio CLI was installed successfully to $Bold_Green$(tildify "$exe")"
163
188 -tildify() {
189 - if [[ $1 = $HOME/* ]]; then
190 - local replacement=\~/
191 - echo "${1/$HOME\//$replacement}"
192 - else
193 - echo "$1"
194 - fi
195 -}
164 +# --- Shell configuration ---
165
197 -success "Composio CLI was installed successfully to $Bold_Green$(tildify "$exe")"
166 +echo
167
168 refresh_command=''
200 -
201 -tilde_bin_dir=$(tildify "$COMPOSIO_INSTALL_DIR")
169 quoted_install_dir=\"${COMPOSIO_INSTALL_DIR//\"/\\\"}\"
170
171 if [[ $quoted_install_dir = \"$HOME/* ]]; then
172 quoted_install_dir=${COMPOSIO_INSTALL_DIR/$HOME\//\$HOME/}
173 fi
174
208 -echo
209 -
210 -# Add to shell configuration
175 case $(basename "$SHELL") in
176 fish)
177 commands=(
178 "set --export COMPOSIO_INSTALL_DIR $COMPOSIO_INSTALL_DIR"
179 "set --export PATH $COMPOSIO_INSTALL_DIR \$PATH"
180 )
217 -
181 fish_config=$HOME/.config/fish/config.fish
219 - tilde_fish_config=$(tildify "$fish_config")
220 -
182 if [[ -w $fish_config ]]; then
222 - {
223 - echo -e '\n# Composio CLI'
224 -
225 - for command in "${commands[@]}"; do
226 - echo "$command"
227 - done
228 - } >>"$fish_config"
229 -
230 - info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_fish_config\""
231 -
232 - refresh_command="source $tilde_fish_config"
183 + { echo -e '\n# Composio CLI'; for cmd in "${commands[@]}"; do echo "$cmd"; done; } >>"$fish_config"
184 + info "Added \"$(tildify "$COMPOSIO_INSTALL_DIR")\" to \$PATH in \"$(tildify "$fish_config")\""
185 + refresh_command="source $(tildify "$fish_config")"
186 else
234 - echo "Manually add the directory to $tilde_fish_config (or similar):"
235 -
236 - for command in "${commands[@]}"; do
237 - info_bold " $command"
238 - done
187 + echo "Manually add the directory to $(tildify "$fish_config") (or similar):"
188 + for cmd in "${commands[@]}"; do info_bold " $cmd"; done
189 fi
190 ;;
191 zsh)
@@ -243,33 +193,15 @@ zsh)
193 "export COMPOSIO_INSTALL_DIR=$COMPOSIO_INSTALL_DIR"
194 "export PATH=\"$COMPOSIO_INSTALL_DIR:\$PATH\""
195 )
246 -
196 zsh_config=$HOME/.zshrc
248 - tilde_zsh_config=$(tildify "$zsh_config")
249 -
250 - # Create .zshrc if it doesn't exist and directory is writable
251 - if [[ ! -f $zsh_config && -w $(dirname "$zsh_config") ]]; then
252 - touch "$zsh_config"
253 - fi
254 -
197 + if [[ ! -f $zsh_config && -w $(dirname "$zsh_config") ]]; then touch "$zsh_config"; fi
198 if [[ -w $zsh_config ]]; then
256 - {
257 - echo -e '\n# Composio CLI'
258 -
259 - for command in "${commands[@]}"; do
260 - echo "$command"
261 - done
262 - } >>"$zsh_config"
263 -
264 - info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_zsh_config\""
265 -
199 + { echo -e '\n# Composio CLI'; for cmd in "${commands[@]}"; do echo "$cmd"; done; } >>"$zsh_config"
200 + info "Added \"$(tildify "$COMPOSIO_INSTALL_DIR")\" to \$PATH in \"$(tildify "$zsh_config")\""
201 refresh_command="exec $SHELL"
202 else
268 - echo "Manually add the directory to $tilde_zsh_config (or similar):"
269 -
270 - for command in "${commands[@]}"; do
271 - info_bold " $command"
272 - done
203 + echo "Manually add the directory to $(tildify "$zsh_config") (or similar):"
204 + for cmd in "${commands[@]}"; do info_bold " $cmd"; done
205 fi
206 ;;
207 bash)
@@ -277,51 +209,25 @@ bash)
209 "export COMPOSIO_INSTALL_DIR=$quoted_install_dir"
210 "export PATH=\"\$COMPOSIO_INSTALL_DIR:\$PATH\""
211 )
280 -
281 - bash_configs=(
282 - "$HOME/.bashrc"
283 - "$HOME/.bash_profile"
284 - )
285 -
212 + bash_configs=("$HOME/.bashrc" "$HOME/.bash_profile")
213 if [[ ${XDG_CONFIG_HOME:-} ]]; then
287 - bash_configs+=(
288 - "$XDG_CONFIG_HOME/.bash_profile"
289 - "$XDG_CONFIG_HOME/.bashrc"
290 - "$XDG_CONFIG_HOME/bash_profile"
291 - "$XDG_CONFIG_HOME/bashrc"
292 - )
214 + bash_configs+=("$XDG_CONFIG_HOME/.bash_profile" "$XDG_CONFIG_HOME/.bashrc" "$XDG_CONFIG_HOME/bash_profile" "$XDG_CONFIG_HOME/bashrc")
215 fi
294 -
216 set_manually=true
217 for bash_config in "${bash_configs[@]}"; do
297 - tilde_bash_config=$(tildify "$bash_config")
298 -
218 if [[ -w $bash_config ]]; then
300 - {
301 - echo -e '\n# Composio CLI'
302 -
303 - for command in "${commands[@]}"; do
304 - echo "$command"
305 - done
306 - } >>"$bash_config"
307 -
308 - info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_bash_config\""
309 -
219 + { echo -e '\n# Composio CLI'; for cmd in "${commands[@]}"; do echo "$cmd"; done; } >>"$bash_config"
220 + info "Added \"$(tildify "$COMPOSIO_INSTALL_DIR")\" to \$PATH in \"$(tildify "$bash_config")\""
221 refresh_command="source $bash_config"
222 set_manually=false
223 break
224 fi
225 done
315 -
226 if [[ $set_manually = true ]]; then
317 - echo "Manually add the directory to $tilde_bash_config (or similar):"
318 -
319 - for command in "${commands[@]}"; do
320 - info_bold " $command"
321 - done
227 + echo "Manually add the directory to ~/.bashrc (or similar):"
228 + for cmd in "${commands[@]}"; do info_bold " $cmd"; done
229 fi
230 ;;
324 -
231 *)
232 echo 'Manually add the directory to ~/.bashrc (or similar):'
233 info_bold " export COMPOSIO_INSTALL_DIR=$quoted_install_dir"
package.json
+2
@@ -12,6 +12,8 @@
12 "scripts": {
13 "build": "turbo build",
14 "build:binary": "turbo build:binary --filter=./ts/packages/cli",
15 + "build:binary:all": "turbo build:binary:all --filter=./ts/packages/cli",
16 + "build:binary:checksums": "turbo build:binary:checksums --filter=./ts/packages/cli",
17 "install:binary": "turbo install:binary --filter=./ts/packages/cli",
18 "build:packages": "turbo build --filter=./ts/packages/**",
19 "cli:record": "turbo run record --filter=./ts/packages/cli",
ts/packages/cli/package.json
+4
@@ -27,6 +27,10 @@
27 "clean": "git clean -xdf node_modules",
28 "cli": "bun run src/bin.ts",
29 "build:binary": "bun run ./scripts/build-binary.ts",
30 + "build:binary:cross": "bun run ./scripts/build-binary-cross.ts",
31 + "build:binary:all": "bun run ./scripts/build-all-binaries.ts",
32 + "build:binary:package": "bun run ./scripts/package-binaries.ts",
33 + "build:binary:checksums": "bun run ./scripts/generate-checksums.ts",
34 "install:binary": "bun run ./scripts/install-binary.ts ./dist/composio",
35 "table:metrics": "bun run ./scripts/optimize-metrics-table.ts",
36 "mock": "bun run ./scripts/copy-mocks-from-cache.ts",
ts/packages/cli/scripts/build-all-binaries.ts new
+120
@@ -0,0 +1,120 @@
1 +import process from 'node:process';
2 +import {
3 + Cause,
4 + Config,
5 + ConfigProvider,
6 + Console,
7 + Effect,
8 + Exit,
9 + Stream,
10 + Logger,
11 + Layer,
12 + LogLevel,
13 +} from 'effect';
14 +import { Command } from '@effect/platform';
15 +import { BunContext, BunRuntime } from '@effect/platform-bun';
16 +import type { Teardown } from '@effect/platform/Runtime';
17 +
18 +/**
19 + * All cross-compilation targets and their artifact names.
20 + */
21 +const TARGETS = [
22 + { target: 'bun-darwin-arm64', artifact: 'composio-darwin-aarch64' },
23 + { target: 'bun-darwin-x64', artifact: 'composio-darwin-x64' },
24 + { target: 'bun-linux-x64', artifact: 'composio-linux-x64' },
25 + { target: 'bun-linux-arm64', artifact: 'composio-linux-aarch64' },
26 +] as const;
27 +
28 +function runBunBuild(target: string, outfile: string) {
29 + return Effect.gen(function* () {
30 + const args = [
31 + 'bun',
32 + 'build',
33 + './src/bin.ts',
34 + '--env',
35 + 'DEBUG_OVERRIDE_*',
36 + '--compile',
37 + '--production',
38 + '--target',
39 + target,
40 + '--outfile',
41 + outfile,
42 + ] as const satisfies ReadonlyArray<string>;
43 +
44 + const cmd = Command.make(...args);
45 +
46 + const { exitCode } = yield* cmd.pipe(
47 + Command.start,
48 + Effect.flatMap(process =>
49 + Effect.all(
50 + {
51 + exitCode: process.exitCode,
52 + output: Stream.merge(
53 + Stream.decodeText(process.stdout, 'utf-8'),
54 + Stream.decodeText(process.stderr, 'utf-8'),
55 + { haltStrategy: 'left' }
56 + ).pipe(
57 + Stream.tap(chunk => Console.log(chunk)),
58 + Stream.runDrain
59 + ),
60 + },
61 + {
62 + concurrency: 'unbounded',
63 + }
64 + )
65 + )
66 + );
67 +
68 + if (exitCode !== 0) {
69 + return yield* Effect.fail(new Error(`Failed to build binary for ${target}`));
70 + }
71 + });
72 +}
73 +
74 +/**
75 + * Build all platform binaries via cross-compilation.
76 + *
77 + * Usage: `bun scripts/build-all-binaries.ts`
78 + * Output: `dist/binaries/composio-{darwin-aarch64,darwin-x64,linux-x64,linux-aarch64}`
79 + */
80 +export function buildAllBinaries() {
81 + return Effect.gen(function* () {
82 + yield* Console.log(`Building ${TARGETS.length} platform binaries...`);
83 +
84 + for (const { target, artifact } of TARGETS) {
85 + const outfile = `./dist/binaries/${artifact}`;
86 + yield* Console.log(`\nBuilding ${artifact} (${target})...`);
87 + yield* runBunBuild(target, outfile);
88 + yield* Console.log(`Built: ${outfile}`);
89 + }
90 +
91 + yield* Console.log(`\nAll ${TARGETS.length} binaries built successfully.`);
92 + });
93 +}
94 +
95 +export const teardown: Teardown = <E, A>(exit: Exit.Exit<E, A>, onExit: (code: number) => void) => {
96 + const shouldFail = Exit.isFailure(exit) && !Cause.isInterruptedOnly(exit.cause);
97 + const errorCode = Number(process.exitCode ?? 1);
98 + onExit(shouldFail ? errorCode : 0);
99 +};
100 +
101 +const ConfigLive = Effect.gen(function* () {
102 + const logLevel = yield* Config.logLevel('COMPOSIO_LOG_LEVEL').pipe(
103 + Config.withDefault(LogLevel.Info)
104 + );
105 +
106 + return Logger.minimumLogLevel(logLevel);
107 +}).pipe(Layer.unwrapEffect, Layer.merge(Layer.setConfigProvider(ConfigProvider.fromEnv())));
108 +
109 +if (require.main === module) {
110 + buildAllBinaries().pipe(
111 + Effect.provide(ConfigLive),
112 + Effect.provide(Logger.pretty),
113 + Effect.provide(BunContext.layer),
114 + Effect.scoped,
115 + Effect.map(() => ({ message: 'Process completed successfully.' })),
116 + BunRuntime.runMain({
117 + teardown,
118 + })
119 + );
120 +}
ts/packages/cli/scripts/build-binary-cross.ts new
+139
@@ -0,0 +1,139 @@
1 +import process from 'node:process';
2 +import {
3 + Cause,
4 + Config,
5 + ConfigProvider,
6 + Console,
7 + Effect,
8 + Exit,
9 + Stream,
10 + Logger,
11 + Layer,
12 + LogLevel,
13 +} from 'effect';
14 +import { Command } from '@effect/platform';
15 +import { BunContext, BunRuntime } from '@effect/platform-bun';
16 +import type { Teardown } from '@effect/platform/Runtime';
17 +
18 +/**
19 + * Maps Bun cross-compilation targets to Composio artifact names.
20 + */
21 +const TARGET_MAP: Record<string, string> = {
22 + 'bun-darwin-arm64': 'composio-darwin-aarch64',
23 + 'bun-darwin-x64': 'composio-darwin-x64',
24 + 'bun-linux-x64': 'composio-linux-x64',
25 + 'bun-linux-arm64': 'composio-linux-aarch64',
26 +};
27 +
28 +const VALID_TARGETS = Object.keys(TARGET_MAP);
29 +
30 +function parseTarget(): { target: string; artifact: string } {
31 + const targetIdx = process.argv.indexOf('--target');
32 + if (targetIdx === -1 || !process.argv[targetIdx + 1]) {
33 + process.stderr.write(`Usage: bun scripts/build-binary-cross.ts --target <target>\n`);
34 + process.stderr.write(`Valid targets: ${VALID_TARGETS.join(', ')}\n`);
35 + process.exit(1);
36 + }
37 +
38 + const target = process.argv[targetIdx + 1];
39 + const artifact = TARGET_MAP[target];
40 + if (!artifact) {
41 + process.stderr.write(`Invalid target: ${target}\n`);
42 + process.stderr.write(`Valid targets: ${VALID_TARGETS.join(', ')}\n`);
43 + process.exit(1);
44 + }
45 +
46 + return { target, artifact };
47 +}
48 +
49 +/**
50 + * Cross-compile a CLI binary for a specific Bun target.
51 + *
52 + * Usage: `bun scripts/build-binary-cross.ts --target bun-darwin-arm64`
53 + * Output: `dist/binaries/composio-darwin-aarch64`
54 + */
55 +export function buildBinaryCross() {
56 + const { target, artifact } = parseTarget();
57 +
58 + return Effect.gen(function* () {
59 + const cwd = process.cwd();
60 + yield* Effect.logDebug(`Cross-compiling binary in ${cwd} for target ${target}`);
61 +
62 + const outfile = `./dist/binaries/${artifact}`;
63 +
64 + const args = [
65 + 'bun',
66 + 'build',
67 + './src/bin.ts',
68 + '--env',
69 + 'DEBUG_OVERRIDE_*',
70 + '--compile',
71 + '--production',
72 + '--target',
73 + target,
74 + '--outfile',
75 + outfile,
76 + ] as const satisfies ReadonlyArray<string>;
77 +
78 + const cmd = Command.make(...args);
79 +
80 + yield* Effect.logDebug('Running build command with', args.join(' '), '');
81 +
82 + const { exitCode } = yield* cmd.pipe(
83 + Command.start,
84 + Effect.flatMap(process =>
85 + Effect.all(
86 + {
87 + exitCode: process.exitCode,
88 + output: Stream.merge(
89 + Stream.decodeText(process.stdout, 'utf-8'),
90 + Stream.decodeText(process.stderr, 'utf-8'),
91 + { haltStrategy: 'left' }
92 + ).pipe(
93 + Stream.tap(chunk => Console.log(chunk)),
94 + Stream.runDrain
95 + ),
96 + },
97 + {
98 + concurrency: 'unbounded',
99 + }
100 + )
101 + )
102 + );
103 +
104 + process.exitCode = exitCode;
105 +
106 + if (exitCode !== 0) {
107 + return yield* Effect.logInfo(`Failed to cross-compile binary for ${target}`);
108 + }
109 +
110 + yield* Console.log(`Binary cross-compiled: ${outfile}`);
111 + });
112 +}
113 +
114 +export const teardown: Teardown = <E, A>(exit: Exit.Exit<E, A>, onExit: (code: number) => void) => {
115 + const shouldFail = Exit.isFailure(exit) && !Cause.isInterruptedOnly(exit.cause);
116 + const errorCode = Number(process.exitCode ?? 1);
117 + onExit(shouldFail ? errorCode : 0);
118 +};
119 +
120 +const ConfigLive = Effect.gen(function* () {
121 + const logLevel = yield* Config.logLevel('COMPOSIO_LOG_LEVEL').pipe(
122 + Config.withDefault(LogLevel.Info)
123 + );
124 +
125 + return Logger.minimumLogLevel(logLevel);
126 +}).pipe(Layer.unwrapEffect, Layer.merge(Layer.setConfigProvider(ConfigProvider.fromEnv())));
127 +
128 +if (require.main === module) {
129 + buildBinaryCross().pipe(
130 + Effect.provide(ConfigLive),
131 + Effect.provide(Logger.pretty),
132 + Effect.provide(BunContext.layer),
133 + Effect.scoped,
134 + Effect.map(() => ({ message: 'Process completed successfully.' })),
135 + BunRuntime.runMain({
136 + teardown,
137 + })
138 + );
139 +}
ts/packages/cli/scripts/generate-checksums.ts new
+88
@@ -0,0 +1,88 @@
1 +import process from 'node:process';
2 +import {
3 + Cause,
4 + Config,
5 + ConfigProvider,
6 + Console,
7 + Effect,
8 + Exit,
9 + Logger,
10 + Layer,
11 + LogLevel,
12 +} from 'effect';
13 +import { BunContext, BunRuntime } from '@effect/platform-bun';
14 +import type { Teardown } from '@effect/platform/Runtime';
15 +import { readdir, readFile, writeFile } from 'node:fs/promises';
16 +import path from 'node:path';
17 +
18 +const BINARIES_DIR = './dist/binaries';
19 +
20 +/**
21 + * Generate checksums.txt from all .zip files in dist/binaries/.
22 + *
23 + * Output format (sha256sum compatible):
24 + * <sha256hex> <filename>
25 + *
26 + * Usage: `bun scripts/generate-checksums.ts`
27 + */
28 +export function generateChecksums() {
29 + return Effect.gen(function* () {
30 + const entries = yield* Effect.tryPromise(() => readdir(BINARIES_DIR));
31 + const zipFiles = entries.filter(entry => entry.endsWith('.zip')).sort();
32 +
33 + if (zipFiles.length === 0) {
34 + yield* Console.error(
35 + 'No .zip files found in dist/binaries/. Run build:binary:package first.'
36 + );
37 + process.exitCode = 1;
38 + return;
39 + }
40 +
41 + yield* Console.log(`Generating checksums for ${zipFiles.length} archives...`);
42 +
43 + const lines: string[] = [];
44 +
45 + for (const zipFile of zipFiles) {
46 + const filePath = path.join(BINARIES_DIR, zipFile);
47 + const data = yield* Effect.tryPromise(() => readFile(filePath));
48 + const hashBuffer = yield* Effect.tryPromise(() => crypto.subtle.digest('SHA-256', data));
49 + const hash = Array.from(new Uint8Array(hashBuffer))
50 + .map(b => b.toString(16).padStart(2, '0'))
51 + .join('');
52 + lines.push(`${hash} ${zipFile}`);
53 + yield* Console.log(` ${hash} ${zipFile}`);
54 + }
55 +
56 + const checksumsPath = path.join(BINARIES_DIR, 'checksums.txt');
57 + yield* Effect.tryPromise(() => writeFile(checksumsPath, lines.join('\n') + '\n'));
58 +
59 + yield* Console.log(`\nWritten: ${checksumsPath}`);
60 + });
61 +}
62 +
63 +export const teardown: Teardown = <E, A>(exit: Exit.Exit<E, A>, onExit: (code: number) => void) => {
64 + const shouldFail = Exit.isFailure(exit) && !Cause.isInterruptedOnly(exit.cause);
65 + const errorCode = Number(process.exitCode ?? 1);
66 + onExit(shouldFail ? errorCode : 0);
67 +};
68 +
69 +const ConfigLive = Effect.gen(function* () {
70 + const logLevel = yield* Config.logLevel('COMPOSIO_LOG_LEVEL').pipe(
71 + Config.withDefault(LogLevel.Info)
72 + );
73 +
74 + return Logger.minimumLogLevel(logLevel);
75 +}).pipe(Layer.unwrapEffect, Layer.merge(Layer.setConfigProvider(ConfigProvider.fromEnv())));
76 +
77 +if (require.main === module) {
78 + generateChecksums().pipe(
79 + Effect.provide(ConfigLive),
80 + Effect.provide(Logger.pretty),
81 + Effect.provide(BunContext.layer),
82 + Effect.scoped,
83 + Effect.map(() => ({ message: 'Process completed successfully.' })),
84 + BunRuntime.runMain({
85 + teardown,
86 + })
87 + );
88 +}
ts/packages/cli/scripts/package-binaries.ts new
+104
@@ -0,0 +1,104 @@
1 +import process from 'node:process';
2 +import {
3 + Cause,
4 + Config,
5 + ConfigProvider,
6 + Console,
7 + Effect,
8 + Exit,
9 + Logger,
10 + Layer,
11 + LogLevel,
12 +} from 'effect';
13 +import { BunContext, BunRuntime } from '@effect/platform-bun';
14 +import type { Teardown } from '@effect/platform/Runtime';
15 +import { $ } from 'bun';
16 +import { readdir, stat } from 'node:fs/promises';
17 +import path from 'node:path';
18 +
19 +const BINARIES_DIR = './dist/binaries';
20 +
21 +/**
22 + * Known binary artifact names (without extension).
23 + */
24 +const ARTIFACT_NAMES = [
25 + 'composio-darwin-aarch64',
26 + 'composio-darwin-x64',
27 + 'composio-linux-x64',
28 + 'composio-linux-aarch64',
29 +];
30 +
31 +/**
32 + * Package each raw binary in dist/binaries/ into a .zip archive.
33 + *
34 + * Creates a nested directory structure inside the zip:
35 + * composio-<target>/composio
36 + *
37 + * This matches the structure expected by install.sh.
38 + *
39 + * Usage: `bun scripts/package-binaries.ts`
40 + */
41 +export function packageBinaries() {
42 + return Effect.gen(function* () {
43 + const entries = yield* Effect.tryPromise(() => readdir(BINARIES_DIR));
44 +
45 + const binaries = entries.filter(entry => ARTIFACT_NAMES.includes(entry));
46 +
47 + if (binaries.length === 0) {
48 + yield* Console.error('No binaries found in dist/binaries/. Run build:binary:all first.');
49 + process.exitCode = 1;
50 + return;
51 + }
52 +
53 + yield* Console.log(`Packaging ${binaries.length} binaries...`);
54 +
55 + for (const binary of binaries) {
56 + const binaryPath = path.join(BINARIES_DIR, binary);
57 + const zipPath = path.join(BINARIES_DIR, `${binary}.zip`);
58 +
59 + // Create nested directory structure: <artifact>/<binary-name>
60 + const tempDir = path.join(BINARIES_DIR, `_pkg_${binary}`);
61 + const nestedDir = path.join(tempDir, binary);
62 +
63 + yield* Effect.tryPromise(async () => {
64 + await $`mkdir -p ${nestedDir}`.quiet();
65 + await $`cp ${binaryPath} ${nestedDir}/composio`.quiet();
66 + await $`cd ${tempDir} && zip -r ${path.resolve(zipPath)} ${binary}`.quiet();
67 + await $`rm -rf ${tempDir}`.quiet();
68 + });
69 +
70 + const zipStat = yield* Effect.tryPromise(() => stat(zipPath));
71 + const sizeMB = (zipStat.size / (1024 * 1024)).toFixed(1);
72 + yield* Console.log(` ${binary}.zip (${sizeMB} MB)`);
73 + }
74 +
75 + yield* Console.log(`\nAll ${binaries.length} archives created.`);
76 + });
77 +}
78 +
79 +export const teardown: Teardown = <E, A>(exit: Exit.Exit<E, A>, onExit: (code: number) => void) => {
80 + const shouldFail = Exit.isFailure(exit) && !Cause.isInterruptedOnly(exit.cause);
81 + const errorCode = Number(process.exitCode ?? 1);
82 + onExit(shouldFail ? errorCode : 0);
83 +};
84 +
85 +const ConfigLive = Effect.gen(function* () {
86 + const logLevel = yield* Config.logLevel('COMPOSIO_LOG_LEVEL').pipe(
87 + Config.withDefault(LogLevel.Info)
88 + );
89 +
90 + return Logger.minimumLogLevel(logLevel);
91 +}).pipe(Layer.unwrapEffect, Layer.merge(Layer.setConfigProvider(ConfigProvider.fromEnv())));
92 +
93 +if (require.main === module) {
94 + packageBinaries().pipe(
95 + Effect.provide(ConfigLive),
96 + Effect.provide(Logger.pretty),
97 + Effect.provide(BunContext.layer),
98 + Effect.scoped,
99 + Effect.map(() => ({ message: 'Process completed successfully.' })),
100 + BunRuntime.runMain({
101 + teardown,
102 + })
103 + );
104 +}
ts/packages/cli/src/services/upgrade-binary.ts
+94
@@ -259,6 +259,86 @@ export class UpgradeBinary extends Effect.Service<UpgradeBinary>()('services/Upg
259 };
260 });
261
262 + /**
263 + * Fetch checksums.txt from a release, if available.
264 + * Returns the parsed map of filename -> expected SHA-256 hash, or None if not found.
265 + */
266 + const fetchChecksums = (
267 + release: GitHubRelease
268 + ): Effect.Effect<Option.Option<Map<string, string>>, never, never> =>
269 + Effect.gen(function* () {
270 + const checksumsAsset = release.assets.find(a => a.name === 'checksums.txt');
271 + if (!checksumsAsset) {
272 + yield* Effect.logDebug('No checksums.txt found in release assets');
273 + return Option.none();
274 + }
275 +
276 + const response = yield* httpClient
277 + .get(checksumsAsset.browser_download_url)
278 + .pipe(Effect.catchAll(() => Effect.succeed(null)));
279 +
280 + if (!response || response.status < 200 || response.status >= 300) {
281 + yield* Effect.logDebug('Failed to download checksums.txt');
282 + return Option.none();
283 + }
284 +
285 + const text = yield* response.text.pipe(Effect.catchAll(() => Effect.succeed('')));
286 + if (!text) {
287 + return Option.none();
288 + }
289 +
290 + const checksums = new Map<string, string>();
291 + for (const line of text.split('\n')) {
292 + const trimmed = line.trim();
293 + if (!trimmed) continue;
294 + // Format: "<hash> <filename>" (two spaces, sha256sum compatible)
295 + const parts = trimmed.split(/\s+/);
296 + if (parts.length >= 2) {
297 + checksums.set(parts[1], parts[0]);
298 + }
299 + }
300 +
301 + return Option.some(checksums);
302 + });
303 +
304 + /**
305 + * Verify SHA-256 checksum of downloaded data against expected hash.
306 + */
307 + const verifyChecksum = (
308 + data: Uint8Array,
309 + expectedHash: string,
310 + fileName: string
311 + ): Effect.Effect<void, UpgradeBinaryError> =>
312 + Effect.gen(function* () {
313 + const hashBuffer = yield* Effect.tryPromise({
314 + try: () => {
315 + // Copy into a fresh ArrayBuffer to avoid SharedArrayBuffer type incompatibility
316 + const buf = new ArrayBuffer(data.byteLength);
317 + new Uint8Array(buf).set(data);
318 + return crypto.subtle.digest('SHA-256', buf);
319 + },
320 + catch: error =>
321 + new UpgradeBinaryError({
322 + cause: error as Error,
323 + message: 'Failed to compute SHA-256 checksum',
324 + }),
325 + });
326 +
327 + const actual = Array.from(new Uint8Array(hashBuffer))
328 + .map(b => b.toString(16).padStart(2, '0'))
329 + .join('');
330 +
331 + if (actual !== expectedHash) {
332 + return yield* Effect.fail(
333 + new UpgradeBinaryError({
334 + message: `Checksum mismatch for ${fileName}\n Expected: ${expectedHash}\n Actual: ${actual}`,
335 + })
336 + );
337 + }
338 +
339 + yield* Effect.logDebug(`Checksum verified for ${fileName}`);
340 + });
341 +
342 /**
343 * Extract binary from zip archive using FileSystem
344 */
@@ -421,6 +501,20 @@ export class UpgradeBinary extends Effect.Service<UpgradeBinary>()('services/Upg
501 const platformArch = yield* detectPlatform;
502 const { name, data } = yield* downloadBinary(release, platformArch);
503
504 + yield* spinner.message('Verifying checksum...');
505 +
506 + const checksums = yield* fetchChecksums(release);
507 + if (Option.isSome(checksums)) {
508 + const expectedHash = checksums.value.get(name);
509 + if (expectedHash) {
510 + yield* verifyChecksum(data, expectedHash, name);
511 + } else {
512 + yield* Effect.logDebug(
513 + `No checksum entry found for ${name} — skipping verification`
514 + );
515 + }
516 + }
517 +
518 yield* spinner.message('Extracting...');
519
520 // The temporary directory is automatically cleaned up
ts/packages/cli/turbo.json
+18
@@ -11,6 +11,24 @@
11 "inputs": ["$TURBO_DEFAULT$", "!test/**", "!vitest.config.ts"],
12 "outputs": ["dist/composio"]
13 },
14 + "build:binary:all": {
15 + "dependsOn": ["build"],
16 + "inputs": ["$TURBO_DEFAULT$", "!test/**", "!vitest.config.ts"],
17 + "outputs": [
18 + "dist/binaries/composio-darwin-aarch64",
19 + "dist/binaries/composio-darwin-x64",
20 + "dist/binaries/composio-linux-x64",
21 + "dist/binaries/composio-linux-aarch64"
22 + ]
23 + },
24 + "build:binary:package": {
25 + "dependsOn": ["build:binary:all"],
26 + "outputs": ["dist/binaries/*.zip"]
27 + },
28 + "build:binary:checksums": {
29 + "dependsOn": ["build:binary:package"],
30 + "outputs": ["dist/binaries/checksums.txt"]
31 + },
32 "install:binary": {
33 "dependsOn": ["build:binary"],
34 "cache": false