Skip to content

feat: add uninstall.sh to reverse setup.sh#23

Open
tripathiprateek wants to merge 1 commit intonicedreamzapp:mainfrom
tripathiprateek:add-uninstall-script
Open

feat: add uninstall.sh to reverse setup.sh#23
tripathiprateek wants to merge 1 commit intonicedreamzapp:mainfrom
tripathiprateek:add-uninstall-script

Conversation

@tripathiprateek
Copy link
Copy Markdown

Summary

  • Adds uninstall.sh that cleanly reverses everything setup.sh creates
  • Removes MLX venv, server dir, desktop launcher, phone/iMessage scripts
  • Optionally deletes downloaded models (--keep-models flag to preserve them)
  • Leaves shared system tools untouched (Homebrew, Python, Claude CLI)
  • Kills running MLX server on :4000 if active

Usage

bash uninstall.sh              # full cleanup including models
bash uninstall.sh --keep-models # keep downloaded model weights

Test plan

  • Run bash setup.sh on a fresh Mac, verify artifacts created
  • Run bash uninstall.sh --keep-models, verify everything removed except models
  • Run bash uninstall.sh on a setup with models, verify models deleted
  • Run bash uninstall.sh with no prior setup, verify graceful no-ops

Removes MLX venv, server dir, desktop launcher, phone scripts,
and optionally downloaded models. Leaves shared tools (Homebrew,
Python, Claude CLI) untouched.

Usage: bash uninstall.sh [--keep-models]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Owner

@nicedreamzapp nicedreamzapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR — the structure and --keep-models flag are both good calls. A few things before this can merge:

Blocker: phone scripts aren't necessarily this project's to delete

setup.sh copies the iMessage scripts into ~/.claude/ from scripts/ in this repo. But plenty of users already have those scripts in ~/.claude/ from other sources (they're part of a broader personal iMessage/remote-control system, not strictly tied to this project). Right now uninstall.sh will nuke them regardless — that's a foot-gun.

Options:

  • Cheapest: prompt before deleting (Delete iMessage scripts from ~/.claude/? [y/N]) with a default-no.
  • Better: only delete if the file in ~/.claude/<name> is byte-identical to scripts/<name> in this repo (i.e. setup.sh put it there). cmp -s works fine for this.

set -e should come off

For an uninstaller you want best-effort cleanup. If any rm trips (permission, race, whatever), set -e aborts the script and leaves the rest of the state half-removed. Drop it, or trap errors and keep going.

Model deletion should confirm by default

Deleting 18-75 GB silently is a lot. Suggest flipping the default: require --delete-models (or prompt interactively) and treat --keep-models as the default. At minimum, prompt unless -y.

Hardcoded model list will drift

If setup.sh adds or renames a model tier, the uninstaller silently skips it. Could glob (models--mlx-community--Qwen*, models--divinetribe--gemma*) or list dirs matching a known prefix set. Minor — but it'll bite within a release or two.

Missed: scripts/config.sh

setup.sh copies config.example.shscripts/config.sh inside the repo on first run. Worth removing that too (or noting it's preserved since it may have user edits).

Test plan

The checkboxes are empty — have you actually run both directions on a fresh Mac? That'd be the quickest way to surface whatever else I missed.

Happy to merge once the phone-scripts behavior is safe and set -e is out. The rest is polish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants