Claude SyncDocs

Configuration

Understand the config files, manifests, and directory structure.

Config File

Claude Sync stores authentication credentials and device information in a JSON config file at ~/.claude-sync/config.json. This file is created automatically when you log in and updated when you add or rename devices.

~/.claude-sync/config.json
{
  "apiUrl": "https://api.claude-sync.com",
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "deviceId": "550e8400-e29b-41d4-a716-446655440000",
  "deviceName": "MacBook Pro",
  "userId": "550e8400-e29b-41d4-a716-446655440001",
  "email": "user@example.com"
}
FieldTypeDescription
apiUrlstringBase URL for the Claude Sync API
accessTokenstringJWT access token (expires after 15 minutes)
refreshTokenstringJWT refresh token for obtaining new access tokens
deviceIdUUIDUnique identifier for this device
deviceNamestringHuman-readable name for this device
userIdUUIDUnique identifier for the authenticated user
emailstringEmail address of the authenticated user

Project Manifests

Each Claude Code project has a corresponding manifest file stored at ~/.claude-sync/manifests/{encoded-path}.json. The manifest tracks all session files, todos, artifacts, and their metadata for efficient sync diffing.

~/.claude-sync/manifests/-Users-john-my-app.json
[
  {
    "path": "sessions/2026-02-05-session-abc123.json",
    "hash": "sha256:abc123def456...",
    "size": 4096,
    "modifiedAt": "2026-02-05T10:30:00.000Z",
    "isCompressed": false
  },
  {
    "path": "todos/main.json",
    "hash": "sha256:def456abc789...",
    "size": 512,
    "modifiedAt": "2026-02-05T09:15:00.000Z",
    "isCompressed": false
  },
  {
    "path": "artifacts/component-diagram.png",
    "hash": "sha256:789abc456def...",
    "size": 102400,
    "modifiedAt": "2026-02-04T14:20:00.000Z",
    "isCompressed": true
  }
]
FieldTypeDescription
pathstringRelative path within the Claude project directory
hashstringSHA-256 hash of file contents for change detection
sizenumberFile size in bytes
modifiedAtISO 8601Last modification timestamp
isCompressedbooleanWhether the file was compressed before upload

Project Links

When you pull sessions from another device, Claude Sync creates a project link file at ~/.claude-sync/project-links/{encoded-path}.json. This maps your local project path to the foreign device's project path and project ID.

~/.claude-sync/project-links/-Users-john-my-app.json
{
  "projectId": "770e8400-e29b-41d4-a716-446655440003",
  "foreignEncodedDir": "-home-user-my-app",
  "linkedAt": "2026-02-05T10:30:00.000Z"
}
FieldTypeDescription
projectIdUUIDUnique identifier for the shared project
foreignEncodedDirstringEncoded directory name from the remote device
linkedAtISO 8601Timestamp when the link was created

Directory Layout

Claude Sync uses two primary directories for configuration and data. The ~/.claude-sync/ directory stores config, manifests, and project links. The ~/.claude/projects/ directory contains actual session data, which may be real directories or symlinks to foreign device data.

~/.claude-sync/
├── config.json
├── manifests/
│   └── -Users-john-my-app.json
└── project-links/
    └── -Users-john-my-app.json

~/.claude/
└── projects/
    ├── -Users-john-my-app/       (real or symlink)
    │   ├── sessions.json
    │   ├── todos/
    │   ├── artifacts/
    │   └── tool-results/
    └── -home-user-my-app/        (foreign dir)
        ├── sessions.json
        ├── todos/
        └── artifacts/
Path encoding converts absolute paths to filesystem-safe names by replacing / and . with -