CLI tool to backup agent configuration files to a git repository.
uv sync# Create a backup plan interactively
backup-my-agent discover claude
# List saved plans
backup-my-agent plans
# Preview what would be backed up
backup-my-agent status claude
# Run backup (clones repo, copies files, commits, pushes)
backup-my-agent backup claude
# Restore files from backup to original locations
backup-my-agent restore claude- Run
discoverto scan your agent config directory and create a backup plan - The plan specifies which files to include/exclude and the destination git repo (SSH URL)
- Run
backupto clone the repo, copy your config files, commit, and push - Run
restoreto pull files from the backup repo back to their original locations
Plans are stored in ~/.backup-my-agent/plans/.
File copying uses rsync when available, which skips unchanged files based on checksum comparison. Falls back to regular file copying otherwise.
| Command | Description |
|---|---|
discover <agent> |
Create a backup plan interactively |
plans |
List saved plans |
status [plan] |
Preview files that would be backed up |
backup [plan] |
Run backup to git repo |
restore [plan] |
Restore files from backup |
delete <plan> |
Delete a saved plan |
claude- Backs up~/.claude/(CLAUDE.md, settings, skills, etc.)
uv sync --extra dev # install dev dependencies
uv run pytest # run tests
uv run ruff check . # lint
uv run ruff format . # format