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
| Argument | Description |
|---|---|
PROJECT_NAME | Name of project to sync (optional if using --all) |
Options
| Option | Short | Description |
|---|---|---|
--all | -a | Sync all projects in the mono repo |
Examples
Sync single project
cldpm sync my-projectSync all projects
cldpm sync --allOr:
cldpm sync -aWhen 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
- Read
project.jsondependencies - Remove existing symlinks in
.claude/{skills,agents,hooks,rules}/ - Create fresh symlinks to
shared/components - Update per-directory
.gitignorefiles
Output
$ cldpm sync my-project
✓ my-project: synced 3 links
✓ skills/code-review
✓ skills/testing
✓ agents/debuggerMissing components
$ cldpm sync my-project
✓ my-project: synced 2 links
✓ skills/code-review
✓ skills/testing
! my-project: 1 missing components
! agents/nonexistentNo dependencies
$ cldpm sync my-project
my-project: no dependencies to syncWorkflow
After cloning a repository
git clone https://github.com/org/mono-repo.git
cd mono-repo
cldpm sync --allCI/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.