feat: claude-memory-sync — back up Claude Code auto-memory to its own private repo
Auto-memory (~/.claude/projects/*/memory, 774 files across 49 projects) goes to
gitea vh/claude-memory, not this repo. The git dir is ~/claude-memory.git and its
work tree is ~/.claude/projects, and exclude rules admit only memory/ folders, so
transcripts stay local and nothing is added inside ~/.claude.
- home_root/.local/bin/claude-memory-sync: commit, rebase onto origin, push, under
a flock; --status; --init for a fresh machine. Every run records its result
for the drift check.
- home_config/systemd/user/claude-memory-sync.{service,timer}: hourly with
Persistent=true. Linked but not yet enabled.
- link-dotfiles --check now also reports uncommitted changes (a stale session
can write old content back through an intact link) and a failed or stale
(>3h) memory sync.
- CLAUDE.md and README document the backup and the never-put-credentials-in-memory rule.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Back up Claude Code auto-memory to gitea vh/claude-memory
|
||||
Documentation=file://%h/.local/bin/claude-memory-sync
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/claude-memory-sync
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Hourly Claude Code auto-memory backup
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
RandomizedDelaySec=5min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user