Skip to content

Repository files navigation

CLSYNC

npm versionlicensenode versionMCP

🔄 Sync your Claude Code environment across machines via GitHub

한국어


 ██████╗██╗ ███████╗██╗ ██╗███╗ ██╗ ██████╗
██╔════╝██║ ██╔════╝╚██╗ ██╔╝████╗ ██║██╔════╝
██║ ██║ ███████╗ ╚████╔╝ ██╔██╗ ██║██║
██║ ██║ ╚════██║ ╚██╔╝ ██║╚██╗██║██║
╚██████╗███████╗███████║ ██║ ██║ ╚████║╚██████╗
╚═════╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═════╝

Table of Contents


✨ Features

Core Features

FeatureDescription
🔄 GitHub SyncShare and sync Claude Code settings via GitHub repositories
📦 Multi-Repo SupportPull from multiple repositories and manage them independently
📤 Stage & ApplyStage settings locally, apply them anywhere
🎯 Full Extension SupportManage Skills, Agents, and Output Styles
🔀 Promote / DemoteMove settings between project and user scope
🔗 Link to Slash CommandsConvert skills/agents into explicit slash commands
🔍 Local Project ScanFind and manage all .claude directories on your machine
🔌 MCP IntegrationNative Claude Code integration via MCP Server (37 tools)

CLI Features

FeatureDescription
🖥️ Interactive ModeUser-friendly menu when running clsync without arguments
📊 Status DashboardView staging area status and pulled repositories
🔍 Repository BrowserBrowse GitHub repositories before pulling
📋 Scope ComparisonCompare user and project settings side-by-side
💡 Smart HintsHelpful error messages with suggestions
📐 Responsive UIAdapts to terminal window size

MCP Server Features

FeatureDescription
📝 Create SettingsCreate skills, subagents, output styles via AI
📖 Read SettingsRead and list existing settings
🔄 Sync OperationsPull, apply, promote, demote via MCP tools
📚 Documentation SyncSync external documentation to Claude context

📦 Installation

npm install -g clsync

🚀 Quick Start

1. Initialize

clsync init

2. Pull Community Settings

# Browse a repository
clsync browse owner/repo
# Pull to local cache
clsync pull owner/repo
# Apply all to your ~/.claude
clsync apply --all -s owner/repo -u

3. Share Your Settings

# Stage your settings
clsync stage --all -u
# Export with metadata
clsync export ./my-settings -a "Your Name" -d "My Claude settings"# Push to GitHubcd my-settings && git init && git add .&& git push

📖 CLI Reference

Basic Commands

CommandDescription
clsyncStart interactive mode
clsync initInitialize ~/.clsync directory
clsync statusShow staging area status
clsync --helpShow help with ASCII banner
clsync --versionShow version

Staging Commands

CommandDescription
clsync stage [name]Stage item to ~/.clsync/local
clsync stage --all -uStage all from ~/.claude
clsync stage --all -pStage all from .claude
clsync unstage <name>Remove from staging
clsync listList staged items

Apply Commands

CommandDescription
clsync apply [name]Apply from local staging
clsync apply [name] -s owner/repoApply from pulled repo
clsync apply --all -s owner/repo -uApply all to ~/.claude
clsync apply --all -s owner/repo -pApply all to .claude
clsync apply [name] -d /pathApply to custom directory

Repository Commands

CommandDescription
clsync pull <owner/repo>Pull from GitHub
clsync pull <owner/repo> -fForce overwrite
clsync browse <owner/repo>Browse repo contents
clsync reposList pulled repositories
clsync list <owner/repo>List items in a repo

Scope Commands

CommandDescription
clsync scopesCompare user and project settings
clsync promote <name>Move: .claude~/.claude
clsync promote <name> -fForce overwrite
clsync promote <name> -r <new>Rename to avoid conflict
clsync demote <name>Move: ~/.claude.claude

Link Commands

CommandDescription
clsync link skill <name>Link skill to slash command
clsync link agent <name>Link subagent to slash command
clsync link --allLink all skills and agents
clsync link --all --skills-onlyLink only skills
clsync link --all --agents-onlyLink only agents
clsync link skill <name> -pLink in project scope
clsync link skill <name> -n <custom>Link with custom command name

Scan Commands

CommandDescription
clsync scanFind all local .claude directories
clsync scan -p <dir>Scan specific directory
clsync scan -cClear scan cache
clsync scan -iShow cache info

Export Commands

CommandDescription
clsync export <dir>Export staging to directory
clsync export <dir> -a "Author"With author name
clsync export <dir> -d "Desc"With description

Sync Commands

CommandDescription
clsync syncSync documentation from config
clsync sync -uSync to user level
clsync sync -fForce overwrite
clsync sync -dDry run (preview)

🎮 Interactive Mode

Run clsync without arguments to enter interactive mode:

 ██████╗██╗ ███████╗██╗ ██╗███╗ ██╗ ██████╗
