This script is used to sync settings and configurations for ClaudeCode and Gemini between the project repository and a central location.
./sync.ts <agentName> [direction] [location]
agentName: The name of the agent to sync.ClaudeCodeGemini
direction: The direction of the sync. (default:From)To: Copy from the repository to the specified location.From: Copy from the specified location to the repository.
location: The location to sync with. (default:Central)Central: The central configuration directory (~/.claudeor~/.gemini).ProjectorPWD: The project root directory.
Common Use Case: Sync from the central location to the repository.
./sync.ts Gemini
This is equivalent to:
./sync.ts Gemini From Central
Other Examples:
- Sync from the repository to the central location:
./sync.ts Gemini To Central
- Sync from the project root to the repository (use with caution):
./sync.ts Gemini From Project
To run the script from anywhere, you can make it executable and add it to your system's PATH.
- Make the script executable:
chmod +x sync.ts
- Create a symbolic link in a directory that is in your PATH:
A common choice is
/usr/local/bin.You can choose any name for the command (e.g.,sudo ln -s "$(pwd)/sync.ts" /usr/local/bin/sync-settingssync-settings).
Now you can run the script from any directory:
sync-settings Gemini