@devries-cameron20 / composio-1 / commits / aa2832539
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.

test(cli): add a fish leg to the local install e2e

jkomyno committed Aug 3, 2026 at 20:31 UTC aa2832539480229df2826e132ae8075997cd29e2
5 files changed +35 -8
.github/workflows/cli.install-e2e.yml
+1 -1
@@ -141,7 +141,7 @@ jobs:
141 strategy:
142 fail-fast: false
143 matrix:
144 - shell: [zsh, bash]
144 + shell: [zsh, bash, fish]
145
146 steps:
147 - name: Checkout
ts/e2e-tests/_utils/Dockerfile.install
+2 -2
@@ -2,9 +2,9 @@ FROM debian:bookworm-slim
2
3 ARG INSTALL_SHELL=bash
4
5 -RUN case "$INSTALL_SHELL" in bash|zsh) ;; *) exit 2 ;; esac && \
5 +RUN case "$INSTALL_SHELL" in bash|zsh|fish) ;; *) exit 2 ;; esac && \
6 apt-get update && \
7 - apt-get install -y --no-install-recommends bash ca-certificates curl passwd unzip $([ "$INSTALL_SHELL" = zsh ] && printf zsh) && \
7 + apt-get install -y --no-install-recommends bash ca-certificates curl passwd unzip $([ "$INSTALL_SHELL" = bash ] || printf '%s' "$INSTALL_SHELL") && \
8 rm -rf /var/lib/apt/lists/* && \
9 useradd -m -s "/bin/$INSTALL_SHELL" composio
10
ts/e2e-tests/_utils/src/const.ts
+1 -1
@@ -28,7 +28,7 @@ export const WELL_KNOWN_DENO_VERSIONS = [...toolchainVersions.deno, 'current'] a
28 */
29 export const WELL_KNOWN_CLI_VERSIONS = ['current'] as const;
30
31 -export const INSTALL_E2E_SHELLS = ['bash', 'zsh'] as const;
31 +export const INSTALL_E2E_SHELLS = ['bash', 'zsh', 'fish'] as const;
32
33 export const INSTALL_E2E_MODES = ['local', 'prod'] as const;
34
ts/e2e-tests/_utils/src/image-lifecycle.ts
+3 -3
@@ -715,7 +715,7 @@ export async function runCliContainer(options: RunCliContainerOptions): Promise<
715 // CLI installer Docker utilities
716 // ============================================================================
717
718 -export type InstallShell = 'bash' | 'zsh';
718 +export type InstallShell = 'bash' | 'zsh' | 'fish';
719 export type InstallPlatform = 'linux/amd64' | 'linux/arm64';
720
721 export interface EnsureInstallImageOptions {
@@ -754,8 +754,8 @@ export async function ensureInstallImage(
754 shell: InstallShell,
755 options: EnsureInstallImageOptions = {}
756 ): Promise<InstallImage> {
757 - if (shell !== 'bash' && shell !== 'zsh') {
758 - throw new Error(`ensureInstallImage(${shell}): shell must be bash or zsh`);
757 + if (shell !== 'bash' && shell !== 'zsh' && shell !== 'fish') {
758 + throw new Error(`ensureInstallImage(${shell}): shell must be bash, zsh, or fish`);
759 }
760
761 const repoRoot = options.repoRoot ?? getRepoRoot();
ts/e2e-tests/cli/install/e2e.test.ts
+28 -1
@@ -53,10 +53,13 @@ async function run(script: string): Promise<ExecResult> {
53 if (!image) {
54 throw new Error('Install image is not ready');
55 }
56 + // The test scripts are POSIX sh, which fish cannot interpret: drive fish legs
57 + // from bash and let the assertions invoke fish login shells explicitly.
58 + const scriptShell = config.shell === 'fish' ? 'bash' : config.shell;
59 return runInstallContainer({
60 ...image,
61 shell: config.shell,
59 - cmd: [config.shell, '-lc', script],
62 + cmd: [scriptShell, '-lc', script],
63 env: installerEnvironment(),
64 });
65 }
@@ -171,6 +174,30 @@ test "$(zsh -ilc 'composio --version')" = 98.0.0
174 });
175 }
176
177 +if (config.mode === 'local' && config.shell === 'fish') {
178 + describe('local fish installation', () => {
179 + it(
180 + 'configures fish idempotently and exposes composio in a fresh fish login shell',
181 + async () => {
182 + const result = await run(`
183 +set -eu
184 +test ! -d "$HOME/.local/bin"
185 +curl -fsSL "$INSTALL_BASE_URL/install/fish" | sh
186 +curl -fsSL "$INSTALL_BASE_URL/install/fish" | sh
187 +test -x "$HOME/.composio/composio"
188 +test -L "$HOME/.local/bin/composio"
189 +test "$(readlink -f "$HOME/.local/bin/composio")" = "$HOME/.composio/composio"
190 +test "$(grep -Fc '# Composio CLI' "$HOME/.config/fish/config.fish")" = 1
191 +test "$(fish -l -c 'command -v composio')" = "$HOME/.local/bin/composio"
192 +test "$(fish -l -c 'composio --version')" = 98.0.0
193 +`);
194 + assertSuccess(result);
195 + },
196 + timeout
197 + );
198 + });
199 +}
200 +
201 if (config.mode === 'local') {
202 describe('local failure handling', () => {
203 it(