██╔════╝██║ ██╔════╝╚██╗ ██╔╝████╗ ██║██╔════╝
...
📦 Local: 0 items | 🔗 Repos: 2
? What would you like to do?
1) 📊 View status
2) 📦 Browse pulled repositories
3) 📥 Apply items from repo
4) 🔍 Pull new repository
5) 🔀 Compare scopes (user vs project)
6) ❓ Help
7) 👋 Exit

Features:

  • Browse and apply items with number selection
  • Multi-select items to apply
  • Pull new repositories interactively
  • Compare scopes visually

🔌 MCP Server

Setup

claude mcp add clsync --transport stdio -- npx -y clsync-mcp

Available Tools (37 total)

Init & Status Tools

ToolDescription
init_clsyncInitialize ~/.clsync directory
get_statusGet current clsync status

Documentation Tools

ToolDescription
sync_docsSync documentation from configured sources
list_docsList synced documentation files
read_docRead a documentation file

Creation Tools

ToolDescription
create_skillCreate a new skill with SKILL.md
create_subagentCreate a new subagent
create_output_styleCreate a new output style

List & Read Tools

ToolDescription
list_skillsList skills (user/project/both)
read_skillRead skill content
list_subagentsList subagents
read_subagentRead subagent content
list_output_stylesList output styles

Stage & Unstage Tools

ToolDescription
stage_itemStage item from ~/.claude or .claude
stage_allStage all items
unstage_itemRemove item from staging
list_stagedList staged items

Repository Tools

ToolDescription
pull_settingsPull from GitHub repository
push_settingsPush to GitHub repository
browse_repoBrowse repository contents
list_reposList pulled repositories

Apply Tools

ToolDescription
apply_settingApply setting from staging

Scope Tools

ToolDescription
promote_settingMove project → user
demote_settingMove user → project
compare_scopesCompare user and project settings

Link Tools

ToolDescription
link_skill_to_commandLink skill to slash command
link_subagent_to_commandLink subagent to slash command
link_all_to_commandsLink all skills and agents

Export & Local Tools

ToolDescription
export_for_pushExport staged items for git push
link_local_repoLink GitHub repo to local
unlink_local_repoUnlink GitHub repo
get_local_infoGet local staging info

Online Registry Tools

ToolDescription
list_online_reposList online registry repositories
pull_online_repoPull from online registry

Scan Tools

ToolDescription
scan_claude_dirsScan for .claude directories
get_scan_cache_infoGet scan cache information
clear_scan_cacheClear scan cache

📐 Architecture

~/.claude/ ─┐
├── skills/ │
├── agents/ │ stage ┌─────────────┐
└── output-styles/ ├──────────► ~/.clsync ◄────► GitHub
│ ├── local/ Repos
.claude/ (project) ─┤ └── repos/
├── skills/ │ └── owner/repo/
└── ... ─┘◄── apply ────┘

Directory Structure

~/.clsync/
├── manifest.json # Metadata and repo tracking
├── local/ # Your staged items
│ ├── skills/
│ ├── agents/
│ └── output-styles/
└── repos/ # Pulled repositories
├── owner1/repo1/
│ ├── clsync.json # Repo metadata
│ ├── skills/
│ └── agents/
└── owner2/repo2/

clsync.json Schema

{
"$schema": "https://clsync.dev/schema/v1.json",
"version": "0.2.0",
"name": "my-settings",
"description": "My Claude Code settings",
"author": "username",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"items": [
{ "type": "skill", "name": "commit-msg", "path": "skills/commit-msg" }
],
"stats": {
"skills": 1,
"agents": 0,
"output_styles": 0,
"total": 1
}
}

🎯 Workflows

Personal: Sync Across Machines

Machine A (export):

clsync stage --all -u
clsync export ./my-settings -a "Me"cd my-settings && git push

Machine B (import):

clsync pull user/my-settings
clsync apply --all -s user/my-settings -u

Team: Share Settings

# Team lead exports
clsync stage --all -u
clsync export ./team-settings -a "Team" -d "Shared team settings"# Team members import
clsync pull team/settings
clsync apply --all -s team/settings -u

Community: Use Multiple Repos

clsync pull user1/awesome-skills
clsync pull user2/productivity-agents
clsync repos # View all
clsync apply code-reviewer -s user2/productivity-agents -u

Project: Manage Scopes

# View both scopes
clsync scopes
# Promote project setting to user (make global)
clsync promote my-skill
# Demote user setting to project (make local)
clsync demote my-agent

Link: Create Slash Commands

# Link a single skill to slash command
clsync link skill alarm
# Now use /alarm in Claude Code# Link a subagent to slash command
clsync link agent code-reviewer
# Now use /code-reviewer in Claude Code# Link all skills and agents at once
clsync link --all
# Link only skills
clsync link --all --skills-only
# Link in project scope
clsync link skill my-skill --project

Use Case: Convert auto-invoked skills into explicitly callable slash commands for more control.


🤝 Contributing

Pull requests and issues welcome!

📜 License

MIT © 2026 workromancer


Buy Me A Coffee

Releases

Packages

Contributors

Languages