Manage macOS launchd agent for dotfiles auto-sync to GitHub (status check, start/stop, logs). Triggers on launchd, auto-sync, sync, sync agent keywords.
Manage the macOS launchd background agent that automatically syncs dotfiles to GitHub every hour.
This skill helps you manage a launchd agent that automatically commits and pushes dotfiles changes to GitHub. You can check status, view logs, start/stop the agent, troubleshoot issues, and manually trigger syncs.
When the user asks about auto-sync status, run:
```bash
launchctl list | grep dotfiles
```
If the agent is running, you'll see output like `12345 0 com.user.dotfiles-sync` (PID and label).
To see what the agent has been doing:
```bash
tail -20 ~/Library/Logs/dotfiles-sync.log
```
Look for commit messages, push results, or error messages.
View the plist configuration:
```bash
cat ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
View the sync script:
```bash
cat /Users/snkrheadz/ghq/github.com/snkrheadz/laptop/scripts/auto-sync.sh
```
**Stop the agent:**
```bash
launchctl unload ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
**Start the agent:**
```bash
launchctl load ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
**Restart the agent:**
```bash
launchctl unload ~/Library/LaunchAgents/com.user.dotfiles-sync.plist && \
launchctl load ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
If the user wants to trigger a sync immediately:
```bash
/Users/snkrheadz/ghq/github.com/snkrheadz/laptop/scripts/auto-sync.sh
```
This runs the same script that launchd executes.
If the agent isn't loading or behaving correctly:
```bash
plutil -lint ~/Library/LaunchAgents/com.user.dotfiles-sync.plist
```
This checks for XML syntax errors.
1. Changes directory to dotfiles repo
2. Runs `brew bundle dump --force` to update Brewfile
3. Stages all changes with `git add -A`
4. Commits only if there are changes
5. Pushes to remote GitHub repository
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/launchd-auto-sync-manager-9s5cz6/raw