Help us improve
Share bugs, ideas, or general feedback.
From claude-sync
Guides interactive setup of claude-sync for cross-device Claude Code session synchronization: checks prerequisites, selects storage (Cloudflare R2/AWS S3/GCS), gathers credentials, sets passphrase, writes config.
npx claudepluginhub tawanorg/claude-sync --plugin claude-syncHow this command is triggered — by the user, by Claude, or both
Slash command
/claude-sync:sync-initFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Claude Sync Configuration Wizard You are helping the user set up claude-sync for cross-device synchronization of their Claude Code sessions. ## Mode Detection First, check the current state to determine which mode to use: ### Passphrase-Only Mode If config exists but user wants to re-enter passphrase (wrong passphrase on new device): - Use `AskUserQuestion` to ask: "Do you want to re-enter your passphrase? (Use this if you entered the wrong passphrase)" - If yes, skip to the **Encryption Passphrase** step - keep existing storage config - This is equivalent to `claude-sync init --pa...
Share bugs, ideas, or general feedback.
You are helping the user set up claude-sync for cross-device synchronization of their Claude Code sessions.
First, check the current state to determine which mode to use:
test -f ~/.claude-sync/config.yaml && echo "has_config" || echo "no_config"
test -f ~/.claude-sync/age-key.txt && echo "has_key" || echo "no_key"
If config exists but user wants to re-enter passphrase (wrong passphrase on new device):
AskUserQuestion to ask: "Do you want to re-enter your passphrase? (Use this if you entered the wrong passphrase)"claude-sync init --passphraseIf no config exists, or user wants to start fresh:
First, check if claude-sync is installed:
command -v claude-sync
If not installed, tell the user to install it first:
npm install -g @tawandotorg/claude-sync
Use AskUserQuestion to gather the following information step by step:
Ask which cloud storage provider they want to use:
Based on the provider selected:
For Cloudflare R2:
claude-sync)For AWS S3:
us-east-1)For Google Cloud Storage:
gcloud auth application-default login)Ask for an encryption passphrase:
After gathering all information, create the config directory and files:
mkdir -p ~/.claude-sync
chmod 700 ~/.claude-sync
Write ~/.claude-sync/config.yaml with the appropriate format:
For R2:
storage:
provider: r2
bucket: <bucket_name>
account_id: <account_id>
access_key_id: <access_key_id>
secret_access_key: <secret_access_key>
encryption_key_path: ~/.claude-sync/age-key.txt
For S3:
storage:
provider: s3
bucket: <bucket_name>
region: <region>
access_key_id: <access_key_id>
secret_access_key: <secret_access_key>
encryption_key_path: ~/.claude-sync/age-key.txt
For GCS with default credentials:
storage:
provider: gcs
bucket: <bucket_name>
project_id: <project_id>
use_default_credentials: true
encryption_key_path: ~/.claude-sync/age-key.txt
For GCS with service account:
storage:
provider: gcs
bucket: <bucket_name>
project_id: <project_id>
credentials_file: <path_to_json>
encryption_key_path: ~/.claude-sync/age-key.txt
Set proper permissions:
chmod 600 ~/.claude-sync/config.yaml
Run the key generation script with the passphrase:
python3 {{plugin_dir}}/scripts/generate-key.py "<passphrase>" ~/.claude-sync/age-key.txt
Note: If argon2-cffi is not installed, install it first:
pip3 install argon2-cffi
Test the connection:
claude-sync status
If this is not the first device and there are existing remote files, verify the passphrase works:
claude-sync pull --dry-run
After successful configuration, inform the user:
~/.claude-sync/config.yaml~/.claude-sync/age-key.txt/sync-push to upload and /sync-pull to download