Claude Code session

CC Sync Legacy

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

27 stars 2 forksSessions & history Source

Install

From source
git clone https://github.com/ikook-wang/cc-sync-legacy.git

From the 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

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

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

How It Works

cc-sync uses three mechanisms for automatic syncing:

Session File Strategy

.gitignore ignores all session .jsonl files by default. When sync.sh runs:

1. Finds the most recent N sessions per project
2. Force-adds them with git add -f
3. Removes older sessions from git index with git rm --cached (local files are never deleted)

This keeps full history locally while keeping the git repo size manageable.

Configuration

Edit ~/.claude/sync.conf:

Commands

Uninstall

This removes:
- sync.sh, sync.conf, uninstall.sh
- SessionStart hook from settings.json
- Shell wrapper from your rc file

Not removed: Your git repo and synced data.

FAQ

Q: What if my username/path differs across machines?

Claude Code…
Read the full README on GitHub

Details

Language
Shell
License
MIT
Last updated
23 February 2026

FAQ

What is CC Sync Legacy?

Seamlessly sync Claude Code config & sessions across machines | 跨机器无缝同步 Claude Code 配置和会话 It is a session for Claude Code, from ikook-wang/cc-sync-legacy on GitHub.

How do I install CC Sync Legacy?

Clone ikook-wang/cc-sync-legacy from GitHub and follow the setup steps in its README.

Is CC Sync Legacy popular?

ikook-wang/cc-sync-legacy has 27 GitHub stars and 2 forks. It was last updated on 23 February 2026.

More sessions & history

Browse the most popular Claude Code mods, all sessions & history, or the skills and MCP server directories.