S3 Sync Guide
August 15, 2025 ยท View on GitHub
Synchronize your configurations across multiple devices using Amazon S3 or any S3-compatible storage service with intelligent timestamp-based conflict resolution.
๐ New Features
- โฐ Timestamp Tracking: Smart conflict detection with file modification timestamps
- โ ๏ธ Conflict Warnings: Visual warnings when overwriting newer files
- ๐ Automatic Sync: Auto-upload when configs change, auto-download when manager opens
- โ๏ธ System Integration: Configure sync preferences via web interface
Supported Storage Services
- Amazon S3 - AWS's native object storage
- Cloudflare R2 - Zero-egress storage with S3 compatibility
- Backblaze B2 - Cost-effective cloud storage via S3-compatible API
- Any S3-compatible service - Custom endpoints supported
Quick Setup
# Setup S3/S3-compatible sync with timestamp tracking
start-claude s3 setup
# Smart sync with conflict detection
start-claude s3 sync
# Upload local configs (with timestamp warnings)
start-claude s3 upload
start-claude s3 upload --force # Skip timestamp warnings
# Download configs with timestamp comparison
start-claude s3 download
start-claude s3 download --force # Skip conflict prompts
# Check sync status and timestamps
start-claude s3 status
# Configure sync preferences via web interface
start-claude manager # Go to System Settings
Setup Flow
- Service Selection: Choose from Amazon S3, Cloudflare R2, Backblaze B2, or custom S3-compatible service
- Credentials Setup: Prompts for service-specific credentials and configuration
- Connection Test: Automatically tests connection and checks for existing remote configurations
- Conflict Resolution: Handles conflicts intelligently (local vs remote configs)
- Auto-Download: Automatically downloads remote configs if no local ones exist
Service-Specific Setup Examples
Amazon S3
start-claude s3 setup
# Select: Amazon S3
# Bucket name: my-claude-configs
# AWS Region: us-east-1
# AWS Access Key ID: your-access-key
# AWS Secret Access Key: your-secret-key
# File path in bucket: start-claude-config.json
Cloudflare R2
start-claude s3 setup
# Select: Cloudflare R2
# Bucket name: my-claude-configs
# AWS Region: us-east-1
# R2 Token (Access Key ID): your-r2-token
# R2 Secret: your-r2-secret
# R2 Endpoint URL: https://abc123.r2.cloudflarestorage.com
# File path in bucket: start-claude-config.json
Backblaze B2
start-claude s3 setup
# Select: Backblaze B2
# Bucket name: my-claude-configs
# Region: us-west-004
# Application Key ID: your-key-id
# Application Key: your-application-key
# B2 Endpoint URL: https://s3.us-west-004.backblazeb2.com
# File path in bucket: start-claude-config.json
Custom S3-Compatible Service
start-claude s3 setup
# Select: Other S3-compatible service
# Bucket name: my-claude-configs
# Region: your-region
# Access Key ID: your-access-key
# Secret Access Key: your-secret
# Custom endpoint URL: https://your-s3-compatible-endpoint.com
# File path in bucket: start-claude-config.json
Commands
Setup and Configuration
start-claude s3 setup- Interactive setup for S3 synchronizationstart-claude s3 status- Show current S3 sync status and configuration
Synchronization Commands
start-claude s3 sync- Bidirectional sync (upload and download as needed)start-claude s3 upload- Upload local configurations to remote storagestart-claude s3 download- Download configurations from remote storagestart-claude s3 download -f- Force download (overwrite local configurations)
How It Works
Timestamp-Based Sync
-
Upload Process:
- Reads local configurations with modification timestamp
- Compares with remote file timestamp (if exists)
- Warns if remote file is newer than local
- Uploads with timestamp metadata to S3
-
Download Process:
- Retrieves remote file with timestamp information
- Compares with local file modification time
- Warns if local file is newer than remote
- Shows both timestamps for informed decision-making
-
Smart Conflict Resolution:
- Auto-sync: Only when time difference > 5 minutes (clear winner)
- Manual prompts: Shows timestamps for user decision
- Default choices: Favor downloading newer remote files
Upload Process
- Reads local configurations from
~/.start-claude/config.json - Checks file modification timestamp
- Compares with remote timestamp (if remote file exists)
- Warns user if attempting to overwrite newer remote file
- Uploads with timestamp metadata to S3 object headers
Download Process
- Connects to S3 bucket and retrieves file with timestamp
- Compares timestamps between local and remote files
- Shows modification times for both files
- Prompts for confirmation if overwriting newer local file
- Downloads and merges configurations with timestamp awareness
Auto-Sync Process
When configs change locally:
- Automatically triggers upload after 1-second delay
- Silent operation (no prompts for auto-sync)
- Only occurs when S3 sync is configured
When manager opens:
- Checks for remote updates automatically
- Downloads if remote is clearly newer (>30 second difference)
- Skips sync if files were recently modified
In balance mode:
- Checks for remote updates with user prompts
- Shows timestamp differences for manual decision
- Allows immediate config reload after sync
Sync Process
The sync command intelligently handles conflicts with timestamp awareness:
- No local configs: Automatically downloads remote configurations
- No remote configs: Uploads local configurations
- Both exist: Compares timestamps and prompts with time information
- Auto-sync mode: Only syncs when time difference > 5 minutes (clear winner)
Security Considerations
- Credentials: S3 credentials are stored locally in
~/.start-claude/config.json - Encryption: Configurations are stored in plain text - ensure your S3 bucket has appropriate access controls
- API Keys: Your Claude API keys are included in synced configurations - protect your S3 bucket accordingly
Best Practices
- Private Buckets: Always use private S3 buckets for storing configurations
- Least Privilege: Create S3 credentials with minimal required permissions
- Regular Backups: Your S3 bucket serves as a backup - consider versioning
- Team Sharing: Use separate buckets/paths for different teams or environments
Troubleshooting
Connection Issues
# Check S3 status and connection
start-claude s3 status
# Re-run setup to fix credentials
start-claude s3 setup
Permission Errors
Ensure your S3 credentials have the following permissions:
s3:GetObjects3:PutObjects3:ListBucket(optional, for better error messages)
Sync Conflicts
If you encounter sync conflicts:
- Use
start-claude s3 download -fto force download remote configs - Or use
start-claude s3 uploadto force upload local configs - Or manually resolve conflicts by editing configurations
Configuration Storage in S3
The uploaded configuration file maintains the same format as your local config.json:
{
"configs": [
{
"name": "production",
"profileType": "default",
"apiKey": "sk-ant-...",
"baseUrl": "https://api.anthropic.com",
"model": "claude-sonnet-4-20250514",
"isDefault": true
}
],
"settings": {
"overrideClaudeCommand": false
}
}
Note: S3 sync settings are not uploaded to prevent recursive configuration issues.