Manage launchd agent for dotfiles auto-sync - check status, start/stop services, view logs. Handles macOS launchd automation for GitHub dotfiles synchronization.
Manage dotfiles auto-sync launchd agent on macOS. This skill helps you monitor, control, and troubleshoot the automated hourly sync of dotfiles to GitHub.
The auto-sync system uses a launchd agent to automatically commit and push dotfiles changes to GitHub every hour.
**Key Components:**
When the user requests launchd agent management (keywords: launchd, auto-sync, 自動同期, sync agent), follow these steps:
First, verify if the agent is running:
```bash
launchctl list | grep dotfiles
```
If the agent is loaded, you'll see output with PID and status code.
Check the last 20 log entries to see recent sync activity:
```bash
tail -20 ~/Library/Logs/dotfiles-sync.log
```
**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
```
**Trigger manual sync:**
```bash
/Users/snkrheadz/ghq/github.com/snkrheadz/laptop/scripts/auto-sync.sh
```
When investigating issues:
1. Check agent status: `launchctl list | grep dotfiles`
2. Read full log: `cat ~/Library/Logs/dotfiles-sync.log | tail -50`
3. Verify plist syntax: `plutil -lint ~/Library/LaunchAgents/com.user.dotfiles-sync.plist`
4. Test script manually: `/Users/snkrheadz/ghq/github.com/snkrheadz/laptop/scripts/auto-sync.sh`
5. Inspect plist config: `cat ~/Library/LaunchAgents/com.user.dotfiles-sync.plist`
The script performs these steps:
1. Navigate to dotfiles directory
2. Update Brewfile: `brew bundle dump --force`
3. Stage all changes: `git add -A`
4. Commit only if changes exist
5. Push to remote repository
**Note:** If no network connection, push fails silently and retries on next run.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/launchd-manage-pnot3v/raw