Crates.io | ccpm |
lib.rs | ccpm |
version | 0.3.14 |
created_at | 2025-08-31 16:03:43.815165+00 |
updated_at | 2025-09-26 00:43:25.920718+00 |
description | Claude Code Package Manager - A Git-based package manager for Claude agents |
homepage | |
repository | https://github.com/aig787/ccpm |
max_upload_size | |
id | 1818667 |
size | 3,074,221 |
⚠️ Beta Software: This project is in active development and may contain breaking changes. Use with caution in production environments.
A Git-based package manager for Claude Code resources that enables reproducible installations using lockfile-based dependency management, similar to Cargo.
agents/*.md
, **/*.md
) for batch installationUnix/Linux/macOS:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/aig787/ccpm/releases/latest/download/ccpm-installer.sh | sh
Windows (PowerShell):
irm https://github.com/aig787/ccpm/releases/latest/download/ccpm-installer.ps1 | iex
# From crates.io (build from source)
cargo install ccpm
# From pre-built binaries (faster)
cargo binstall ccpm
# From Git repository (latest development version)
cargo install --git https://github.com/aig787/ccpm.git
macOS (Apple Silicon)
mkdir -p ~/.ccpm/bin
curl -L https://github.com/aig787/ccpm/releases/latest/download/ccpm-aarch64-apple-darwin.tar.xz | tar xJ -C ~/.ccpm/bin
echo 'export PATH="$HOME/.ccpm/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
macOS (Intel)
mkdir -p ~/.ccpm/bin
curl -L https://github.com/aig787/ccpm/releases/latest/download/ccpm-x86_64-apple-darwin.tar.xz | tar xJ -C ~/.ccpm/bin
echo 'export PATH="$HOME/.ccpm/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Linux (x86_64)
mkdir -p ~/.ccpm/bin
curl -L https://github.com/aig787/ccpm/releases/latest/download/ccpm-x86_64-unknown-linux-gnu.tar.xz | tar xJ -C ~/.ccpm/bin
echo 'export PATH="$HOME/.ccpm/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Linux (ARM64/aarch64)
mkdir -p ~/.ccpm/bin
curl -L https://github.com/aig787/ccpm/releases/latest/download/ccpm-aarch64-unknown-linux-gnu.tar.xz | tar xJ -C ~/.ccpm/bin
echo 'export PATH="$HOME/.ccpm/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Windows (PowerShell)
# Download and extract to a user directory
$installPath = "$env:USERPROFILE\.ccpm\bin"
New-Item -ItemType Directory -Force -Path $installPath
Invoke-WebRequest https://github.com/aig787/ccpm/releases/latest/download/ccpm-x86_64-pc-windows-msvc.zip -OutFile ccpm.zip
Expand-Archive ccpm.zip -DestinationPath $installPath -Force
Remove-Item ccpm.zip
# Add to PATH for current session
$env:PATH += ";$installPath"
# Add to PATH permanently (user-level)
[Environment]::SetEnvironmentVariable("PATH", $env:PATH, [EnvironmentVariableTarget]::User)
# Initialize a new CCPM project
ccpm init
# Or manually create ccpm.toml:
[sources]
community = "https://github.com/aig787/ccpm-community.git"
[agents]
example-agent = { source = "community", path = "agents/example.md", version = "v1.0.0" }
[snippets]
react-utils = { source = "community", path = "snippets/react/*.md", version = "^1.0.0" }
# Install all dependencies and generate lockfile
ccpm install
# Use exact lockfile versions (for CI/CD)
ccpm install --frozen
# Control parallelism (default: max(10, 2 × CPU cores))
ccpm install --max-parallel 8
# Bypass cache for fresh installation
ccpm install --no-cache
Command | Description |
---|---|
ccpm init |
Initialize a new project |
ccpm install |
Install dependencies from ccpm.toml with parallel processing |
ccpm update |
Update dependencies within version constraints |
ccpm list |
List installed resources |
ccpm validate |
Validate manifest and dependencies |
ccpm add |
Add sources or dependencies |
ccpm remove |
Remove sources or dependencies |
ccpm config |
Manage global configuration |
ccpm cache |
Manage the Git cache |
Run ccpm --help
for full command reference.
CCPM manages six types of resources:
.claude/agents/
).claude/ccpm/snippets/
).claude/commands/
).claude/ccpm/scripts/
).claude/settings.local.json
).mcp.json
)# ccpm.toml
[sources]
community = "https://github.com/aig787/ccpm-community.git"
local = "./local-resources"
[agents]
# Single file
rust-expert = { source = "community", path = "agents/rust-expert.md", version = "v1.0.0" }
# Pattern matching - install multiple files
ai-agents = { source = "community", path = "agents/ai/*.md", version = "^1.0.0" }
[snippets]
react-hooks = { source = "community", path = "snippets/react-hooks.md", version = "~1.2.0" }
[scripts]
build = { source = "local", path = "scripts/build.sh" }
[hooks]
pre-commit = { source = "community", path = "hooks/pre-commit.json", version = "v1.0.0" }
[mcp-servers]
filesystem = { source = "community", path = "mcp/filesystem.json", version = "latest" }
CCPM v0.3.2+ features a high-performance SHA-based architecture:
CCPM uses Git-based versioning at the repository level with enhanced constraint support:
version = "v1.0.0"
or version = "^1.0.0"
^1.0
, ~2.1
, >=1.0.0, <2.0.0
branch = "main"
(mutable, updates on each install)rev = "abc123def"
(immutable, exact commit)See the Versioning Guide for details.
CCPM separates credentials from project configuration:
ccpm.toml
) - Safe to commit~/.ccpm/config.toml
) - Contains secrets, never commit# Add private source with authentication (global config only)
ccpm config add-source private "https://oauth2:TOKEN@github.com/org/private.git"
We welcome contributions! Please see our Contributing Guide for details.
CCPM is actively developed with comprehensive test coverage and automated releases:
CCPM uses semantic-release for automated versioning and publishing:
feat:
→ minor, fix:
→ patch)MIT License - see LICENSE.md for details.
Built with Rust 🦀 for reliability and performance