Skip to content

workromancer/clsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

47 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CLSYNC

npm version license node version MCP

๐Ÿ”„ Sync your Claude Code environment across machines via GitHub

ํ•œ๊ตญ์–ด


   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
  โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
  โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘
  โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘     โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘  โ•šโ–ˆโ–ˆโ•”โ•  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘
  โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
   โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•   โ•šโ•โ•   โ•šโ•โ•  โ•šโ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•

Table of Contents


โœจ Features

Core Features

Feature Description
๐Ÿ”„ GitHub Sync Share and sync Claude Code settings via GitHub repositories
๐Ÿ“ฆ Multi-Repo Support Pull from multiple repositories and manage them independently
๐Ÿ“ค Stage & Apply Stage settings locally, apply them anywhere
๐ŸŽฏ Full Extension Support Manage Skills, Agents, and Output Styles
๐Ÿ”€ Promote / Demote Move settings between project and user scope
๐Ÿ”Œ MCP Integration Native Claude Code integration via MCP Server

CLI Features

Feature Description
๐Ÿ–ฅ๏ธ Interactive Mode User-friendly menu when running clsync without arguments
๐Ÿ“Š Status Dashboard View staging area status and pulled repositories
๐Ÿ” Repository Browser Browse GitHub repositories before pulling
๐Ÿ“‹ Scope Comparison Compare user and project settings side-by-side
๐Ÿ’ก Smart Hints Helpful error messages with suggestions
๐Ÿ“ Responsive UI Adapts to terminal window size

MCP Server Features

Feature Description
๐Ÿ“ Create Settings Create skills, subagents, output styles via AI
๐Ÿ“– Read Settings Read and list existing settings
๐Ÿ”„ Sync Operations Pull, apply, promote, demote via MCP tools
๐Ÿ“š Documentation Sync Sync 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 GitHub
cd my-settings && git init && git add . && git push

๐Ÿ“– CLI Reference

Basic Commands

Command Description
clsync Start interactive mode
clsync init Initialize ~/.clsync directory
clsync status Show staging area status
clsync --help Show help with ASCII banner
clsync --version Show version

Staging Commands

Command Description
clsync stage [name] Stage item to ~/.clsync/local
clsync stage --all -u Stage all from ~/.claude
clsync stage --all -p Stage all from .claude
clsync unstage <name> Remove from staging
clsync list List staged items

Apply Commands

Command Description
clsync apply [name] Apply from local staging
clsync apply [name] -s owner/repo Apply from pulled repo
clsync apply --all -s owner/repo -u Apply all to ~/.claude
clsync apply --all -s owner/repo -p Apply all to .claude
clsync apply [name] -d /path Apply to custom directory

Repository Commands

Command Description
clsync pull <owner/repo> Pull from GitHub
clsync pull <owner/repo> -f Force overwrite
clsync browse <owner/repo> Browse repo contents
clsync repos List pulled repositories
clsync list <owner/repo> List items in a repo

Scope Commands

Command Description
clsync scopes Compare user and project settings
clsync promote <name> Move: .claude โ†’ ~/.claude
clsync promote <name> -f Force overwrite
clsync promote <name> -r <new> Rename to avoid conflict
clsync demote <name> Move: ~/.claude โ†’ .claude

Export Commands

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

Sync Commands

Command Description
clsync sync Sync documentation from config
clsync sync -u Sync to user level
clsync sync -f Force overwrite
clsync sync -d Dry 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

Documentation Tools

Tool Description
sync_docs Sync documentation from configured sources
list_docs List synced documentation files
read_doc Read a documentation file

Creation Tools

Tool Description
create_skill Create a new skill with SKILL.md
create_subagent Create a new subagent
create_output_style Create a new output style

List & Read Tools

Tool Description
list_skills List skills (user/project/both)
read_skill Read skill content
list_subagents List subagents
read_subagent Read subagent content
list_output_styles List output styles

Repository Tools

Tool Description
pull_settings Pull from GitHub repository
browse_repo Browse repository contents
apply_setting Apply setting from staging
list_staged List staged items
list_repos List pulled repositories

Scope Tools

Tool Description
promote_setting Move project โ†’ user
demote_setting Move user โ†’ project
compare_scopes Compare user and project settings

๐Ÿ“ 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

๐Ÿค Contributing

Pull requests and issues welcome!

๐Ÿ“œ License

MIT ยฉ 2026 workromancer


Buy Me A Coffee

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published