Skip to content
Development
Command

/sync

Sync memory between your local machine and GitHub backup — both directions.

From plugin
13219 skills19 commands9 hooks
shell
$ npx -y skills add HelloRuru/claude-memory-engine --agent claude-code

Ships with claude-memory-engine. Installing the plugin gets this command.

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/sync

Context preview

What this command does when you run it.

Sync memory between your local machine and GitHub backup — both directions.

Command definition

sync.md

/sync -- Bidirectional Memory Sync

Sync memory between your local machine and GitHub backup — both directions.

Usage

# Bidirectional: pull latest from GitHub, then push local changes
bash ~/.claude/scripts/hooks/memory-backup.sh sync

# Push only (same as /backup)
bash ~/.claude/scripts/hooks/memory-backup.sh push

# Pull only (same as /recover)
bash ~/.claude/scripts/hooks/memory-backup.sh pull

What sync does

1. **Pull** — `git pull` from GitHub, then distribute `repo/memory/*.md` into every local `projects/*/memory/` directory (newer file wins) 2. **Push** — scan all local `projects/*/memory/` directories, copy to the backup repo, commit, and push

When to use

  • Switching between devices (laptop vs desktop) — run `/sync` to get the other device's latest memory
  • After a long offline session — push your changes and pull anything new
  • If you're unsure whether you have the latest — `/sync` is always safe

Notes

  • The pull step only overwrites files when the GitHub version is newer than the local version
  • The SessionEnd hook auto-commits locally after every conversation
  • This command handles the **push + pull** to remote (GitHub)
  • `/backup` = push only; `/recover` = pull only; `/sync` = both
Read it on GitHub ↗
Ships withclaude-memory-engine

Claude Code 的記憶系統 | A memory system built with hooks + markdown. Zero dependencies.

Get the whole plugin, auto-invoked
Stats
132
Stars
0
Views
27
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
2mo ago
Last commit
4mo ago
Created

Repo: HelloRuru/claude-memory-engine