npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cc-config-sync

v1.1.0

Published

Sync Claude Code configurations across machines using a git-tracked repository

Downloads

267

Readme

Claude Code Config Sync

Test npm version License: MIT

A CLI tool to sync your Claude Code configuration files across multiple machines using a git-tracked repository.

How It Works

The tool uses a two-repo setup:

  1. Sync repo — a git repo where your configs are stored, organized by machine hostname
  2. This tool — the CLI that copies files between your local machine and the sync repo
sync-repo/
├── sync.config.json          # Machine & project registry
└── configs/
    └── MacBook-Pro/           # One folder per machine
        ├── global/
        │   ├── CLAUDE.md
        │   ├── settings.json
        │   ├── settings.local.json
        │   └── plugins/
        │       ├── installed_plugins.json
        │       └── known_marketplaces.json
        └── projects/
            ├── my-app/
            │   ├── CLAUDE.md
            │   ├── .claude/
            │   │   ├── settings.json
            │   │   └── settings.local.json
            │   └── memory/
            │       └── MEMORY.md
            └── another-project/
                └── ...

Installation

npm install -g cc-config-sync

Requires Node.js 18+.

Updating

To update to the latest version:

npm update -g cc-config-sync

Check your installed version:

cc-config-sync --version

Quick Start

# 1. Create a sync repo (or clone an existing one)
mkdir ~/claude-sync && cd ~/claude-sync && git init

# 2. Save the repo path so you never have to type --repo again
cc-config-sync config set-repo ~/claude-sync

# 3. Set up your machine (interactive)
cc-config-sync init

# 4. Pull your local configs into the sync repo
cc-config-sync pull

# 5. Check what's different
cc-config-sync status

Tip: cc-config-sync config set-repo <path> saves the repo path to ~/.cc-config-sync.json. After that, all commands just work in any terminal without additional flags. You can still override it per-command with --repo <path> or the CLAUDE_SYNC_REPO env var.

Commands

init

Interactive setup. Asks for your global config path (defaults to ~/.claude) and lets you add projects to track.

pull

Copies local config files into the sync repo. Safe — only writes to the sync repo, never touches your local files.

cc-config-sync pull                  # pull everything
cc-config-sync pull -p my-app        # pull one project
cc-config-sync pull --global-only    # pull global configs only
cc-config-sync pull --dry-run        # preview without copying
cc-config-sync pull --commit         # auto git commit after pull

push

Copies configs from the sync repo back to your local machine. Shows diffs before applying, asks for confirmation, and creates backups of any files it overwrites.

cc-config-sync push                  # push everything (interactive)
cc-config-sync push -y               # apply all without prompting
cc-config-sync push -p my-app        # push one project

status

Shows which files differ between your local machine and the sync repo.

cc-config-sync status                # summary only
cc-config-sync status -v             # include diffs
cc-config-sync status --all          # show missing-both entries

list

Lists all registered config paths and whether they exist locally.

add-project <name> <path>

Add a project to track.

cc-config-sync add-project my-app /path/to/my-app

remove-project <name>

Stop tracking a project.

cc-config-sync remove-project my-app

clean-backups

Find and delete backup files created by push.

config set-repo <path>

Save the sync repo path persistently so you don't have to pass --repo or set CLAUDE_SYNC_REPO every time.

cc-config-sync config set-repo ~/claude-sync

The path is stored in ~/.cc-config-sync.json. Resolution order (highest priority first):

  1. --repo <path> flag
  2. CLAUDE_SYNC_REPO env var
  3. ~/.cc-config-sync.json (saved with config set-repo)
  4. Error if none found

config show

Display the currently saved repo path and config file location.

cc-config-sync config show

Non-Interactive Mode

For use in CI/CD pipelines, scripts, and AI agents. Suppresses all interactive prompts.

# Via flag
cc-config-sync --non-interactive push
cc-config-sync --non-interactive init --machine-name my-machine --global-path ~/.claude

# Via CI environment variable (auto-detected)
CI=true cc-config-sync push

Behavior by command

| Command | Interactive (default) | Non-interactive | | ---------------- | ------------------------- | ----------------------------------------------------------------- | | push | Confirms each file change | Applies all changes | | init | Prompts for all values | Requires --machine-name; others use defaults or existing values | | remove-project | Asks to delete repo dir | Keeps repo dir (use --delete-repo-dir to delete) | | clean-backups | Confirms before deleting | Deletes without confirmation | | Others | No prompts | No change |

Init flags (non-interactive)

| Flag | Required | Default | | -------------------------- | -------- | -------------- | | --machine-name <name> | Yes | — | | --global-path <path> | No | ~/.claude | | --backup / --no-backup | No | --backup | | --project <name:path> | No | — (repeatable) |

Configuration

sync.config.json

The registry file in the sync repo:

{
  "machines": {
    "MacBook-Pro": {
      "globalConfigPath": "/Users/me/.claude",
      "projects": {
        "my-app": "/Users/me/projects/my-app",
        "api": "/Users/me/projects/api"
      }
    }
  }
}

What Gets Synced

Per machine, the tool tracks:

| Scope | Files | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | Global (~/.claude/) | CLAUDE.md, settings.json, settings.local.json, plugins/installed_plugins.json, plugins/known_marketplaces.json | | Per-project (project root) | CLAUDE.md, .claude/settings.json, .claude/settings.local.json | | Per-project (memory) | ~/.claude/projects/<project-id>/memory/MEMORY.md |

Typical Workflow

# On machine A — save your latest configs
cc-config-sync pull
cd ~/claude-sync && git add -A && git commit -m "update configs" && git push

# On machine B — get the latest configs
cd ~/claude-sync && git pull
cc-config-sync push

Development

git clone https://github.com/eligoss/cc-config-sync.git
cd cc-config-sync
npm install
npm test
npm run typecheck

See CONTRIBUTING.md for more details.

License

MIT