Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(docs): remove legacy fish path on uninstall
jkomyno72c9fb1dc8a5
diff --git a/.github/workflows/cli.test-installation.yml b/.github/workflows/cli.test-installation.ymlindex 27dc9934a..e9132c9b2 100644--- a/.github/workflows/cli.test-installation.yml+++ b/.github/workflows/cli.test-installation.yml@@ -33,6 +33,9 @@ jobs:- name: Test release resolution fallbackrun: bash test/install-sh-release-resolution.test.sh+ - name: Test documented uninstall snippet+ run: bash test/install-sh-uninstall-snippet.test.sh+- name: Lint POSIX install scriptsrun: shellcheck -s sh install.sh install/*.shdiff --git a/INSTALL.md b/INSTALL.mdindex 9a5b2a96d..33a6f87ef 100644--- a/INSTALL.md+++ b/INSTALL.md@@ -95,7 +95,7 @@ rm -rf \"$install_dir/local-tools-binaries"```-Remove `# Composio CLI` PATH blocks from `~/.zshrc`, `~/.bashrc`, `~/.bash_profile`, `~/.bash_login`, or `~/.config/fish/config.fish` if you used a shell-specific installer. Blocks written by older installers contain an extra `export COMPOSIO_INSTALL_DIR=...` line after the marker; remove that line too.+Remove `# Composio CLI` PATH blocks from `~/.zshrc`, `~/.bashrc`, `~/.bash_profile`, `~/.bash_login`, or `~/.config/fish/config.fish` if you used a shell-specific installer. Blocks written by older installers contain an extra `export COMPOSIO_INSTALL_DIR=...` or `set --export COMPOSIO_INSTALL_DIR ...` line after the marker; remove that line too.To purge credentials, configuration, caches, and every other CLI file, run `rm -rf "${COMPOSIO_INSTALL_DIR:-$HOME/.composio}"`. This is a complete reset and cannot be undone.diff --git a/docs/content/docs/cli.mdx b/docs/content/docs/cli.mdxindex 947fc03cc..29c7a8125 100644--- a/docs/content/docs/cli.mdx+++ b/docs/content/docs/cli.mdx@@ -163,7 +163,7 @@ for file in \[ -f "$file" ] || continueawk '/^# Composio CLI$/ { skip = 1; next }- skip && /^export COMPOSIO_INSTALL_DIR=/ { next }+ skip && (/^export COMPOSIO_INSTALL_DIR=/ || /^set --export COMPOSIO_INSTALL_DIR /) { next }skip && (/^export PATH=/ || /^set --export PATH /) { skip = 0; next }{ skip = 0; print }' "$file" > "$file.tmp"diff --git a/test/install-sh-uninstall-snippet.test.sh b/test/install-sh-uninstall-snippet.test.shnew file mode 100644index 000000000..9e73be4ad--- /dev/null+++ b/test/install-sh-uninstall-snippet.test.sh@@ -0,0 +1,63 @@+#!/usr/bin/env bash+set -euo pipefail++repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"+suite_tmp="$(mktemp -d)"++cleanup() {+ rm -rf "$suite_tmp"+}+trap cleanup EXIT++fail() {+ printf 'FAIL: %s\n' "$*" >&2+ exit 1+}++snippet_file="$suite_tmp/uninstall-snippet.sh"+awk '+ /^### Uninstall$/ { in_section = 1; next }+ in_section && $0 == "```bash" { in_block = 1; next }+ in_block && $0 == "```" { exit }+ in_block { print }+' "$repo_root/docs/content/docs/cli.mdx" >"$snippet_file"++[[ -s $snippet_file ]] || fail 'could not extract the documented uninstall snippet'++interpreters=("$(command -v sh)")+if command -v dash >/dev/null 2>&1 && [[ $(command -v dash) != "${interpreters[0]}" ]]; then+ interpreters+=("$(command -v dash)")+fi++for interpreter in "${interpreters[@]}"; do+ interpreter_name=$(basename "$interpreter")+ case_home="$suite_tmp/$interpreter_name-home"+ mkdir -p "$case_home/.config/fish"+ cat >"$case_home/.config/fish/config.fish" <<'EOF'+set -gx EDITOR vim++# Composio CLI+set --export COMPOSIO_INSTALL_DIR "$HOME/.composio"+set --export PATH $COMPOSIO_INSTALL_DIR $PATH++alias ll='ls -la'+EOF++ HOME="$case_home" \+ COMPOSIO_INSTALL_DIR="$case_home/.composio" \+ COMPOSIO_BIN_DIR="$case_home/.local/bin" \+ "$interpreter" "$snippet_file"++ fish_config="$case_home/.config/fish/config.fish"+ if grep -Fq '# Composio CLI' "$fish_config" ||+ grep -Fq 'COMPOSIO_INSTALL_DIR' "$fish_config" ||+ grep -Fq 'set --export PATH' "$fish_config"; then+ fail "$interpreter_name kept the legacy Fish PATH block"+ fi+ grep -Fq 'set -gx EDITOR vim' "$fish_config" || fail "$interpreter_name lost leading Fish config"+ grep -Fq "alias ll='ls -la'" "$fish_config" || fail "$interpreter_name lost trailing Fish config"++ printf 'documented uninstall passed under %s\n' "$interpreter_name"+done++printf 'documented uninstall snippet tests passed\n'