Sync global ~/.claude/ config to sandbox (settings, memory, CLAUDE.md)

This commit is contained in:
Harivansh Rathi 2026-03-09 23:26:11 -07:00
parent ec7919c4ba
commit 531d5bfc16
2 changed files with 22 additions and 4 deletions

View file

@ -86,14 +86,22 @@ rsync -avz --progress \
-e "$RSYNC_SSH" \
"$LOCAL_DIR/" "node@$HANDLE:$REMOTE_WORKSPACE/"
# --- Sync Claude session ---
# --- Sync project-level Claude session ---
if [ -d "$LOCAL_DIR/.claude" ]; then
echo "[offload] Syncing Claude session data..."
echo "[offload] Syncing project Claude session data..."
rsync -avz --progress \
-e "$RSYNC_SSH" \
"$LOCAL_DIR/.claude/" "node@$HANDLE:$REMOTE_WORKSPACE/.claude/"
fi
# --- Sync global ~/.claude config (settings, memory, global session history) ---
if [ -d "$HOME/.claude" ]; then
echo "[offload] Syncing global ~/.claude config..."
rsync -avz --progress \
-e "$RSYNC_SSH" \
"$HOME/.claude/" "node@$HANDLE:/home/node/.claude/"
fi
# --- Transfer env vars ---
echo "[offload] Transferring environment variables..."
env | grep -v '^_=' | grep -v '^SHELL=' | grep -v '^TERM_' | grep -v '^SSH_' | \