A macOS menu bar app that watches user-specified folders for changes and automatically triggers Time Machine backups.
- Name: FolderTime Machine
- Type: macOS menu bar utility (no dock icon, no main window)
- Framework: SwiftUI
- Minimum Target: macOS Tahoe (macOS 26). Support older versions where feasible.
- Distribution: Non-sandboxed, direct distribution (DMG). Required because
tmutilneeds system-level access. - Launch at Login: Yes, supported via
SMAppService(orLaunchAtLoginfor older macOS).
The app watches user-specified folders for file changes. When changes are detected, it waits for a configurable quiet period (default: 45 seconds of no further changes), then triggers a full Time Machine backup via tmutil startbackup.
- File watching: Use
FSEventsAPI to monitor watched folders recursively (all subdirectories). - Debounce: After detecting a change, reset a timer. Only trigger backup after the quiet period elapses with no new changes. Default: 45 seconds. User-configurable.
- Backup trigger: Run
tmutil startbackupviaProcess(Foundation). This triggers a full Time Machine backup (not per-folder — that's how Time Machine works). - Persistence: Store watched folder list and settings in
UserDefaultsor a plist. Must survive app restarts.
Catching file changes made by Claude Code (or any tool that writes multiple files in bursts) and ensuring they get backed up automatically.
- Custom icon: a time-machine-inspired icon (clock/gear/shield aesthetic)
- Clicking the icon opens a dropdown menu
From top to bottom:
-
Watched Folders Section
- List of currently watched folders (show folder path)
- "+" button to add a new folder (opens folder picker / NSOpenPanel)
- "-" button next to each folder to remove it
- Users can add as many folders as they need
-
Recent Triggers Section
- Header: "Recent Backups" or similar
- Show the last 10 triggered backups
- Each entry: timestamp + which folder triggered it
-
Settings
- Debounce interval (configurable, default 45 seconds)
- Launch at login toggle
- Any other configurable settings should be exposed here
-
Quit
- Keep it simple. This is a focused utility, not a complex app.
- No notifications unless added later.
- No folder status indicators.
- Everything that can be configurable should be configurable.
- Use modern Swift concurrency (async/await) where appropriate.
- Use SwiftUI for all UI.
- Xcode project (not SPM-only)
- Single-target macOS app
- No third-party dependencies unless absolutely necessary
- Zip the current project and name it the current version (e.g.,
FolderTimeMachine-v1.0.zip) before starting work. - Ask if the user wants to submit to GitHub or not.
- Then begin the work following the steps below.
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately — don't keep pushing
- Use plan mode for verification steps, not just building
- Write detailed specs upfront to reduce ambiguity
- Use subagents liberally to keep main context window clean
- Offload research, exploration, and parallel analysis to subagents
- For complex problems, throw more compute at it via subagents
- One task per subagent for focused execution
- After ANY correction from the user: update
tasks/lessons.mdwith the pattern - Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project
- Never mark a task complete without proving it works
- Diff behavior between main and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes — don't over-engineer
- Challenge your own work
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests — then resolve them
- Zero context switching required from the user
- Go fix failing CI tests without being told how
- Plan First: Write plan to
tasks/todo.mdwith checkable items - Verify Plan: Check in before starting implementation
- Track Progress: Mark items complete as you go
- Explain Changes: High-level summary at each step
- Document Results: Add review section to
tasks/todo.md - Capture Lessons: Update
tasks/lessons.mdafter corrections
- Simplicity First: Make every change as simple as possible. Impact minimal code.
- No Laziness: Find root causes. No temporary fixes. Senior developer standards.
- App Store distribution
- Sandboxing
- Per-folder backup (not supported by Time Machine)
- Notifications
- Scheduling / interval-based backups
- Exclude patterns for watched folders