Skip to main content

Seamlessly sync Claude Code sessions across multiple devices using Git remotes as stable fingerprints.

Project description

Clocator 🗺️

Python 3.8+ License: MIT Tests

Seamlessly sync and resume your local Claude Code sessions across multiple devices.

Clocator (Claude Locator) solves a major pain point in the Claude Code developer workflow: hardcoded absolute file paths.

Claude Code indexes your conversational history using rigid, local directories (e.g., /Users/dev/Projects/my-app). When you synchronize your development environment across different machines (like a work iMac and a personal MacBook), this mapping breaks because of differing directory structures.

Clocator acts as an intelligent abstraction layer. It decouples your Claude session history from volatile local folder paths and anchors them to a permanent digital fingerprint: your GitHub/Git Repository URL.

⚡ The Problem vs. The Clocator Solution

❌ WITHOUT CLOCATOR: Computer A (/Users/dev/project) ──[Syncs claude.json]──> Computer B (/home/ubuntu/code/project) │ ⚠️ Claude fails to find path! ⚠️ Starts blank session.

==========================================================================================

✅ WITH CLOCATOR: Computer A (/Users/dev/project) ──> Clocator Map (Git Remote URL) ──┐ │ (Synced via cloud) Computer B (/home/ubuntu/code/project) <── Dynamic Path Patching ──┘

By reading your local .git/config and translating paths on the fly at the last millisecond, Clocator tricks Claude Code into thinking you never switched devices.

🛠️ Installation & Setup

Clocator is designed to be lightweight, fast, and dependency-free.

Quick Start

pip install clocator

For detailed installation options and troubleshooting, see the Installation Guide.

What's Required

  • Python 3.8 or later
  • Git (already on your machine if you're a developer)
  • A cloud sync service (Dropbox, iCloud, OneDrive, Syncthing, etc.)

🚀 How It Works

Clocator operates in a simple, two-step lifecycle integrated into your multi-device workflow:

  1. On Computer A (Before you leave)

When you've finished coding on your first machine, run:

clocator push

Under the Hood: Clocator looks up the active workspace path in your native claude.json, reads your local git remote URL (e.g., git@github.com:username/repo.git), and maps that unique repository fingerprint to your current Claude Session ID in a lightweight, synced tracking file (clocator-map.json).

  1. On Computer B (When you arrive)

After your cloud syncing service (Dropbox, iCloud, OneDrive, etc.) copies your profile over to your second machine, open your project directory and run:

clocator pull

Under the Hood: Clocator checks your current directory's git remote, looks it up in the synced clocator-map.json to find the correct Session ID, and dynamically updates the path keys inside Computer B's local claude.json on the fly.

You can now run claude and pick up exactly where you left off, with full history and context intact!

📖 Command Reference

clocator push

Saves the mapping of the current directory's Git Remote URL to the active Claude Code session ID. Run this right before your files sync.

clocator pull

Detects the Git Remote URL of the current directory, finds the corresponding Claude session, and patches your local claude.json configuration so Claude instantly recognizes your workspace on this machine.

clocator status

Shows the current Git Remote, its mapped Claude session ID, and whether your local path is correctly synchronized in the configuration.

Documentation

Troubleshooting

Having issues? Check out the Installation Guide troubleshooting section.

🤝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Check out the Contributing Guide
  2. Fork the repository
  3. Create a feature branch
  4. Submit a pull request

📄 License

Distributed under the MIT License. See LICENSE for more information.

💡 Questions?


Made with ❤️ for developers who code on multiple devices

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clocator-1.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clocator-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file clocator-1.0.0.tar.gz.

File metadata

  • Download URL: clocator-1.0.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for clocator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 261b0d17c5cf9860fa574aca80c8e0e24d781c34466fec593c701a003d8d9b3d
MD5 ad50721da167e8a61ce5a7b6cad23f9b
BLAKE2b-256 7e981b662d004c18774e972ca039b1e64be74f22539fa8ec85a7df82ad2e272a

See more details on using hashes here.

File details

Details for the file clocator-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: clocator-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for clocator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c588ec521e44adbf44c09e509ce48a20d7fbb0723791c9158d43a684442ee362
MD5 bca9be840f33103f116f69e1d7ba37b7
BLAKE2b-256 592047c149055e46d1331f2de82ab7c9fd071bf90daf338f4b9333dc6289845d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page