{
  "markdown": "# cync\n\nBackup and sync your Claude Code settings to the cloud via Git.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n## Overview\n\n`cync` is a Claude Code plugin that versions your `~/.claude/` directory in a private Git repository. Push from one machine, pull on another — keeping your settings, skills, commands, and memory in sync across all your devices.\n\n## Features\n\n- **Git-based backup & restore** — Version-control your `~/.claude/` settings. Push from one device and pull on another.\n- **Module-based sync** — Choose only what you need: `core`, `skills`, `commands`, `memory`, `plugins`, `plans`, or a full backup.\n- **Sensitive data scanning** — Automatically scans files for API keys, tokens, and secrets before every push. Shows a masked preview with a warning if anything is detected.\n- **AES-256-GCM encryption (optional)** — Set `CC_SYNC_KEY` in your environment to encrypt synced files at rest.\n- **Dry-run mode** — Preview push/pull results without making any changes.\n- **Conflict resolution** — When pulling, decide file-by-file whether to overwrite with remote or keep local.\n\n## Prerequisites\n\n- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed\n- Git\n- Node.js 18+\n\n## Installation\n\n### Quick install (one-liner)\n\n프로젝트 루트에서 실행:\n\n```bash\nclaude plugin marketplace add ./ && claude plugin install cync\n```\n\n### Step-by-step\n\n```bash\n# 1. 로컬 마켓플레이스 등록\nclaude plugin marketplace add ./\n\n# 2. 플러그인 설치\nclaude plugin install cync\n```\n\n### 다른 머신에서 설치 (git clone)\n\n```bash\ngit clone https://github.com/dev-gyus/cync.git\ncd cync\nclaude plugin marketplace add ./ && claude plugin install cync\n```\n\n## Quick Start\n\n**1. Create a private repository** on GitHub (or any Git host), then initialize sync:\n\n```\n/sync-init git@github.com:you/claude-settings.git\n```\n\n**2. Push your settings:**\n\n```\n/sync-push\n```\n\n**3. Pull on another machine:**\n\n```\n/sync-pull\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `/sync-init <remote-url>` | Connect to a Git repository and initialize sync |\n| `/sync-push [options]` | Push local settings to remote |\n| `/sync-pull [options]` | Pull remote settings to local |\n| `/sync-status` | Show sync status and per-module change counts |\n| `/sync-help` | Display help and usage examples |\n\n### `/sync-init <remote-url>`\n\n```\n/sync-init git@github.com:you/claude-settings.git\n/sync-init --module core,skills,commands,memory https://github.com/you/claude-settings.git\n```\n\nClones (or initializes) a sync repository at `~/.claude/.cc-sync-repo/` and creates a config file.\n\n### `/sync-push [options]`\n\n| Option | Description |\n|--------|-------------|\n| `--module <names>` | Modules to push (comma-separated; default: all enabled) |\n| `--message <msg>` | Custom commit message |\n| `--dry-run` | Preview changes without pushing |\n| `--force` | Force push |\n\n### `/sync-pull [options]`\n\n| Option | Description |\n|--------|-------------|\n| `--module <names>` | Modules to pull (comma-separated) |\n| `--dry-run` | Preview changes without applying |\n| `--backup` | Create a timestamped backup of current settings before pulling |\n| `--keep-local` | Keep all local files on conflict |\n\n#### Conflict resolution\n\nWhen local and remote files differ, each conflict is resolved interactively:\n\n| Status | Meaning | Action |\n|--------|---------|--------|\n| `new` | Remote-only file | Copied automatically |\n| `identical` | Both sides match | Skipped |\n| `conflict` | Both sides differ | You choose: overwrite or keep local |\n| `local-only` | Local-only file | Left untouched |\n\n### `/sync-status`\n\nDisplays remote URL, branch, machine ID, last sync time, and per-module changed file counts.\n\n## Configuration\n\nSettings are stored in `~/.claude/.cc-sync.yml`. Auto-created by `/sync-init`; you can also edit it directly.\n\n```yaml\n# Git remote URL\nremote: \"git@github.com:you/claude-settings.git\"\n\n# Sync branch\nbranch: \"main\"\n\n# Modules to sync\nmodules:\n  core: true        # CLAUDE.md, framework docs, settings.json\n  skills: true      # ~/.claude/skills/\n  commands: true    # ~/.claude/commands/\n  memory: false     # Per-project memory files\n  plugins: false    # Plugin install manifest\n  plans: false      # Plan files\n  full: false       # Full backup (exclusion patterns applied)\n\n# Sensitive data handling\nsensitive:\n  encrypt: false    # AES-256-GCM encryption (requires CC_SYNC_KEY)\n  exclude:          # Patterns excluded from sync\n    - \"*.jsonl\"\n    - \"debug/\"\n    - \"telemetry/\"\n    - \"shell-snapshots/\"\n    - \"file-history/\"\n    - \"*.lock\"\n    - \"*.highwatermark\"\n    - \"paste-cache/\"\n    - \"sessions/\"\n    - \"statsig/\"\n    - \"chrome/\"\n    - \"ide/\"\n    - \"cache/\"\n    - \"todos/\"\n    - \"backups/\"\n\n# Machine identifier included in commit messages\nmachine_id: \"\"\n```\n\n## Modules\n\n| Module | What it syncs | Default |\n|--------|---------------|---------|\n| `core` | `CLAUDE.md`, framework docs (`COMMANDS.md`, `FLAGS.md`, …), `settings.json` | Enabled |\n| `skills` | `~/.claude/skills/` (recursive) | Enabled |\n| `commands` | `~/.claude/commands/` (recursive) | Enabled |\n| `memory` | `~/.claude/projects/*/memory/` per-project memory files | Disabled |\n| `plugins` | Plugin install manifest (`installed_plugins.json`) | Disabled |\n| `plans` | `~/.claude/plans/` plan markdown files | Disabled |\n| `full` | All of `~/.claude/` with exclusion patterns applied | Disabled |\n\n### Selecting modules\n\n**At init time:**\n```\n/sync-init git@github.com:you/repo.git --module core,skills,commands,memory\n```\n\n**Per-command override:**\n```\n/sync-push --module core,skills\n/sync-pull --module core,skills,memory\n```\n\n**Editing the config file directly:**\n\nModify the `modules` section in `~/.claude/.cc-sync.yml`.\n\n## Security\n\n### Sensitive data scanning\n\nBefore committing, `/sync-push` scans every file for:\n\n- API keys, tokens, passwords, secrets\n- PEM-format private keys\n- Service-specific patterns (OpenAI `sk-*`, GitHub `ghp_*`, AWS access keys, etc.)\n\nDetected secrets are shown with a masked preview as a warning. The file is still pushed — giving you the chance to review and decide.\n\n### Recommendations\n\n- **Use a private repository.** Claude Code settings can contain personal instructions, project context, and API references.\n- **Enable encryption.** Set `sensitive.encrypt: true` in `.cc-sync.yml` and export `CC_SYNC_KEY`:\n\n```bash\n# Generate a key\nnode -e \"console.log(require('crypto').randomBytes(32).toString('hex'))\"\n\n# Add to your shell profile\nexport CC_SYNC_KEY=\"your-64-char-hex-key\"\n```\n\n### Default exclusion patterns\n\nThe `full` module automatically excludes noise and temporary paths: `sessions/`, `cache/`, `telemetry/`, `debug/`, `todos/`, `backups/`, `*.jsonl`, `*.lock`, `.cc-sync-repo/`, and more.\n\n## Examples\n\n```bash\n# Push specific modules with a custom message\n/sync-push --module core,skills --message \"Update framework docs\"\n\n# Preview changes before pushing\n/sync-push --dry-run\n\n# Pull only core, creating a backup first\n/sync-pull --backup --module core\n\n# Keep all local files when conflicts arise\n/sync-pull --keep-local\n```\n\n## Development\n\n```bash\n# Clone\ngit clone https://github.com/dev-gyus/cync.git\ncd cync\n\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run tests\nnpm test\n\n# Watch mode\nnpm run test:watch\n```\n\n## Project Structure\n\n```\ncync/\n├── .claude-plugin/\n│   ├── plugin.json        # Plugin manifest\n│   └── marketplace.json   # Marketplace metadata\n├── commands/              # Slash command definitions (Markdown)\n│   ├── sync-init.md\n│   ├── sync-push.md\n│   ├── sync-pull.md\n│   ├── sync-status.md\n│   └── sync-help.md\n├── scripts/               # Command execution shell scripts\n├── src/\n│   ├── cli.ts             # CLI entry point (Commander.js)\n│   ├── config.ts          # .cc-sync.yml loader/saver\n│   ├── sync-engine.ts     # Core sync logic (init, push, pull, status)\n│   ├── modules/           # Sync module implementations\n│   │   ├── base-module.ts # SyncModule interface and file-copy helpers\n│   │   ├── core-settings.ts\n│   │   ├── skills.ts\n│   │   ├── commands.ts\n│   │   ├── memory.ts\n│   │   ├── plugins.ts\n│   │   ├── plans.ts\n│   │   ├── full-backup.ts\n│   │   └── index.ts       # Module registry\n│   └── utils/\n│       ├── git.ts              # Git command wrappers\n│       ├── sensitive-scanner.ts # Secret detection\n│       ├── crypto.ts           # AES-256-GCM encrypt/decrypt\n│       ├── file-mapper.ts      # File mapping utilities\n│       └── logger.ts           # Console output helpers\n├── tests/\n│   ├── unit/              # Unit tests\n│   ├── integration/       # Integration tests\n│   └── fixtures/          # Test fixtures\n├── package.json\n├── tsconfig.json\n└── vitest.config.ts\n```\n\n## Roadmap\n\n- [ ] Auto-sync daemon — a companion `sync-watch` command using `chokidar` to watch `~/.claude/` and push on change; installable as a launchd (macOS) or systemd (Linux) service\n- [ ] Three-way merge — use `git merge-file` or the `diff3` package to auto-merge non-conflicting lines in text files, falling back to interactive prompt only for true conflicts\n- [ ] Per-module encryption — configure `encrypt: true` per module rather than globally (the `crypto.ts` infrastructure already exists)\n- [ ] Diff viewer integration — show colored diffs before push/pull via `git diff`, or open files side-by-side in VS Code with `code --diff`\n- [ ] Multi-device branches — push/pull from a machine-specific branch (e.g. `sync/macbook-pro`) and merge into `main` when ready\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 9510,
  "sha": "62041dcfd8e4b95c11b1a82b324817f075a53cd7364b264180656eac7b47a4dd",
  "repo_slug": "dev-gyus/claude-code-sync",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_dev_gyus_claude_code_sync_cync_5fd220b3/readme"
}