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.
{
"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"
}| Field | Type | Description |
|---|---|---|
apiUrl | string | Base URL for the Claude Sync API |
accessToken | string | JWT access token (expires after 15 minutes) |
refreshToken | string | JWT refresh token for obtaining new access tokens |
deviceId | UUID | Unique identifier for this device |
deviceName | string | Human-readable name for this device |
userId | UUID | Unique identifier for the authenticated user |
email | string | Email 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.
[
{
"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
}
]| Field | Type | Description |
|---|---|---|
path | string | Relative path within the Claude project directory |
hash | string | SHA-256 hash of file contents for change detection |
size | number | File size in bytes |
modifiedAt | ISO 8601 | Last modification timestamp |
isCompressed | boolean | Whether 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.
{
"projectId": "770e8400-e29b-41d4-a716-446655440003",
"foreignEncodedDir": "-home-user-my-app",
"linkedAt": "2026-02-05T10:30:00.000Z"
}| Field | Type | Description |
|---|---|---|
projectId | UUID | Unique identifier for the shared project |
foreignEncodedDir | string | Encoded directory name from the remote device |
linkedAt | ISO 8601 | Timestamp 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/