Cc Sync banner
ikook-wang ikook-wang

Cc Sync

Development community

Description

Seamlessly sync Claude Code config & sessions across machines | 跨机器无缝同步 Claude Code 配置和会话

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

cc-sync

Seamlessly sync your Claude Code configuration and sessions across machines.
简体中文 · English

Switch computers, run `claude --resume`, and pick up right where you left off.

What It Does

Start claude  →  auto pull latest config & sessions
    ↓
  Working...
    ↓
Exit claude   →  auto commit & push
    ↓
Other machine →  start claude → auto pull → claude --resume

**What gets synced:**

  • settings.json — Claude Code settings, hooks, plugin toggles
  • commands/ — Custom slash commands
  • skills/ — Custom skills
  • plugins/ — Installed plugins
  • projects/*/memory/ — Cross-session memory
  • Recent N sessions (for claude --resume)

**What stays local:**

  • .credentials.json — Credentials (security)
  • debug/, cache/, telemetry/, etc. — Local caches
  • Old session files — Only recent ones are synced to keep repo size manageable

Installation

Prerequisites

  • Claude Code installed and used at least once
  • Git
  • A GitHub repository (recommend private) for storing config

One-Line Install

curl -fsSL https://raw.githubusercontent.com/ikook-wang/cc-sync/main/install.sh | bash

The installer will interactively guide you through:

  1. Enter your GitHub repo URL
  2. Set number of sessions to keep (default: 3)
  3. Auto-configure .gitignore, hooks, and shell wrapper
  4. Run initial sync

Run this once on each machine.

On Another Machine

# 1. Install cc-sync (use the same GitHub repo URL)
curl -fsSL https://raw.githubusercontent.com/ikook-wang/cc-sync/main/install.sh | bash

# 2. Resume your previous session
claude --resume

How It Works

cc-sync uses three mechanisms for automatic syncing:

When Mechanism Action
Start Claude Code SessionStart hook git pull to get latest
Exit Claude Code S