agent-sync

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 2 Imported by: 0

README

agent-sync

Sync Claude Code across your devices — and share living project notes with your teammates — using a private git repo you control and Claude Code's own lifecycle hooks. No cloud service, no API keys.

Install

# Homebrew
brew install oyesaurav/tap/agent-sync

# Install script (no sudo; installs to ~/.local/bin)
curl -fsSL https://raw.githubusercontent.com/oyesaurav/agent-sync/main/install.sh | sh

# Go toolchain
go install github.com/oyesaurav/agent-sync@latest

Quick start

# Personal device sync (use a PRIVATE remote — it holds your session history)
agent-sync init git@github.com:you/claude-sync.git   # main device
agent-sync pull git@github.com:you/claude-sync.git   # each new device

# Share a project's notes with a teammate (run inside the project)
agent-sync team init git@github.com:you/team-notes.git "Your Name"

Restart Claude Code after setup so the hooks load. Run agent-sync doctor to check things, and agent-sync --help for all commands.

Setting this up via an AI agent? Tell it: "run agent-sync guide and follow it." The guide is a complete setup runbook (also in AGENTS.md).

Documentation

agent-sync <command> --help for any command. Full docs, design notes, and limitations live in the wiki.

Acknowledgments

Prior art that informed this tool's feature set (all MIT): FelixIsaac/claude-code-sync, toroleapinc/claude-brain, tawanorg/claude-sync, renefichtmueller/claude-sync. agent-sync is an independent implementation with its own design.

License

MIT

Documentation

Overview

Command agent-sync syncs Claude Code state across a person's devices and shares living per-project notes between teammates, driven entirely by Claude Code's own lifecycle hooks. See README.md for details.

Directories

Path Synopsis
internal
cli
Package cli defines agent-sync's command-line interface.
Package cli defines agent-sync's command-line interface.
config
Package config reads and writes agent-sync's on-disk configuration: the personal-sync config under the user's XDG config dir, and the per-project team-notes config stored inside a project's .claude directory.
Package config reads and writes agent-sync's on-disk configuration: the personal-sync config under the user's XDG config dir, and the per-project team-notes config stored inside a project's .claude directory.
exclude
Package exclude is the single source of truth for what agent-sync keeps out of the personal-sync repo.
Package exclude is the single source of truth for what agent-sync keeps out of the personal-sync repo.
git
Package git is a thin wrapper around the system `git` binary.
Package git is a thin wrapper around the system `git` binary.
hooks
Package hooks manages Claude Code's settings.json hook wiring and the stdin/stdout contract of the hook commands agent-sync installs.
Package hooks manages Claude Code's settings.json hook wiring and the stdin/stdout contract of the hook commands agent-sync installs.
lock
Package lock serializes agent-sync's git operations across concurrently ending sessions, so two SessionEnd hooks firing at once cannot corrupt the same repo.
Package lock serializes agent-sync's git operations across concurrently ending sessions, so two SessionEnd hooks firing at once cannot corrupt the same repo.
paths
Package paths centralizes every filesystem location agent-sync touches: Claude Code's config/projects dirs, agent-sync's own XDG dirs, the canonical binary path used for stable hook wiring, and the Claude Code project-path encoding (plus the reliable way to recover the original path).
Package paths centralizes every filesystem location agent-sync touches: Claude Code's config/projects dirs, agent-sync's own XDG dirs, the canonical binary path used for stable hook wiring, and the Claude Code project-path encoding (plus the reliable way to recover the original path).
sync
Package sync implements agent-sync's two engines: personal device sync of ~/.claude, and team-notes sharing of per-project Auto Memory.
Package sync implements agent-sync's two engines: personal device sync of ~/.claude, and team-notes sharing of per-project Auto Memory.
wizard
Package wizard provides small interactive prompts for agent-sync's setup commands, so users can run `init` / `team init` without memorizing argument order.
Package wizard provides small interactive prompts for agent-sync's setup commands, so users can run `init` / `team init` without memorizing argument order.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL