sync command reads your existing Claude Code configuration from ~/.claude/ and synchronizes it to other installed AI coding tools. This includes skills, commands, and MCP servers.
Usage
Options
Target tool to sync to.Available targets:
all(default) - Sync to all detected AI coding toolsopencode- Sync to OpenCode only- Other supported tools (varies by implementation)
all, the CLI auto-detects installed tools and syncs to each one.Path to Claude home directory.Default:
~/.claudeOverride this if your Claude Code config is in a non-standard location.Examples
Sync to All Detected Tools
Sync to Specific Target
Sync from Custom Claude Home
~/.claude.
What Gets Synced
The sync command copies the following from your Claude Code config:- Skills - All custom skills from
~/.claude/skills/ - Commands - Custom commands from
~/.claude/commands/ - MCP Servers - Model Context Protocol server configurations with their environment variables
Target Detection
When using--target all, the CLI detects installed tools by checking:
- Config file existence (e.g.,
~/.config/opencode/opencode.json) - Installation paths
- Tool-specific markers
Use Cases
Migrate from Claude Code to OpenCode
Keep Multiple Tools in Sync
Sync After Adding New Skills
Sync vs. Install/Convert
| Command | Source | Output |
|---|---|---|
sync | ~/.claude/ config | Multiple tool configs |
install | GitHub or local plugin | Single tool format |
convert | Local plugin directory | Single tool format |
sync when you want to copy your existing Claude setup to other tools.
Use install or convert when you want to add a specific plugin to a tool.
Output Locations
Sync writes to the default config location for each target:-
OpenCode:
~/.config/opencode/- Skills →
~/.config/opencode/skills/ - Commands →
~/.config/opencode/commands/ - MCP servers →
~/.config/opencode/opencode.json
- Skills →
-
Codex:
~/.codex/- Configuration merged into Codex format
- Other targets: Varies by tool implementation
The sync command performs a deep merge with existing configs. It does not overwrite your entire config file, only the relevant sections (skills, commands, MCP servers).