Metadata-Version: 2.5
Name: claude-code-sync
Version: 0.1.2
Summary: Back up and restore your Claude Code configuration (skills, plugins, hooks, settings)
Project-URL: Repository, https://github.com/shawonashraf/claude-code-sync
Project-URL: Documentation, https://shawonashraf.github.io/claude-code-sync/
Author: Shawon Ashraf
License-Expression: MIT
License-File: LICENSE
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.13
Requires-Dist: questionary>=2
Requires-Dist: rich>=13
Description-Content-Type: text/markdown

# claude-code-sync

Back up and restore your Claude Code configuration — skills, hooks, agents,
keybindings, global CLAUDE.md, a redacted settings.json, and a plugin
manifest. Never your history, sessions, or projects.

Docs: https://shawonashraf.github.io/claude-code-sync/

## Quick start

Set up backups on the machine you already use:

```bash
uvx claude-code-sync init
```

Reproduce your setup on a new machine (one command):

```bash
uvx claude-code-sync restore https://github.com/you/claude-backup.git
```

The installed command is `claude-sync` (with `claude-code-sync` as an alias
— the PyPI name).

Or, you can use claude itself:

```bash
Clone the repo from https://github.com/shawonashraf/claude-code-sync which contains a sync tool for claude code and set it up on my computer. Ask questions about any choices you may have to make, such as directories, symlinks etc.
```


## Commands

| Command | What it does |
|---|---|
| `claude-sync init [dest]` | Interactive setup: choose destination, git mode, auto-backup hook |
| `claude-sync backup` | One sync pass (no-op when nothing changed; commits in git mode) |
| `claude-sync restore [src]` | Restore from a directory or git URL; reinstalls plugins |
| `claude-sync status` | Destination, last backup, drift, pending conflicts |
| `claude-sync resolve` | Choose a version when two machines diverged |
| `claude-sync config [--auto-push\|--no-auto-push]` | Show settings; toggle pushing after each backup |
| `claude-sync hook install\|uninstall` | Manage the SessionEnd auto-backup hook |

## What about secrets?

Env vars in `settings.json` whose names look sensitive (`*KEY*`, `*TOKEN*`,
`*SECRET*`, `*PASSWORD*`, `*CREDENTIAL*`) or whose values look like
credentials are emptied (`""` — never a placeholder string, which Claude
Code would treat as a real credential) before anything leaves your machine.
`claude-sync status` lists what you need to re-supply after a restore.

## Multi-machine use

Backups from several machines to one git repo can diverge. claude-sync never
merges on its own: it detects divergence, skips the automatic backup, and
`claude-sync resolve` lets you pick which version to keep. The losing
version stays in git history.

When the backup repo has a remote, `init` and `restore` turn on auto-push
so every backup commit is pushed right away. Change it any time with
`claude-sync config --auto-push` or `--no-auto-push`.
