1 Commits
Author SHA1 Message Date
james.maes 7dee5e0914 feat(scripts): add dev-reset.sh — wipe all Jarvis local state for clean first-run testing
Iterating on the onboarding wizard, TCC prompts, and hotkey binding
needs the next launch to be indistinguishable from a true first-run
install. Manually clearing 9 different state surfaces by hand is
error-prone — easy to forget the WebKit cache or a stale Anthropic
keychain entry, then debug a phantom 'why does it remember the API
key' for an hour.

scripts/dev-reset.sh wipes:
  1. Running Jarvis processes (pkill)
  2. ~/Library/Application Support/Jarvis/ (config, jarvis.db, replay.sqlite)
  3. ~/Library/Logs/Jarvis/                 (rotating bus/system/mcp logs)
  4. ~/Library/WebKit/<bundle-id>/          (WKWebView site data)
  5. ~/Library/Caches/<bundle-id>/          (WKWebView caches)
  6. ~/Library/Saved Application State/<bundle-id>.savedState/
  7. ~/Library/HTTPStorages/<bundle-id>{,*.binarycookies}
  8. ~/Library/Preferences/<bundle-id>.plist + UserDefaults
  9. Keychain: anthropic API key (security delete-generic-password)
 10. TCC: tccutil reset All <bundle-id> (microphone/camera/screen/etc.)

Defaults to dry-run; --yes / -y to apply. --quiet / -q for terse output.

Bundle id is auto-discovered from the live Info.plist (Debug build →
Release build → Xcode DerivedData), with the historical ids
com.koftwentytwo.jarvis and com.kingsrook.jarvis always included so
legacy state from older builds gets cleaned up too.

Verified: dry-run preview matches reality; --yes wipes everything;
post-reset verification shows ~/Library/Application Support/Jarvis,
WebKit caches, and the Anthropic Keychain entry all gone.
2026-05-02 07:27:50 -05:00