Quickstart

Quickstart

Get started with CLDPM in 5 minutes.

Installation

pip install cldpm

Create a Mono Repo

Initialize a new CLDPM mono repo:

cldpm init my-monorepo
cd my-monorepo

This creates the following structure:

my-monorepo/
├── cldpm.json
├── CLAUDE.md
├── shared/
│   ├── skills/
│   ├── agents/
│   ├── hooks/
│   └── rules/
└── projects/

Create a Project

Create your first project:

cldpm create project my-app --description "My first Claude Code project"

Create a Shared Skill

Create a shared skill that can be used across projects:

cldpm create skill code-review -d "Code review assistant"

This creates:

shared/skills/code-review/
├── SKILL.md      # Edit this with your skill instructions
└── skill.json    # Metadata

Edit shared/skills/code-review/SKILL.md with your instructions:

# Code Review
 
You are a code review assistant. When reviewing code:
 
1. Check for bugs and security issues
2. Suggest performance improvements
3. Ensure code style consistency

Create a Skill with Dependencies

cldpm create skill advanced-review \
  -d "Advanced code review" \
  --skills code-review,security-check

Add Skill to Project

Link the shared skill to your project:

cldpm add skill:code-review --to my-app

This:

  1. Updates project.json with the dependency
  2. Creates a symlink in .claude/skills/
  3. Updates .gitignore to ignore the symlink

Verify Setup

Check your project's resolved structure:

cldpm get my-app

Output:

my-app
├── Shared
│   └── skills
│       └── code-review
└── Local
    └── (none)

After Git Clone

When someone clones the repo, symlinks need to be regenerated:

cldpm sync --all

Programmatic Usage

CLDPM can also be used programmatically. Here's an example using the Python SDK:

from cldpm.core.config import load_cldpm_config, list_projects
from cldpm.core.resolver import resolve_project
 
# Load repo configuration
config = load_cldpm_config("/path/to/monorepo")
 
# List all projects
projects = list_projects("/path/to/monorepo")
for project in projects:
    print(f"Project: {project.name}")
 
# Resolve a project with all dependencies
project = resolve_project("my-app", "/path/to/monorepo")
print(f"Shared skills: {[s['name'] for s in project['shared']['skills']]}")

See the SDK Reference for full API documentation.

Next Steps