Cloud Sync
Cloud Sync
Section titled “Cloud Sync”Cloud Sync keeps your Swixter profiles synchronized across multiple machines. Profiles are encrypted locally before upload via a secure API.
Commands
Section titled “Commands”Authenticate with the Swixter sync service.
swixter sync loginOpens a browser for authentication. After login, your profiles are automatically synced.
logout
Section titled “logout”Sign out and stop syncing.
swixter sync logoutLocal profiles are preserved after logout.
status
Section titled “status”Check sync status.
swixter sync statusShows:
- Login status
- Last sync time
- Number of synced profiles
- Any sync errors
Manually push local changes.
swixter sync pushManually pull remote changes.
swixter sync pullAuto-Sync
Section titled “Auto-Sync”Once logged in, Swixter automatically syncs:
- When you create, edit, or delete a profile
- When you switch active profiles
- On a configurable interval
Auto-sync can be configured in ~/.config/swixter/config.json:
{ "sync": { "autoSync": true, "interval": 300 }}How It Works
Section titled “How It Works”- Profiles are encrypted locally before upload
- Encrypted data is sent to the Swixter sync API
- Other machines pull and decrypt changes
- Conflict resolution determines which version wins when profiles change on multiple machines
Configuration
Section titled “Configuration”{ "sync": { "autoSync": true, "interval": 300, "conflictStrategy": "lastWriteWins", "endpoint": "https://sync.swixter.cc" }}| Option | Description | Default |
|---|---|---|
autoSync | Automatically sync on profile changes | true |
interval | Background sync interval in seconds | 300 |
conflictStrategy | How to resolve conflicts | "lastWriteWins" |
endpoint | Sync API endpoint | "https://sync.swixter.cc" |
Encryption
Section titled “Encryption”Profiles are encrypted using AES-256-GCM before transmission:
- Key derivation: PBKDF2 with 100,000 iterations
- Master key: Derived from your authentication token
- Per-profile IV: Unique initialization vector for each profile
API keys in profiles are encrypted at rest on the server. The server never sees plaintext API keys.
Conflict Resolution
Section titled “Conflict Resolution”When the same profile is modified on two machines before syncing:
| Strategy | Behavior |
|---|---|
lastWriteWins | Most recent modification takes precedence |
manual | Prompt user to choose which version to keep |
Manual Resolution
Section titled “Manual Resolution”When manual strategy is active, conflicting profiles appear in:
swixter sync status# Shows: 2 profiles with conflictsReview and resolve:
swixter sync resolve <profile-name># Shows diff between versions# Choose: local / remote / mergeSync Scope
Section titled “Sync Scope”The following data is synced:
- Profiles (API keys, provider settings, models)
- Active profile assignments per coder
- User-defined providers
- Groups
Not synced:
- Coder CLI installations (use
swixter <coder> installon each machine) - Proxy configuration
- Web UI preferences
Troubleshooting
Section titled “Troubleshooting”Sync not working
Section titled “Sync not working”# Check statusswixter sync status
# Force re-authenticationswixter sync logoutswixter sync loginProfile not appearing on other machine
Section titled “Profile not appearing on other machine”# Force a pullswixter sync pull
# Check for conflictsswixter sync statusReset sync state
Section titled “Reset sync state”swixter sync logout# This removes auth tokens. Local profiles are preserved.swixter sync login# Re-authenticate and re-sync.Self-Hosted Sync
Section titled “Self-Hosted Sync”For teams or users who want to run their own sync server, the sync endpoint can be customized:
{ "sync": { "endpoint": "https://sync.my-company.com" }}The sync API is a Workers-compatible REST API. See the Swixter GitHub repository for API documentation.