Skip to content

robertogogoni/claude-cross-machine-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

234 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Sync

Release [![Downloads](https://img.shields.io/github/downloads/robertogogoni/claude-cross-machine-sync/total?style=flat-square&color=a6e3a1&label=downloads)](https://github.com/robertogogoni/claude-cross-machine-sync/releases) CI License Releases

One repo. One bootstrap command. Every machine gets the same Claude Code brain.

Settings, skills, agents, commands, memory, MCP servers, hooks, and Desktop configs sync automatically across Linux, Windows, and macOS.


The Ecosystem

graph LR
    subgraph machines [" "]
        D["Dell G15<br/><sub>Windows 11</sub>"]
        M["MacBook Air<br/><sub>Arch + Hyprland</sub>"]
        S["Samsung Laptop<br/><sub>Arch + Hyprland</sub>"]
    end

    subgraph repo ["claude-cross-machine-sync"]
        U["universal/"]
        P["platform/"]
        MR["machines/"]
    end

    subgraph claude ["Claude Code"]
        CC["Settings<br/>+ Hooks"]
        SK["Skills<br/>+ Agents"]
        ME["Memory<br/><sub>3-layer merge</sub>"]
        MC["MCP<br/>Servers"]
    end

    D & M & S -- "git pull" --> U & P & MR
    U --> CC & SK & ME & MC
    P --> CC
    MR --> ME

    style U fill:#1a1b27,stroke:#70a5fd,color:#c0caf5
    style P fill:#1a1b27,stroke:#9ece6a,color:#c0caf5
    style MR fill:#1a1b27,stroke:#e0af68,color:#c0caf5
    style CC fill:#24283b,stroke:#7aa2f7,color:#c0caf5
    style SK fill:#24283b,stroke:#7aa2f7,color:#c0caf5
    style ME fill:#24283b,stroke:#7aa2f7,color:#c0caf5
    style MC fill:#24283b,stroke:#7aa2f7,color:#c0caf5
Loading

Quick Start

# Linux / macOS
git clone https://github.com/robertogogoni/claude-cross-machine-sync.git ~/machine-sync
cd ~/machine-sync && ./bootstrap.sh
# Windows
git clone https://github.com/robertogogoni/claude-cross-machine-sync.git $HOME\machine-sync
cd $HOME\machine-sync; .\bootstrap.ps1

That's it. Hardware is auto-detected, configs are deployed, sync daemon starts in the background.

What gets deployed
 0   Pre-flight validation
 1   Hardware auto-detection (vendor, model, CPU, GPU, RAM)
 2   Machine registered in registry.yaml
 3   Machine directory created
 4   Sync daemon installed
 5   Settings deployed (universal + machine-specific)
 5a  Skills .............. debugging, code-review, testing
 5b  Agents .............. code-reviewer, debugger, test-writer, planner
 5c  Commands ............ analyze, explain, refactor, security-scan, think-harder, eureka
 5d  Scripts ............. bash logger, audit tools, memory-sync, health check
 5e  Machine detection ... auto-detect hardware profile
 5f  Memory .............. 3-layer merge (universal > platform > machine)
 5g  MCP servers ......... memory-sync + registration
 5h  Platform scripts .... auto-updater + systemd timers (Linux)
 5i  Desktop config ...... template substitution + JSON validation
 6   Git commit + push

How It Works

Every config file is classified into one of three tiers:

Tier What goes here Example
universal/ Works on any machine Skills, agents, commands, memory
platform/ OS-specific systemd units, PowerShell scripts
machines/ Hardware-specific Display scale, GPU flags, CPU threads

Changes sync automatically via background daemons (inotifywait on Linux, FileSystemWatcher on Windows). Commits are auto-tagged [universal], [linux], [windows], or [machine:hostname].

Memory system

Three-layer architecture:

  1. CLI Memory files (source of truth) at ~/.claude/projects/<project>/memory/
  2. Cortex DB (vector-searchable) with FTS5 + HNSW embeddings
  3. Memory Profile (compiled bridge) served to Claude Desktop via MCP

When CLI session ends, memories auto-compile into a 337-line profile. Claude Desktop reads it via the get_user_profile MCP tool. The sync is one-directional: CLI writes, Desktop reads.

See memory architecture diagram for the full picture.

Safety features
Feature How it works
Snapshot & rollback Every bootstrap creates a restore point. --rollback to undo.
Dry-run mode --dry-run previews all steps without executing
Pre-flight checks Validates git, network, disk, permissions before running
Secret protection API keys use ${VARIABLE} placeholders, never committed
Health check claude-health validates 14 system indicators
Backup claude-backup with rsync and 7-day rotation
Offline queue Commits save locally when offline, push when connected
Conflict resolution Auto-resolve, stash & retry, or conflict branch

Machines

Machine Platform Status Configs
Samsung 270E5J Arch Linux + Hyprland Active 16
MacBook Air Arch Linux + Hyprland Active 11
Dell G15 Windows 11 Pending 1

Omarchy Sync Status

Machine Hypr Configs Input Monitors Envs Bindings Look & Feel
Samsung 270E5J 6/6 BR ABNT2 1366x768@1x DPI 80 Synced Synced
MacBook Air 5/5 US Intl Auto Default Synced Synced
Dell G15 N/A N/A N/A N/A N/A N/A

Post-Bootstrap Tools

claude-health          # 14 health checks with color output
claude-backup          # Backup everything not in git (rsync, 7-day rotation)
claude-memory-sync     # Manually sync CLI memories to Desktop
claude-desktop-update  # Auto-update Claude Desktop from AUR (runs daily via systemd)

Documentation

Navigate

Understand

Operate

Visualize

Learnings (20 knowledge documents)
Category Documents
System electron-wayland -- system-diagnostics -- claude-desktop-linux
Chrome performance-tuning -- extension-troubleshooting -- native-messaging
Claude & AI custom-instructions -- cli-intelligence -- skill-hooks -- ai-extraction
Sync & Memory cross-machine-sync -- machine-patterns -- memory-bridge -- permissions
Apps beeper -- beeper-fix -- vercel-widgets -- github-widgets
Other bash-patterns -- personal-communication
AI History Archive
Source Records
Claude Code episodic memory 1,402 sessions
Warp Terminal AI queries 1,708 queries
Warp Terminal agents 49 conversations
Antigravity / Gemini Brain 14 sessions

Directory Structure

claude-cross-machine-sync/
.
├── bootstrap.sh / .ps1              # One-command setup
├── CHANGELOG.md                     # 11 releases
│
├── universal/claude/                # Cross-platform configs
│   ├── skills/                      #   3 skills
│   ├── agents/                      #   4 agents
│   ├── commands/                    #   6 slash commands
│   ├── scripts/                     #   health check, audit, sync
│   ├── memory/                      #   8 universal memories
│   └── mcp-servers/                 #   memory-sync bridge
│
├── platform/                        # OS-specific
│   ├── linux/                       #   systemd, auto-updater
│   └── windows/                     #   PowerShell, Task Scheduler
│
├── machines/                        # Per-host configs
│   ├── registry.yaml
│   ├── samsung-laptop/              #   16 files
│   ├── macbook-air/                 #   11 files
│   └── dell-g15/                    #   1 file (pending)
│
├── learnings/                       # 20 knowledge docs
├── docs/
│   ├── diagrams/                    #   11 Mermaid sets (30+ charts)
│   ├── decisions/                   #   8 ADRs
│   ├── plans/                       #   12 design docs
│   └── system/                      #   inventory, backup
│
├── episodic-memory/                 # 1,402 session archives
├── warp-ai/                         # 1,708 AI queries
├── hookify-rules/                   # 5 skill enforcement rules
├── scripts/                         # health, backup
├── lib/                             # validator, rollback
└── tests/                           # 24 unit tests

CLI Reference

Flag Description
--dry-run Preview changes without executing
--rollback Undo last bootstrap
--skip-daemon Skip sync daemon install
--skip-preflight Skip validation checks
--machine-name NAME Override auto-detected name

Contributing

See CONTRIBUTING.md. Run tests with ./tests/run_all.sh. Lint with shellcheck -x lib/*.sh bootstrap.sh.


About

Cross-machine Claude Code sync: settings, memory, skills, episodic memory

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors