CLI Reference
sync

cldpm sync

Regenerate symlinks for shared components.

Usage

cldpm sync [PROJECT_NAME] [OPTIONS]

Description

Regenerates symlinks from project's .claude/ directories to shared/ based on dependencies in project.json. Also updates per-directory .gitignore files.

Arguments

ArgumentDescription
PROJECT_NAMEName of project to sync (optional if using --all)

Options

OptionShortDescription
--all-aSync all projects in the mono repo

Examples

Sync single project

cldpm sync my-project

Sync all projects

cldpm sync --all

Or:

cldpm sync -a

When to Use

After Git Clone - Symlinks aren't committed to git - regenerate them after cloning

After Manual Edit - After manually editing project.json dependencies

Broken Symlinks - When symlinks are broken or missing

After Moving Files - After reorganizing the shared directory

What Happens

  1. Read project.json dependencies
  2. Remove existing symlinks in .claude/{skills,agents,hooks,rules}/
  3. Create fresh symlinks to shared/ components
  4. Update per-directory .gitignore files

Output

$ cldpm sync my-project
 my-project: synced 3 links
   skills/code-review
   skills/testing
   agents/debugger

Missing components

$ cldpm sync my-project
 my-project: synced 2 links
   skills/code-review
   skills/testing
! my-project: 1 missing components
  ! agents/nonexistent

No dependencies

$ cldpm sync my-project
my-project: no dependencies to sync

Workflow

After cloning a repository

git clone https://github.com/org/mono-repo.git
cd mono-repo
cldpm sync --all

CI/CD setup

# .github/workflows/setup.yml
steps:
  - uses: actions/checkout@v4
  - name: Install CLDPM
    run: pip install cldpm
  - name: Sync symlinks
    run: cldpm sync --all
💡

Local (project-specific) components are not affected by sync. Only shared component symlinks are managed.