feat: Add uninstall script and update docs

- Create a standalone `scripts/uninstall.sh` script to completely remove the executable, configuration, and workspace data.
- Update `make install` to copy the uninstaller script to the installation path (`picoclaw-uninstall`).
- Add an "Uninstallation" section to the `README.md` file.

Co-authored-by: TanLuong <28281768+TanLuong@users.noreply.github.com>
This commit is contained in:
google-labs-jules[bot] 2026-03-24 09:52:35 +00:00
parent 2c26acb902
commit 29690f8f6c
3 changed files with 51 additions and 0 deletions

View file

@ -196,6 +196,9 @@ install: build
@chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX) @chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX)
@mv -f $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX) $(INSTALL_BIN_DIR)/$(BINARY_NAME) @mv -f $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX) $(INSTALL_BIN_DIR)/$(BINARY_NAME)
@echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)" @echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)"
@cp scripts/uninstall.sh $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall
@chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall
@echo "Installed uninstaller script to $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall"
@echo "Installation complete!" @echo "Installation complete!"
## uninstall: Remove picoclaw from system ## uninstall: Remove picoclaw from system

View file

@ -346,6 +346,16 @@ picoclaw gateway
</details> </details>
### Uninstallation
To completely remove PicoClaw and all of its associated data (including configuration and workspace), you can use the uninstall script that was installed alongside the application:
```bash
picoclaw-uninstall
```
This will automatically remove the executable, your `~/.picoclaw` directory, and the uninstaller script itself.
## 🔌 Providers (LLM) ## 🔌 Providers (LLM)
PicoClaw supports 30+ LLM providers through the `model_list` configuration. Use the `protocol/model` format: PicoClaw supports 30+ LLM providers through the `model_list` configuration. Use the `protocol/model` format:

38
scripts/uninstall.sh Executable file
View file

@ -0,0 +1,38 @@
#!/usr/bin/env bash
# picoclaw-uninstall
# This script uninstalls PicoClaw and all of its associated data.
set -e
# Default installation paths (matching the Makefile)
INSTALL_PREFIX="${HOME}/.local"
INSTALL_BIN_DIR="${INSTALL_PREFIX}/bin"
BINARY_NAME="picoclaw"
PICOCLAW_HOME="${HOME}/.picoclaw"
echo "Uninstalling PicoClaw..."
# Remove the executable binary
if [ -f "${INSTALL_BIN_DIR}/${BINARY_NAME}" ]; then
rm -f "${INSTALL_BIN_DIR}/${BINARY_NAME}"
echo "Removed executable: ${INSTALL_BIN_DIR}/${BINARY_NAME}"
else
echo "Executable ${INSTALL_BIN_DIR}/${BINARY_NAME} not found. Skipping."
fi
# Remove the workspace and configurations
if [ -d "${PICOCLAW_HOME}" ]; then
rm -rf "${PICOCLAW_HOME}"
echo "Removed all workspace and configuration data: ${PICOCLAW_HOME}"
else
echo "Data directory ${PICOCLAW_HOME} not found. Skipping."
fi
# Remove the uninstaller script itself
SCRIPT_PATH="${INSTALL_BIN_DIR}/picoclaw-uninstall"
if [ -f "${SCRIPT_PATH}" ]; then
rm -f "${SCRIPT_PATH}"
echo "Removed uninstaller script: ${SCRIPT_PATH}"
fi
echo "PicoClaw uninstallation complete!"