Manage launchd auto-sync agent for dotfiles. Check status, start/stop service, view logs, and troubleshoot macOS launchd background jobs.
Manage and monitor the dotfiles auto-sync launchd agent on macOS. This skill provides complete control over a scheduled background job that automatically synchronizes dotfiles to GitHub every hour.
The auto-sync agent is a launchd background service that monitors and syncs dotfiles to GitHub on a regular schedule.
**Key Components:**
When the user asks about auto-sync, launchd, dotfiles synchronization, or background jobs, follow these steps:
First, check the current state of the launchd agent:
```bash
launchctl list | grep dotfiles
```
Then view the most recent log entries:
```bash
tail -20 ~/Library/Logs/dotfiles-sync.log
```
If the user needs more details, check the plist configuration:
```bash
cat ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
And verify the sync script:
```bash
cat /Users/snkrheadz/ghq/github.com/snkrheadz/laptop/scripts/auto-sync.sh
```
To disable auto-sync:
```bash
launchctl unload ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
To enable auto-sync:
```bash
launchctl load ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
To restart the service (stop then start):
```bash
launchctl unload ~/Library/LaunchAgents/com.user.dotfiles-sync.plist && \
launchctl load ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
To trigger an immediate sync outside the schedule:
```bash
/Users/snkrheadz/ghq/github.com/snkrheadz/laptop/scripts/auto-sync.sh
```
To check plist syntax:
```bash
plutil -lint ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
To see complete log history:
```bash
cat ~/Library/Logs/dotfiles-sync.log | tail -50
```
The sync script performs these steps:
1. Navigate to dotfiles directory
2. Run `brew bundle dump --force` to update Brewfile
3. Stage all changes with `git add -A`
4. Commit only if there are changes
5. Push to remote repository
When the user reports sync issues:
1. **Check agent status** with `launchctl list | grep dotfiles`
2. **Review recent logs** to identify the last execution result
3. **Run manual sync** to test script functionality
4. **Restart agent** if necessary
5. **Validate plist** for configuration errors
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/launchd-manage-5lm8i7/raw