From 08bf2b85e3e702c16ba14984511bc6072e9d7f8a Mon Sep 17 00:00:00 2001 From: HttpAnimations Date: Wed, 6 May 2026 16:15:22 -0700 Subject: [PATCH 1/3] fix installer --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 72d6ba3..af01f21 100755 --- a/install.sh +++ b/install.sh @@ -105,7 +105,7 @@ for event, commands in our_hooks.items(): for cmd in commands: if not any(h.get('command') == cmd for h in event_hooks): event_hooks.append({'command': cmd, 'show_output': False}) - print(f' Added {event}: {cmd.split("/")[-1]}') + print(f' Added {event}: {cmd.split(\"/\")[-1]}') hooks[event] = event_hooks existing['hooks'] = hooks From bcc28c698e3df3d3b77af051d16a32d438cbbe3d Mon Sep 17 00:00:00 2001 From: HttpAnimations Date: Wed, 6 May 2026 16:15:38 -0700 Subject: [PATCH 2/3] 1.6 --- src/extension.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/extension.js b/src/extension.js index bc643c5..1269117 100644 --- a/src/extension.js +++ b/src/extension.js @@ -101,6 +101,7 @@ function writeModelsFile() { "GPT-5.4", "GPT-5.3-Codex X-High", "SWE-1.5 Fast", + "SWE-1.6", ]; fs.writeFileSync(modelsPath, JSON.stringify({ models }, null, 2)); } From 62c1d4d7e73c594a27835dc91d3c34d123edd28d Mon Sep 17 00:00:00 2001 From: HttpAnimations Date: Wed, 6 May 2026 16:17:52 -0700 Subject: [PATCH 3/3] uninstall --- README.md | 12 ++++-- install.sh | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c85d9f6..18ae2f4 100644 --- a/README.md +++ b/README.md @@ -104,12 +104,16 @@ source ~/.zshrc ### Uninstall ```bash -rm ~/.local/bin/wsc -rm -rf ~/.windsurf/extensions/cascade-cli-0.1.0 -rm -rf ~/.windsurf-cli -# Optionally remove the hook from ~/.codeium/windsurf/hooks.json +./install.sh -u # or --uninstall ``` +This removes: +- CLI tool from `~/.local/bin/wsc` +- Extension symlink from `~/.windsurf/extensions/cascade-cli-0.1.0` +- All files in `~/.windsurf-cli/` +- Hooks from `~/.codeium/windsurf/hooks.json` +- Optionally removes PATH export from `~/.zshrc` (with confirmation) + ## Usage ### Send a prompt diff --git a/install.sh b/install.sh index af01f21..504fec3 100755 --- a/install.sh +++ b/install.sh @@ -17,6 +17,115 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" WSC_DIR="$HOME/.windsurf-cli" BIN_DIR="$HOME/.local/bin" HOOKS_DIR="$WSC_DIR/hooks" +HOOKS_JSON_USER="$HOME/.codeium/windsurf/hooks.json" + +# Parse arguments +UNINSTALL=false +for arg in "$@"; do + case $arg in + -u|--uninstall) + UNINSTALL=true + shift + ;; + esac +done + +# Uninstall function +uninstall() { + echo -e "${BOLD}━━━ Windsurf Cascade CLI Uninstaller ━━━${NC}" + echo "" + + local removed_any=false + + # Remove CLI tool + if [[ -f "$BIN_DIR/wsc" ]]; then + rm -f "$BIN_DIR/wsc" + echo -e "${GREEN}✓${NC} Removed CLI: $BIN_DIR/wsc" + removed_any=true + fi + + # Remove extension symlink + local ext_dir="$HOME/.windsurf/extensions" + if [[ ! -d "$ext_dir" ]]; then + ext_dir="$HOME/.vscode/extensions" + fi + local ext_target="$ext_dir/cascade-cli-0.1.0" + if [[ -L "$ext_target" || -d "$ext_target" ]]; then + rm -rf "$ext_target" + echo -e "${GREEN}✓${NC} Removed extension: $ext_target" + removed_any=true + fi + + # Remove windsurf-cli directory + if [[ -d "$WSC_DIR" ]]; then + rm -rf "$WSC_DIR" + echo -e "${GREEN}✓${NC} Removed directory: $WSC_DIR" + removed_any=true + fi + + # Remove hooks from hooks.json + if [[ -f "$HOOKS_JSON_USER" ]] && command -v python3 &>/dev/null; then + python3 -c " +import json, os + +hooks_json_path = '$HOOKS_JSON_USER' +hooks_dir = '$HOOKS_DIR' + +if not os.path.exists(hooks_json_path): + exit(0) + +with open(hooks_json_path) as f: + data = json.load(f) + +hooks = data.get('hooks', {}) +our_hook_commands = [ + f'bash {hooks_dir}/prompt-capture.sh', + f'bash {hooks_dir}/response-capture.sh', + f'bash {hooks_dir}/log-prompt.sh', + f'bash {hooks_dir}/log-transcript.sh', +] + +removed_count = 0 +for event, event_hooks in hooks.items(): + original_count = len(event_hooks) + hooks[event] = [h for h in event_hooks if h.get('command') not in our_hook_commands] + removed_count += original_count - len(hooks[event]) + +if removed_count > 0: + with open(hooks_json_path, 'w') as f: + json.dump(data, f, indent=2) + print(f' Removed {removed_count} hook(s) from hooks.json') +" + echo -e "${GREEN}✓${NC} Removed hooks from: $HOOKS_JSON_USER" + removed_any=true + fi + + # Optionally remove PATH from shell config + if grep -q "# Windsurf Cascade CLI" "$HOME/.zshrc" 2>/dev/null; then + read -rp "Remove PATH export from ~/.zshrc? [Y/n] " remove_path + if [[ "${remove_path:-Y}" =~ ^[Yy]$ ]]; then + # Remove the lines we added + sed -i '' '/# Windsurf Cascade CLI/d' "$HOME/.zshrc" + sed -i '' '/export PATH="\$HOME\/.local\/bin:\$PATH"/d' "$HOME/.zshrc" + echo -e "${GREEN}✓${NC} Removed PATH from ~/.zshrc" + removed_any=true + fi + fi + + echo "" + if [[ "$removed_any" == true ]]; then + echo -e "${GREEN}━━━ Uninstall Complete ━━━${NC}" + echo -e "${DIM}Restart Windsurf to complete uninstallation.${NC}" + else + echo -e "${YELLOW}Nothing to uninstall.${NC}" + fi + exit 0 +} + +# Run uninstall if requested +if [[ "$UNINSTALL" == true ]]; then + uninstall +fi echo -e "${BOLD}━━━ Windsurf Cascade CLI Installer ━━━${NC}" echo ""