From 9e678b2dfaab05d164477ab147e382cfd1e7cd03 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Tue, 3 Feb 2026 20:39:04 +0000 Subject: [PATCH] Update sync-dotfiles-remote.sh to include marketplaces - Archives marketplaces separately (bypasses chezmoi naming conflict) - Copies both dotfiles and marketplaces to remote - Extracts to correct locations - No need for internet access on remote to add marketplaces --- dot_local/bin/executable_sync-dotfiles-remote.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dot_local/bin/executable_sync-dotfiles-remote.sh b/dot_local/bin/executable_sync-dotfiles-remote.sh index 256c7b6..a6ecd4c 100644 --- a/dot_local/bin/executable_sync-dotfiles-remote.sh +++ b/dot_local/bin/executable_sync-dotfiles-remote.sh @@ -9,10 +9,16 @@ REMOTE="${1:?Usage: $0 user@host}" echo "Creating dotfiles archive..." chezmoi archive --output=/tmp/dotfiles.tar.gz +echo "Creating Claude marketplaces archive..." +tar -czf /tmp/claude-marketplaces.tar.gz -C ~/.claude/plugins marketplaces + echo "Copying to $REMOTE..." -scp /tmp/dotfiles.tar.gz "$REMOTE":/tmp/ +scp /tmp/dotfiles.tar.gz /tmp/claude-marketplaces.tar.gz "$REMOTE":/tmp/ -echo "Extracting and setting up Claude plugins..." -ssh "$REMOTE" 'cd ~ && tar -xzf /tmp/dotfiles.tar.gz && rm /tmp/dotfiles.tar.gz && if command -v claude &>/dev/null; then claude /add-marketplace anthropics/claude-plugins-official 2>/dev/null || true; claude /add-marketplace anthropics/skills 2>/dev/null || true; claude /add-marketplace obra/superpowers-marketplace 2>/dev/null || true; claude /install-plugin code-simplifier@claude-plugins-official 2>/dev/null || true; claude /install-plugin ralph-loop@claude-plugins-official 2>/dev/null || true; claude /install-plugin superpowers@claude-plugins-official 2>/dev/null || true; echo "Claude plugins installed"; else echo "Claude CLI not found, skipping plugins"; fi' +echo "Extracting dotfiles..." +ssh "$REMOTE" 'cd ~ && tar -xzf /tmp/dotfiles.tar.gz && rm /tmp/dotfiles.tar.gz' -echo "Done!" +echo "Extracting Claude marketplaces..." +ssh "$REMOTE" 'mkdir -p ~/.claude/plugins && tar -xzf /tmp/claude-marketplaces.tar.gz -C ~/.claude/plugins && rm /tmp/claude-marketplaces.tar.gz' + +echo "Done! Dotfiles and Claude marketplaces synced to $REMOTE"