Bidirectional synchronization tool for custom agents and settings between Claude Code and GitHub Copilot.
Project description
Agent Sync
A universal synchronization tool for custom agents, permissions, and slash commands (saved prompts) between Claude Code and GitHub Copilot.
Support for Codex and Gemini CLI coming soon!
Manage your configuration in your preferred tool's native settings files, and automatically sync and convert those changes to all your other supported AI coding agents.
Features
- Bidirectional Sync: Automatically syncs changes in both directions between Claude and Copilot configurations.
- Permission Management: Translates and syncs permission configurations (Claude
settings.json↔ Copilot.perm.json). - Slash Commands: Syncs slash command definitions and prompt files.
- Smart Conflict Resolution: Detects conflicts and offers interactive or automatic resolution strategies.
- State Tracking: Intelligently tracks file modifications and deletions to keep directories clean.
- Format Conversion: Seamlessly converts between format-specific schemas (e.g., Markdown structure, YAML frontmatter).
- Dry-Run Mode: Preview changes safely before applying them to your file system.
Installation
The recommended way to install Agent Sync is via pip:
pip install agent-sync
Building from Source
If you prefer to build from source:
Requirements: Python 3.8+
# Clone the repository
git clone https://github.com/ZacheryGlass/agent-sync.git
cd agent-sync
# Install dependencies
pip install -r requirements.txt
# Run via module
python -m cli.main
Usage
Agent Sync is a Command Line Interface (CLI) tool.
CLI Mode
The general syntax for the CLI is:
agent-sync [options]
CLI Options
The tool offers various flags to customize the synchronization process.
Core Configuration
--source-dir: Specifies the directory containing your source configuration files.--target-dir: Specifies the directory where files should be synced to.--source-format: Defines the format of the source files (claudeorcopilot).--target-format: Defines the format for the destination files (claudeorcopilot).--config-type: Determines what type of data is being synced. Options are:agent: For AI agent definitions.permission: For tool use permissions and settings.slash-command: For prompt and command definitions.
--direction: Controls the synchronization flow.both: Bidirectional sync (default).source-to-target: One-way sync from source to target.target-to-source: One-way sync from target to source.
Operation Control
--dry-run: Simulates the operation and prints what would happen without modifying any files.--force: Automatically resolves conflicts by choosing the newest file, bypassing interactive prompts.--state-file: Path to a custom state file (defaults to~/.agent_sync_state.json). This file tracks sync history.--verbose,-v: Enables detailed logging output for debugging.
Single File Operations
--convert-file: Path to a single file to convert. Mutually exclusive with directory options.--output: Destination path for the single converted file.--sync-file&--target-file: Used for in-place merging of two specific files.
Format-Specific Flags
--add-argument-hint: Adds anargument-hintfield (useful for Copilot) based on the description when converting from Claude.--add-handoffs: Adds ahandoffsplaceholder field when converting to Copilot format.
Configuration Details
File Matching Strategy
Files are matched between formats based on their base names:
- Agents:
planner.md(Claude) ↔planner.agent.md(Copilot) - Permissions:
settings.json(Claude) ↔settings.perm.json(Copilot) - Slash Commands:
command.md(Claude) ↔command.prompt.md(Copilot)
Field Mapping
Claude → Copilot
| Claude Field | Copilot Field | Notes |
|---|---|---|
name |
name |
Direct mapping |
description |
description |
Direct mapping |
description |
argument-hint |
Optional (requires --add-argument-hint) |
tools |
tools |
Converts comma-separated string to array |
model |
model |
Maps model names (e.g., sonnet → Claude Sonnet 4) |
permissionMode |
- | Dropped (handled via Permission Sync) |
Copilot → Claude
| Copilot Field | Claude Field | Notes |
|---|---|---|
name |
name |
Direct mapping |
description |
description |
Direct mapping |
tools |
tools |
Converts array to comma-separated string |
model |
model |
Maps model names (e.g., Claude Sonnet 4 → sonnet) |
argument-hint |
- | Dropped |
Permission Conversion
The tool handles complex logic to translate between Claude's permission system and VS Code's (Copilot) permission structure.
VS Code (Copilot) uses specific boolean flags for commands and URLs (e.g., "chat.tools.terminal.autoApprove").
Claude Code uses categories (allow, ask, deny) with specific patterns.
- Auto-Approve: Maps between VS Code
trueand Claudeallow. - Require Approval: Maps between VS Code
falseand Claudeask. - Regex Patterns: Preserved as-is during conversion.
- Lossy Conversions: Since VS Code does not support a hard "deny" (block) state, Claude
denyrules are converted to "require approval" in VS Code, and a warning is logged.
Contributing
Contributions are welcome! Please submit a Pull Request or open an issue to discuss proposed changes.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_sync-1.2.0.tar.gz.
File metadata
- Download URL: agent_sync-1.2.0.tar.gz
- Upload date:
- Size: 168.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f088091b0bba347eed76b04343149fb31a6274fe4fd1526e6f442b131f1daf11
|
|
| MD5 |
53856c2da266919511b57e126b6442e4
|
|
| BLAKE2b-256 |
8e54a31b2ade1a29cf1885b900905835d51396fde126852dfc29775c8ad64396
|
File details
Details for the file agent_sync-1.2.0-py3-none-any.whl.
File metadata
- Download URL: agent_sync-1.2.0-py3-none-any.whl
- Upload date:
- Size: 63.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a60ac8216fef3a606b999c23d9df5c2ae05e758a1566aa6ff48812d44a34837
|
|
| MD5 |
e338d83d91500999ceab644a9298d73f
|
|
| BLAKE2b-256 |
b1cd6510d9cf2ce1f300c023f2e9ded1eb3e71b877af94ceb8cad8dd3de82b03
|