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
fix(docs): remove legacy fish path on uninstall
jkomyno committed
Aug 4, 2026 at 18:21 UTC
72c9fb1dc8a556a0b640f967f92911ca9c3ef0ce
4 files changed
+68
-2
.github/workflows/cli.test-installation.yml
+3
@@ -33,6 +33,9 @@ jobs:
33
- name: Test release resolution fallback
34
run: bash test/install-sh-release-resolution.test.sh
35
36
+ - name: Test documented uninstall snippet
37
+ run: bash test/install-sh-uninstall-snippet.test.sh
38
+
39
- name: Lint POSIX install scripts
40
run: shellcheck -s sh install.sh install/*.sh
41
INSTALL.md
+1
-1
@@ -95,7 +95,7 @@ rm -rf \
95
"$install_dir/local-tools-binaries"
96
```
97
98
-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.
98
+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.
99
100
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.
101
docs/content/docs/cli.mdx
+1
-1
@@ -163,7 +163,7 @@ for file in \
163
[ -f "$file" ] || continue
164
awk '
165
/^# Composio CLI$/ { skip = 1; next }
166
- skip && /^export COMPOSIO_INSTALL_DIR=/ { next }
166
+ skip && (/^export COMPOSIO_INSTALL_DIR=/ || /^set --export COMPOSIO_INSTALL_DIR /) { next }
167
skip && (/^export PATH=/ || /^set --export PATH /) { skip = 0; next }
168
{ skip = 0; print }
169
' "$file" > "$file.tmp"
test/install-sh-uninstall-snippet.test.sh
new
+63
@@ -0,0 +1,63 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+suite_tmp="$(mktemp -d)"
6
+
7
+cleanup() {
8
+ rm -rf "$suite_tmp"
9
+}
10
+trap cleanup EXIT
11
+
12
+fail() {
13
+ printf 'FAIL: %s\n' "$*" >&2
14
+ exit 1
15
+}
16
+
17
+snippet_file="$suite_tmp/uninstall-snippet.sh"
18
+awk '
19
+ /^### Uninstall$/ { in_section = 1; next }
20
+ in_section && $0 == "```bash" { in_block = 1; next }
21
+ in_block && $0 == "```" { exit }
22
+ in_block { print }
23
+' "$repo_root/docs/content/docs/cli.mdx" >"$snippet_file"
24
+
25
+[[ -s $snippet_file ]] || fail 'could not extract the documented uninstall snippet'
26
+
27
+interpreters=("$(command -v sh)")
28
+if command -v dash >/dev/null 2>&1 && [[ $(command -v dash) != "${interpreters[0]}" ]]; then
29
+ interpreters+=("$(command -v dash)")
30
+fi
31
+
32
+for interpreter in "${interpreters[@]}"; do
33
+ interpreter_name=$(basename "$interpreter")
34
+ case_home="$suite_tmp/$interpreter_name-home"
35
+ mkdir -p "$case_home/.config/fish"
36
+ cat >"$case_home/.config/fish/config.fish" <<'EOF'
37
+set -gx EDITOR vim
38
+
39
+# Composio CLI
40
+set --export COMPOSIO_INSTALL_DIR "$HOME/.composio"
41
+set --export PATH $COMPOSIO_INSTALL_DIR $PATH
42
+
43
+alias ll='ls -la'
44
+EOF
45
+
46
+ HOME="$case_home" \
47
+ COMPOSIO_INSTALL_DIR="$case_home/.composio" \
48
+ COMPOSIO_BIN_DIR="$case_home/.local/bin" \
49
+ "$interpreter" "$snippet_file"
50
+
51
+ fish_config="$case_home/.config/fish/config.fish"
52
+ if grep -Fq '# Composio CLI' "$fish_config" ||
53
+ grep -Fq 'COMPOSIO_INSTALL_DIR' "$fish_config" ||
54
+ grep -Fq 'set --export PATH' "$fish_config"; then
55
+ fail "$interpreter_name kept the legacy Fish PATH block"
56
+ fi
57
+ grep -Fq 'set -gx EDITOR vim' "$fish_config" || fail "$interpreter_name lost leading Fish config"
58
+ grep -Fq "alias ll='ls -la'" "$fish_config" || fail "$interpreter_name lost trailing Fish config"
59
+
60
+ printf 'documented uninstall passed under %s\n' "$interpreter_name"
61
+done
62
+
63
+printf 'documented uninstall snippet tests passed\n'