feat: mosaic uninstall (IUH-M01) #429

Merged
jason.woltje merged 1 commits from feat/mosaic-uninstall into main 2026-04-05 17:06:22 +00:00
Owner

Summary

  • Adds top-level mosaic uninstall command with --framework, --cli, --gateway, --all, --keep-data, --yes, and --dry-run flags
  • Implements ~/.config/mosaic/.install-manifest.json (v1 schema, mode 0600) written on successful install for precise reversal; falls back to heuristic mode with warning when absent
  • Reverses runtime asset copies (restores .mosaic-bak-* backups or removes managed copies), npmrc scope line removal, and gateway delegation via existing runUninstall
  • Adds tools/install.sh --uninstall shell fallback for broken-CLI scenarios

Closes #425

Test plan

  • mosaic uninstall --dry-run lists all mutations without changing anything
  • mosaic uninstall --framework --keep-data removes framework dir but preserves SOUL.md, USER.md, TOOLS.md, memory/
  • mosaic uninstall --framework removes entire ~/.config/mosaic/
  • mosaic uninstall --cli runs npm uninstall -g @mosaicstack/mosaic
  • mosaic uninstall --all delegates gateway, reverses runtime assets, removes npmrc line, removes framework, uninstalls CLI
  • Runtime asset backup restore: if .mosaic-bak-* exists it is restored and backup removed
  • tools/install.sh --uninstall removes framework + CLI + npmrc without needing the CLI binary
  • All 170 tests pass (14 new); typecheck/lint/format:check clean

Generated with Claude Code

## Summary - Adds top-level `mosaic uninstall` command with `--framework`, `--cli`, `--gateway`, `--all`, `--keep-data`, `--yes`, and `--dry-run` flags - Implements `~/.config/mosaic/.install-manifest.json` (v1 schema, mode 0600) written on successful install for precise reversal; falls back to heuristic mode with warning when absent - Reverses runtime asset copies (restores `.mosaic-bak-*` backups or removes managed copies), npmrc scope line removal, and gateway delegation via existing `runUninstall` - Adds `tools/install.sh --uninstall` shell fallback for broken-CLI scenarios Closes #425 ## Test plan - `mosaic uninstall --dry-run` lists all mutations without changing anything - `mosaic uninstall --framework --keep-data` removes framework dir but preserves SOUL.md, USER.md, TOOLS.md, memory/ - `mosaic uninstall --framework` removes entire ~/.config/mosaic/ - `mosaic uninstall --cli` runs npm uninstall -g @mosaicstack/mosaic - `mosaic uninstall --all` delegates gateway, reverses runtime assets, removes npmrc line, removes framework, uninstalls CLI - Runtime asset backup restore: if `.mosaic-bak-*` exists it is restored and backup removed - `tools/install.sh --uninstall` removes framework + CLI + npmrc without needing the CLI binary - All 170 tests pass (14 new); typecheck/lint/format:check clean Generated with Claude Code
jason.woltje added 1 commit 2026-04-05 17:00:13 +00:00
feat: add mosaic uninstall command and install manifest (IUH-M01)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
c84f27b56d
Add top-level `mosaic uninstall` with --framework, --cli, --gateway, --all,
--keep-data, --yes, and --dry-run flags. Implements runtime asset reversal
(backup restore or managed-copy removal), npmrc scope line removal, and
gateway delegation. Adds install manifest (write on install, read on uninstall)
for precise reversal; falls back to heuristic mode when manifest is absent.
Shell fallback via `tools/install.sh --uninstall`. Closes #425.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit 25cada7735 into main 2026-04-05 17:06:22 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#429