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 21, 17:15 UTC
ci(cli): align installer workflows with auto shell-setup default
jkomyno committed
Aug 3, 2026 at 16:50 UTC
970562cf9df1abe1f00e58d56366cd18df9fc506
4 files changed
+70
-5
.github/workflows/build-cli-binaries.yml
+19
-1
@@ -314,6 +314,22 @@ jobs:
314
curl -fsSL https://composio.dev/install | sh
315
```
316
317
+ The installer downloads the CLI and sets up your shell automatically: when
318
+ your login shell (`$SHELL`) is zsh, bash, or fish, it adds the CLI's
319
+ directory to `PATH` in that shell's startup file. Re-running the installer
320
+ never duplicates the entry.
321
+
322
+ ### Install without shell setup
323
+
324
+ ```bash
325
+ curl -fsSL https://composio.dev/install | COMPOSIO_INSTALL_SHELL=none sh
326
+ ```
327
+
328
+ Use `COMPOSIO_INSTALL_SHELL=none` in CI, Docker images, or when you manage
329
+ shell startup files yourself: it installs the CLI and leaves every startup
330
+ file untouched. Set `COMPOSIO_INSTALL_SHELL=zsh`, `bash`, or `fish` instead
331
+ to configure a specific shell regardless of `$SHELL`.
332
+
333
### Install specific version
334
```bash
335
curl -fsSL https://composio.dev/install | sh -s -- RELEASE_TAG_PLACEHOLDER
@@ -341,7 +357,9 @@ jobs:
357
export PATH="$COMPOSIO_BIN_DIR:$PATH"
358
```
359
344
- Run `curl -fsSL https://composio.dev/install | COMPOSIO_INSTALL_SHELL=zsh sh`, replacing `zsh` with `bash` or `fish`, when you want the CLI to configure your shell.
360
+ After a manual installation, run `composio install` to add the CLI to your
361
+ shell's `PATH` permanently (or `composio install --shell zsh|bash|fish` to
362
+ target a specific shell).
363
364
## Usage
365
.github/workflows/cli.install-e2e.yml
+3
-1
@@ -193,9 +193,11 @@ jobs:
193
echo ""
194
echo '```sh'
195
echo "curl -fsSL \"$RAW_BASE/install.sh\" | sh"
196
- echo "curl -fsSL \"$RAW_BASE/install.sh\" | COMPOSIO_INSTALL_SHELL=zsh sh"
196
+ echo "curl -fsSL \"$RAW_BASE/install.sh\" | COMPOSIO_INSTALL_SHELL=none sh"
197
echo '```'
198
echo ""
199
+ echo "The first command is the default flow: it installs the CLI and configures your shell automatically. The second installs only, without touching shell startup files."
200
+ echo ""
201
echo "Shell-specific setup routes (the override points the variant at this PR's base installer):"
202
echo ""
203
echo '```sh'
.github/workflows/cli.install-health-check.yml
+8
-3
@@ -41,7 +41,10 @@ jobs:
41
- name: Install newest stable (pinned — fails on a release with missing assets)
42
run: |
43
set -euo pipefail
44
- curl -fsSL https://composio.dev/install | sh -s -- "${{ steps.resolve.outputs.tag }}"
44
+ # Install-only leg: this step's signal is asset availability, so it opts out of
45
+ # automatic shell setup with COMPOSIO_INSTALL_SHELL=none. Default-flow (auto)
46
+ # coverage stays with the no-arg leg below.
47
+ curl -fsSL https://composio.dev/install | COMPOSIO_INSTALL_SHELL=none sh -s -- "${{ steps.resolve.outputs.tag }}"
48
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
49
50
- name: Verify pinned installation
@@ -53,8 +56,10 @@ jobs:
56
which composio
57
composio --version
58
56
- # Secondary: the default no-arg flow most users run. Asset-aware and self-healing, so it
57
- # is a coverage net rather than the primary signal.
59
+ # Secondary: the default no-arg flow most users run, exactly as they run it — including
60
+ # automatic shell setup (the default infers the shell from $SHELL; the idempotent rc
61
+ # edit on this ephemeral runner is harmless). Asset-aware and self-healing, so it is a
62
+ # coverage net rather than the primary signal.
63
- name: Install via default no-arg flow
64
run: |
65
set -euo pipefail
.github/workflows/cli.test-installation.yml
+40
@@ -190,11 +190,34 @@ jobs:
190
exit 1
191
fi
192
193
+ # The default (COMPOSIO_INSTALL_SHELL unset → auto) infers the target
194
+ # shell from $SHELL, which "Setup shell environment" exported for this
195
+ # matrix leg, so this no-argument install must persist a managed PATH
196
+ # block in that shell's startup file.
197
+ if [[ "${{ matrix.shell }}" == "zsh" ]]; then
198
+ config_file=~/.zshrc
199
+ else
200
+ config_file=~/.bashrc
201
+ fi
202
+
203
+ if grep -Fqx '# Composio CLI' "$config_file" \
204
+ && grep -Fqx 'export PATH="$HOME/.local/bin:$PATH"' "$config_file"; then
205
+ echo "✅ $config_file gained the managed Composio PATH block via automatic shell setup"
206
+ else
207
+ echo "❌ $config_file missing the managed Composio PATH block after the no-argument install"
208
+ echo "=== $config_file contents ==="
209
+ cat "$config_file"
210
+ exit 1
211
+ fi
212
+
213
- name: Test PATH integration
214
shell: bash
215
run: |
216
echo "Testing PATH integration with ${{ matrix.shell }}..."
217
218
+ # The no-argument install above already configured this shell through
219
+ # the auto default; this exercises the CLI command directly and must
220
+ # stay idempotent on top of it.
221
COMPOSIO_BIN_DIR="$HOME/.local/bin" "$HOME/.composio/composio" install --shell "${{ matrix.shell }}"
222
223
# Debug: Check what files exist and their contents
@@ -345,11 +368,28 @@ jobs:
368
exit 1
369
fi
370
371
+ # Automatic setup ran during the no-argument install and `composio
372
+ # install --shell` ran again afterwards: setup is idempotent, so the
373
+ # startup file must hold exactly one managed block.
374
+ marker_count=$(grep -Fcx '# Composio CLI' "$config_file" || true)
375
+ if [[ "$marker_count" == "1" ]]; then
376
+ echo "✅ $config_file contains exactly one managed Composio block"
377
+ else
378
+ echo "❌ $config_file contains $marker_count managed Composio blocks (expected 1)"
379
+ echo "=== $config_file contents ==="
380
+ cat "$config_file"
381
+ exit 1
382
+ fi
383
+
384
- name: Test custom install directory
385
shell: bash
386
env:
387
USE_LATEST: ${{ steps.release_target.outputs.use_latest }}
388
RELEASE_TAG: ${{ steps.release_target.outputs.release_tag }}
389
+ # Install-only step: it verifies custom install locations, so opt out
390
+ # of automatic shell setup instead of re-pointing the managed PATH
391
+ # block at the throwaway custom bin dir.
392
+ COMPOSIO_INSTALL_SHELL: none
393
run: |
394
echo "Testing custom install directory..."
395